correction erreur sur taille init de la matrice des coefs pour différentes valeurs de lambda

This commit is contained in:
Pierre-Edouard Portier 2022-03-14 13:30:54 +01:00
parent c2c2f5d64b
commit cb605f2d25
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ ridge.svd <- function(data, degre) {
ridge.loocv <- function(data, deg, 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)
idx <- 1
for(lambda in lambdas) {