Regressions with arbitrarily complex regularization terms.
Project description
reggy
Regressions with arbitrarily complex regularization terms.
Currently supported regularization terms:
- LASSO
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=(1000, 1))
y = np.random.normal(X * beta + alpha, size=(1000, 1))
model = reggy.RegReg(X, y, regularizers=[reggy.lasso])
model.fit()
print(model.coef())
## (array([[0.27395004]], dtype=float32), array([[1.2682909]], dtype=float32))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
reggy-0.1.0.tar.gz
(3.7 kB
view hashes)
Built Distribution
reggy-0.1.0-py3-none-any.whl
(4.6 kB
view hashes)