Skip to main content

Python package for regularized regressions.

Project description

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]]

Project details


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.2.0.tar.gz (3.7 kB view hashes)

Uploaded source

Built Distribution

reggy-0.2.0-py3-none-any.whl (4.7 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page