https://github.com/jeremiedb/evolinear.jl
Linear models
https://github.com/jeremiedb/evolinear.jl
boosting gradient-boosting julia-language linear-models machine-learning
Last synced: about 1 year ago
JSON representation
Linear models
- Host: GitHub
- URL: https://github.com/jeremiedb/evolinear.jl
- Owner: jeremiedb
- License: mit
- Created: 2022-09-12T15:38:28.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-06-14T22:21:29.000Z (about 2 years ago)
- Last Synced: 2025-04-06T10:41:31.443Z (about 1 year ago)
- Topics: boosting, gradient-boosting, julia-language, linear-models, machine-learning
- Language: Julia
- Homepage: https://jeremiedb.github.io/EvoLinear.jl/dev/
- Size: 427 KB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# EvoLinear
| Documentation | CI Status | Coverage |
|:------------------------:|:----------------:|:----------------:|
| [![][docs-stable-img]][docs-stable-url] [![][docs-latest-img]][docs-latest-url] | [![][ci-img]][ci-url] | [![][cov-img]][cov-url] |
[docs-latest-img]: https://img.shields.io/badge/docs-latest-blue.svg
[docs-latest-url]: https://jeremiedb.github.io/EvoLinear.jl/dev
[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg
[docs-stable-url]: https://jeremiedb.github.io/EvoLinear.jl/stable
[ci-img]: https://github.com/jeremiedb/EvoLinear.jl/workflows/CI/badge.svg
[ci-url]: https://github.com/jeremiedb/EvoLinear.jl/actions?query=workflow%3ACI+branch%3Amain
[cov-img]: https://codecov.io/github/jeremiedb/evolinear.jl/branch/main/graph/badge.svg
[cov-url]: https://app.codecov.io/github/jeremiedb/evolinear.jl
ML library implementing linear boosting with L1 and L2 regularization.
For tree based boosting, consider [EvoTrees.jl](https://github.com/Evovest/EvoTrees.jl).
Supported loss functions:
- mse (squared-error)
- logistic (logloss) regression
- poisson
- gamma
- tweedie
## Installation
From General Registry
```
pkg> add EvoLinear
```
For latest version
```
pkg> add https://github.com/jeremiedb/EvoLinear.jl
```
## Getting started
Build a configuration struct with `EvoLinearRegressor`. Then `EvoLinear.fit` takes `x::Matrix` and `y::Vector` as inputs, plus optionally `w::Vector` as weights and fits a linear boosted model.
```julia
using EvoLinear
config = EvoLinearRegressor(loss=:mse, nrounds=10, L1=1e-1, L2=1e-2)
m = EvoLinear.fit(config; x, y, metric=:mse)
p = m(x)
```
Splines - Experimental
Number of knots for selected features is defined through a `Dict` of the form: `Dict(feat_id::Int => nknots::Int)`.
```julia
config = EvoSplineRegressor(loss=:mse, nrounds=10, knots = Dict(1 => 4, 5 => 8))
m = EvoLinear.fit(config; x, y, metric=:mse)
p = m(x')
```