Skip to content

Norm Constrained Generalised Linear Model using numpy, numba and scipy.

License

Notifications You must be signed in to change notification settings

jcrichard/firls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

firls: !!!UNDER DEVELOPMENT!!!

Python implementation of Generalised Linear Model (GLM) using numpy, numba and scipy.

Build Status Code style: black License: MIT

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.

Sparse matrix

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.

Scikit-learn API

The package subclass BaseEstimator and LinearClassifierMixin and is usable with scikit-learn.

Dependencies

There is three main dependencies: numpy, scipy and numba. To use the scikit-learn API you will need to install it!

Installation

just do: pip install git+https://github.com/jcrichard/firls.git

References

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.