Skip to main content

A self-generalizing, hyperparameter-free gradient boosting machine

Project description

Python Versions PyPI Version Crates.io Version

Perpetual

A self-generalizing, hyperparameter-free gradient boosting machine

PerpetualBooster is a gradient boosting machine (GBM) algorithm which doesn't have hyperparameters to be tuned so that you can use it without needing hyperparameter optimization packages unlike other GBM algorithms. Similar to AutoML libraries, it has a budget parameter which ranges between (0, 1). Increasing the budget parameter increases predictive power of the algorithm and gives better results on unseen data. Start with a small budget and increase it once you are confident with your features. If you don't see any improvement with further increasing budget, it means that you are already extracting the most predictive power out of your data.

Benchmark

Hyperparameter optimization usually takes 100 iterations with plain GBM algorithms. PerpetualBooster achieves the same accuracy in the single run. Thus, it achieves around 100x speed-up at the same accuracy with different budget levels and with different datasets. The speed-up might be slightly lower or significantly higher than 100x depending on the dataset.

The following table summarizes the results for the California Housing dataset:

Perpetual budget LightGBM n_estimators Perpetual mse LightGBM mse Perpetual cpu time LightGBM cpu time Speed-up
0.33 100 0.192 0.192 10.1 990 98x
0.35 200 0.190 0.191 11.0 2030 186x
0.45 300 0.187 0.188 18.7 3272 179x

You can reproduce the results using the performance_benchmark.ipynb notebook in the examples folder.

Usage

You can use the algorithm like in the example below. Check examples folders for both Rust and Python.

from perpetual import PerpetualBooster

model = PerpetualBooster(objective="SquaredLoss")
model.fit(X, y, budget=0.4)

Documentation

Documentation for the Python API can be found here and for the Rust API here.

Installation

The package can be installed directly from pypi.

pip install perpetual

To use in a rust project, add the following to your Cargo.toml file to get the package from crates.io.

perpetual = "0.1.0"

Paper

PerpetualBooster prevents overfitting with a generalization algorithm. The paper is work-in-progress to explain how the algorithm works.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

perpetual-0.1.0-cp312-none-win_amd64.whl (517.3 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

perpetual-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (708.9 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

perpetual-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (546.7 kB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

perpetual-0.1.0-cp311-none-win_amd64.whl (516.1 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

perpetual-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (708.5 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

perpetual-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (546.3 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

perpetual-0.1.0-cp310-none-win_amd64.whl (516.2 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

perpetual-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (708.5 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

perpetual-0.1.0-cp39-none-win_amd64.whl (516.6 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

perpetual-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (708.9 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

perpetual-0.1.0-cp38-none-win_amd64.whl (515.8 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

perpetual-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (709.5 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

Supported by

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