Giter Site home page Giter Site logo

regularized_glm's Introduction

PR Test

regularized_glm

A simple python package for fitting L2- and smoothing-penalized generalized linear models.

Built primarily because the statsmodels GLM fit_regularized method is built to do elastic net (combination of L1 and L2 penalities), but if you just want to do an L2 or a smoothing penalty (like in generalized additive models), using a penalized iteratively reweighted least squares (p-IRLS) is much faster.

Installation

pip install regularized_glm

OR

conda install -c edeno regularized_glm

Other packages

References

Wood, S. (2006). Generalized additive models: an introduction with R (CRC press).

regularized_glm's People

Contributors

edeno avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

afcarl

regularized_glm's Issues

Deal with exponential families with estimated scale

Currently code does not handle families with estimated scale. Need to adjust the covariance and AIC for the normal and gamma distributions where the scale is estimated.

Add 2 * estimated_scale for AIC.

For covariance multiply by sfit ** 2:

ssr = ssr(predicted_response, response, prior_weights)
sfit = sqrt(ssr / (n_observations - effective_degrees_of_freedom))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.