Repository navigation
v0.2.0: Elastic Net, Cross-validation, Model Persistence
What's New
Added
- Elastic Net regularization with Alpha parameter (L1+L2 mix)
- K-fold cross-validation for automatic lambda selection
- Model serialization (Save/Load to JSON)
- Input validation for NaN/Inf values
- Comprehensive benchmarks
- Project infrastructure (CI/CD, linting, documentation)
Changed
- Refactored to sequential coordinate descent (better cache locality)
- Optimized matrix access with
RawMatrix()direct slice operations - Reduced per-iteration allocations with
predictInto() - Lambda now scaled by nSamples for sklearn compatibility
Fit()returns error instead of panic- Updated to Go 1.25
Fixed
- Population variance (n) instead of sample variance (n-1) for sklearn consistency
Installation
go get github.com/CausalGo/lasso@v0.2.0Full Changelog: v0.1.0...v0.2.0