JuliaStats / Lasso.jl

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

Correctly handling the case λmax = 0. #53

Open barankarakus opened 4 years ago

barankarakus commented 4 years ago

Fixes #51.

Two changes: 1) Change to computeλ to ensure λmax = 0 leads to an output of [0] and not [NaN, ..., NaN]. 2) Change to fit! to ensure the case where autoλ = true and λmax = 0 is handled correctly (rather than throwing an error).

coveralls commented 4 years ago

Pull Request Test Coverage Report for Build 202


Files with Coverage Reduction New Missed Lines %
src/segselect.jl 1 89.23%
src/coordinate_descent.jl 3 93.63%
src/Lasso.jl 3 88.05%
<!-- Total: 7 -->
Totals Coverage Status
Change from base Build 198: 6.6%
Covered Lines: 885
Relevant Lines: 972

💛 - Coveralls
barankarakus commented 4 years ago

Added tests (and some more minor changes). Let me know if anything else needs done!