Skip to main content

Documentation Status

PyPI version

lrboost is a sckit-learn compatible package for linear residual boosting. lrboost uses a linear estimator to first remove any linear trends from the data, and then uses a separate non-linear estimator to model the remaining non-linear trends. We find that extrapolation tasks or data with linear and non-linear components are the best use cases. Not every modeling task will benefit from lrboost, but we use this in our own work and wanted to share something that made it easy to use.

For a stable version, install using pip:

pip install lrboost

lrboost was inspired by 'Regression-Enhanced Random Forests' by Haozhe Zhang, Dan Nettleton, and Zhengyuan Zhu. An excellent PyData talk by Gabby Shklovsky explaining the intuition underlying the approach may also be found here: 'Random Forest Best Practices for the Business World'.

  • LRBoostRegressor can be used like any other sklearn estimator and is built off a sklearn template.
  • predict(X) returns an array-like of final predictions
  • Adding predict(X, detail=True) returns a dictionary with primary, secondary, and final predictions.
from sklearn.datasets import load_diabetes
from lrboost import LRBoostRegressor
X, y = load_diabetes(return_X_y=True)
lrb = LRBoostRegressor().fit(X, y)
predictions = lrb.predict(X)
detailed_predictions = lrb.predict(X, detail=True)

print(lrb.primary_model.score(X, y)) #R2
print(lrb.score(X, y)) #R2

>>> 0.512
>>> 0.933

More detailed documentation can be found here!

Andrew Patton, Nathan Walker, and Kostya Medvedovsky

Metadata

Release files for lrboost 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lrboost 0.2.1
File Size Uploaded Provenance Actions
lrboost-0.2.1.tar.gz 7.0 kB Without provenance Details for lrboost-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lrboost 0.2.1
File Interpreter ABI Platform Actions
lrboost-0.2.1-py3-none-any.whl Python 3 none any Details for lrboost-0.2.1-py3-none-any.whl

Total release size: 14.0 kB

Release files / lrboost-0.2.1.tar.gz

Download URL lrboost-0.2.1.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
65f0ce4866d3b2174afa63c2aaf664ccf66bdd36bc15a6e5df4e9e735aba8671
BLAKE2b-256 checksum
How to use checksums
6fe17c70e3d7e63d5425236eb0d00cfe2bb6458ec953186a9fb11e97f2da34af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.4

Release files / lrboost-0.2.1-py3-none-any.whl

Download URL lrboost-0.2.1-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a9e9d4fae76a1cb47dc69c40140fbae16106aa084f8e710ae2580d6a6bbc9f3
BLAKE2b-256 checksum
How to use checksums
5aa956a1321421a3d4989ae6ec7e802ea7805461b95964a19aac13d1c4beb60a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.4

Security for lrboost 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page