treder / MVPA-Light

Matlab toolbox for classification and regression of multi-dimensional data
MIT License
70 stars 35 forks source link

bug: train_logreg L2 weights for nested cross-validation #7

Closed aranas closed 5 years ago

aranas commented 5 years ago

When running the logistic regression with nested cross-validation to find optimal lambda (cfg.mvpa.param.lambda = 'auto') an error occurs because the weights are not split according to inner folds:

Matrix dimensions must agree.

Error in train_logreg/lr_gradient_and_hessian_tanh_L2 (line 433) g = ((cfg.weights . sigma)' YX)'/N - sumyxN + lambda * w;

treder commented 5 years ago

fixed - this bug slipped in when I added the weights a while ago, thanks for pointing out.