JuliaStats / Lasso.jl

Lasso/Elastic Net linear and generalized linear models
Other
143 stars 31 forks source link

Allow additional fitting arguments to be passed in cross_validate_path #23

Closed harryscholes closed 5 years ago

harryscholes commented 5 years ago

https://github.com/JuliaStats/Lasso.jl/blob/55718966db53679e333d8a94749e8722b082796c/src/cross_validation.jl#L27-L36

So that parameters, such as irls_maxiter can be set during CV. E.g.

function cross_validate_path(path::RegularizationPath; gen=Kfold(length(y),10),
                                   select=:CVmin, fitargs...)
    m = path.m
    y = m.rr.y
    offset = m.rr.offset
    Xstandardized = m.pp.X
    cross_validate_path(path, Xstandardized, y; gen=gen, select=select, offset=offset,
                        standardize=false, fitargs...)
end