correction erreur sur taille init de la matrice des coefs pour différentes valeurs de lambda
This commit is contained in:
parent
c2c2f5d64b
commit
cb605f2d25
|
@ -22,7 +22,7 @@ ridge.svd <- function(data, degre) {
|
||||||
|
|
||||||
ridge.loocv <- function(data, deg, lambdas) {
|
ridge.loocv <- function(data, deg, lambdas) {
|
||||||
errs <- double(length(lambdas))
|
errs <- double(length(lambdas))
|
||||||
coefs <- matrix(data = NA, nrow = nrow(data$X), ncol = 1+deg)
|
coefs <- matrix(data = NA, nrow = length(lambdas), ncol = 1+deg)
|
||||||
ridge <- ridge.svd(data, deg)
|
ridge <- ridge.svd(data, deg)
|
||||||
idx <- 1
|
idx <- 1
|
||||||
for(lambda in lambdas) {
|
for(lambda in lambdas) {
|
||||||
|
|
Loading…
Reference in New Issue