Skip to main content

Advanced regression methods with sklearn-like interface

Project description

Better Regressions

Advanced regression methods with an sklearn-like interface.

Current Features

  • Linear:
    • Configurable regularization: Ridge with given alpha / BayesianRidge / ARD
    • "Better bias" option to properly regularize the intercept term
  • Scaler:
    • Configurable preprocessing: Standard scaling (by second moment) / Quantile transformation with uniform/normal output / Power transformation
    • AutoScaler to automatically select the best scaling method based on validation split
  • Smooth: Boosting-based regression using smooth functions for features
    • SuperSmoother: Adaptive-span smoother for arbitrary complex functions.
    • Angle: Bagging of piecewise-linear functions, it's less flexible but because of that it's more robust to overfitting.

Installation

pip install better-regressions

Basic Usage

from better_regressions import auto_angle, auto_linear, Linear, Scaler
from sklearn.datasets import make_regression
import numpy as np

X, y = make_regression(n_samples=100, n_features=5, noise=0.1)
model = auto_angle(n_breakpoints=2)
model.fit(X, y)
y_pred = model.predict(X)
print(repr(model))

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

better_regressions-0.1.1.tar.gz (340.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

better_regressions-0.1.1-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file better_regressions-0.1.1.tar.gz.

File metadata

  • Download URL: better_regressions-0.1.1.tar.gz
  • Upload date:
  • Size: 340.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for better_regressions-0.1.1.tar.gz
Algorithm Hash digest
SHA256 27ff0c52a921d886c0a446d4cee0f8d62246fbd641fe5e53f5faf374202134d5
MD5 3b30d1a52dc1a160b84d1e17c9c6815a
BLAKE2b-256 cc485a26409dab973ab34d46eba4f28a196e823f335102328bbee10d4f094699

See more details on using hashes here.

File details

Details for the file better_regressions-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for better_regressions-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6cd2377525497523c5fb8a74eb432bc9e5e07a5a603504b5b1461cb5540c230e
MD5 3d6039e1466c146730e6dc8d123b4dfe
BLAKE2b-256 954c46b677055122c5a9ea638fa8f57ea04554c884a9749aee272c842d9dd040

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page