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) {
|
||||
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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user