Perpetual Documentation
Perpetual is a self-generalizing gradient boosting machine (GBM) implemented in Rust with native Python and R bindings. Unlike traditional gradient boosting libraries (such as LightGBM, XGBoost, and CatBoost) that require extensive hyperparameter optimization across learning rate, tree depth, and regularization parameters, PerpetualBooster automatically controls step size and node-split generalization via a single intuitive budget parameter.
Quick Links
Python Package: PyPI (perpetual) | Installation | Quickstart | Python API Reference
R Package: R Documentation (pkgdown) | R Source (package-r)
Rust Crate: crates.io (perpetual) | Rust API Docs (docs.rs)
Source & Community: GitHub Repository | Discord Community | LinkedIn | Contact: mutlusims3k@gmail.com
Key Capabilities
Hyperparameter-Free Learning: Achieves state-of-the-art accuracy in a single training run via a simple
budgetparameter, eliminating multi-trial hyperparameter tuning (see How PerpetualBooster Works).High-Performance Rust Core: Parallelized histogram construction, split finding, and inference powered by Rust and Rayon, with zero-copy support for Polars/Arrow columnar data and native Python & R bindings.
Comprehensive Objectives: Supports Binary & Multi-class Classification, Regression (Squared, Absolute, Huber, Quantile, Poisson, Gamma, Tweedie, MAPE), and Learning-to-Rank (ListNet), as well as custom user-defined objectives.
Advanced Tree Features: Natively handles categorical variables, learnable missing value branches, monotonic constraints, and feature interaction constraints.
Continual Learning: Built-in warm-start continual learning (
reset=False) that updates models incrementally as new batches arrive, reducing cumulative training complexity from quadratic \(O(n^2)\) to linear \(O(n)\) without sacrificing accuracy (see Continual Learning and Further Speed-Up with Continual Learning).Native Calibration & Prediction Intervals: Predict calibrated probabilities and rigorous prediction intervals (Conformalized Quantile Regression, GRP, MinMax, WeightVariance) that achieve 35% narrower intervals than MAPIE at matching coverage (see Calibration and Uncertainty Quantification and Better Prediction Intervals with Perpetual Learning).
Robust Drift Monitoring: Monitor both data drift and concept drift directly from model tree topology without requiring ground-truth labels or retraining (see Drift Detection).
Built-in Causal ML: Out-of-the-box Uplift Modeling, Meta-Learners (S-, T-, X-, R-, DR-Learner), Double Machine Learning (DML), and Structural Policy Learning (see Causal ML).
Explainability & Interoperability: Compute feature importances, partial dependence plots, and exact TreeSHAP values (Explainability), and export models to industry-standard XGBoost or ONNX formats (Model IO & Export).
Benchmark Highlights
AutoML Benchmark (104 Classification Datasets)
Tested on the top 104 classification datasets from the OpenML AutoML Benchmark (AutoML benchmark script), PerpetualBooster trains 3.1x faster on average than AutoGluon (best_quality preset, single 5-fold model) at identical ROC AUC:
Model |
Budget / Time Limit |
Mean ROC AUC |
Mean Fit Duration (s) |
|---|---|---|---|
AutoGluon |
900s limit |
0.903 |
39.2 |
Perpetual |
budget = 1.0 |
0.903 |
12.5 (3.1x faster) |
Initial Training Speed vs. Tuned LightGBM (100 Optuna Trials)
By replacing 100 trials of hyperparameter optimization with a single budget run, PerpetualBooster achieves 76x–148x speed-ups at matching test accuracy (see 100x Faster Initial Training):
Dataset (Task) |
Perpetual Budget |
Perpetual Loss |
LightGBM Loss |
Perpetual CPU Time |
Speed-Up vs. LightGBM |
|---|---|---|---|---|---|
California Housing (Regression, MSE) |
0.30 |
0.202 |
0.203 |
8.8s (vs. 982s) |
112x |
California Housing (Regression, MSE) |
0.45 |
0.198 |
0.198 |
19.1s (vs. 2,554s) |
134x |
California Housing (Regression, MSE) |
0.60 |
0.197 |
0.197 |
40.9s (vs. 6,057s) |
148x |
Forest Cover Types (Classification, Log Loss) |
0.33 |
0.0886 |
0.0857 |
32.2s (vs. 2,464s) |
76x |
Featured Blog Posts & Case Studies
How PerpetualBooster Works — How step size control and generalization control eliminate hyperparameter tuning.
100x Faster Initial Training — Achieving 100x faster training than Optuna-tuned LightGBM pipelines.
Better Prediction Intervals with Perpetual Learning — 35% tighter prediction intervals with Perpetual Conformalized Quantile Regression (CQR) vs. MAPIE.
Further Speed-Up with Continual Learning — Reducing cumulative streaming training time from \(O(n^2)\) to \(O(n)\).
Optimum Business Decisioning with Calibrated Probabilities — Maximizing lending profitability with calibrated probabilities on OpenML
TVS_Loan_Default.Profit-Driven Lead Scoring — Profit-driven lead scoring on the UCI Bank Marketing dataset.
Contents:
- Installation
- Quickstart
- API Reference
- Causal ML
- Calibration and Uncertainty Quantification
- Drift Detection
- Continual Learning
- Explainability
- Model IO & Export
- Tutorials
- Handling Categorical Data
- Scikit-Learn Interface: Classification, Regression & Ranking
- Performance Benchmarking
- Mastering Regression Calibration: From Theoretical Basics to Advanced Methods
- Classification Calibration: Prediction Sets with Perpetual
- Custom Objective Tutorial
- Uplift Modeling with the Criteo Uplift Dataset
- Instrumental Variables (Boosted IV)
- Double Machine Learning: Estimating the Gender Wage Gap
- Policy Learning: Optimal Treatment Assignment
- Risk, Compliance, and Interpretability
- Heterogeneous Treatment Effects with Meta-Learners
- Fairness-Aware Credit Scoring
- Fairness-Aware Classification with FairClassifier
- Customer Retention: Uplift Modeling for Churn Prevention
- Advanced Drift Detection in Perpetual
- PerpetualBooster Objectives Tutorial
- Architecture
- Blog
- Blog & Case Studies
- Parameters Tuning
- Frequently Asked Questions
- How do I choose the best budget?
- How does Perpetual prevent overfitting without a separate validation set?
- Does Perpetual support categorical features and missing values?
- Is Perpetual faster than LightGBM, XGBoost, and AutoGluon?
- How do I update a trained model on new batches of data?
- What languages are supported?
- How can I get help, report issues, or contact the maintainer?