Python implementation of Generalised Linear Model (GLM) using numpy, numba and scipy.
FIRLS is a package for solving sparse and dense penalised Generalised Linear Model. It is fully written in python. FIRLS includes these families with their natural link:
- Gaussian | identity
- Poisson | log
- Negative binomial | log
- Binomial | log
- Bernoulli | log
For each family norm 1 and norm 2 penalty can be added.
The library support solving large sparse problems. Currently the norm 1 is not supported. A sparse version of the cyclical coordinate descent algorithm will come later.
The package subclass BaseEstimator and LinearClassifierMixin and is usable with scikit-learn.
There is three main dependencies: numpy, scipy and numba. To use the scikit-learn API you will need to install it!
just do:
pip install git+https://github.com/jcrichard/firls.git
Friedman, J., Hastie, T. and Tibshirani, R. (2010) Regularization Paths for Generalized Linear Models via Coordinate Descent, Journal of Statistics Software 33(1), pp. 1-22.
Hardin, J.W. (2018), Generalized Linear Models and Extensions: Fourth Edition, Stata Press.