In some circumstances it's nice to test lasso all the way down to λ=0 (if, for example, one has a least-squares prediction), but the approach taken here doesn't make that straightforward. I felt that the most flexible approach would be to allow users to provide a function that generates the list of λ from λmax. The advantage of using a function is that calculating λmax is nontrivial, so to avoid repeating work it's best to calculate λ after λmax is known.
One of the tests here is marked @test_skip because the solution with λmax turns out not to always be null. That seems to be a violation of the documentation for fit, but I decided fixing that was beyond the scope of this PR.
In some circumstances it's nice to test lasso all the way down to
λ=0
(if, for example, one has a least-squares prediction), but the approach taken here doesn't make that straightforward. I felt that the most flexible approach would be to allow users to provide a function that generates the list ofλ
fromλmax
. The advantage of using a function is that calculatingλmax
is nontrivial, so to avoid repeating work it's best to calculateλ
afterλmax
is known.One of the tests here is marked
@test_skip
because the solution withλmax
turns out not to always be null. That seems to be a violation of the documentation forfit
, but I decided fixing that was beyond the scope of this PR.