reggy
Python package for regularized regressions.
Supported regularization terms:
- Ridge
- LASSO
- Network-fusion penalty (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6030897/)
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]]
Metadata
Release files for reggy 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| reggy-0.2.0.tar.gz | 3.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| reggy-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.3 kB
Release files / reggy-0.2.0.tar.gz
| Download URL | reggy-0.2.0.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b3cd74704dc33f426d5473989c11b1c1b13973ec6e7e8bfbfbd00bbfd2df8cc2
|
|
BLAKE2b-256 checksum How to use checksums |
268f5ad02d44f198098539d4256c555857f3edce10067e91536e3abe07609bdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
|
Release files / reggy-0.2.0-py3-none-any.whl
| Download URL | reggy-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
781574b03667c0f46baf5ec29a4a31aecca2b4ae99e67ab5ac7083349cdee320
|
|
BLAKE2b-256 checksum How to use checksums |
bd71b15e29621895f5cb10fefc435845b1237e7e5aec6c7ada42ff189b2306ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
|