Metadata-Version: 2.1
Name: reggy
Version: 0.1.0
Summary: Regressions with arbitrarily complex regularization terms.
Home-page: https://github.com/kpj/reggy
License: MIT
Author: kpj
Author-email: kim.philipp.jablonski@gmail.com
Requires-Python: >=3.9.0,<3.10.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: ipython (>=8.0.1,<9.0.0)
Requires-Dist: pandas (>=1.3.5,<2.0.0)
Requires-Dist: tensorflow (>=2.7.0,<3.0.0)
Requires-Dist: tensorflow-probability (>=0.15.0,<0.16.0)
Project-URL: Repository, https://github.com/kpj/reggy
Description-Content-Type: text/markdown

# reggy

[![PyPI](https://img.shields.io/pypi/v/reggy.svg?style=flat)](https://pypi.python.org/pypi/reggy)
[![Tests](https://github.com/kpj/reggy/workflows/Tests/badge.svg)](https://github.com/kpj/reggy/actions)

Regressions with arbitrarily complex regularization terms.

Currently supported regularization terms:
* LASSO


## Installation

```bash
$ pip install reggy
```


## Usage

A simple example with LASSO regularization:
```python
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))
```

