Skip to content

kpj/reggy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

reggy

PyPI Tests

Python package for regularized regressions.

Supported regularization terms:

Installation

$ pip install reggy

Usage

A simple example with LASSO regularization:

import reggy
import numpy as np


alpha = 0.3
beta = 1.7

X = np.random.normal(size=(100, 1))
y = np.random.normal(X * beta + alpha, size=(100, 1))

model = reggy.RegReg(X, y, family=reggy.gaussian_family, regularizers=[(0.5, reggy.lasso)])
model.fit()

print(model.intercept_, model.coef_)
## [[0.22491232]] [[0.9219889]]

About

Python package for regularized regressions.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages