PrismBoost: gradient boosting with SEFR oblique splits for classification and regression.
Project description
PrismBoost
PrismBoost is a gradient-boosting classifier/regressor that uses SEFR oblique splits at internal nodes (hyperplane splits instead of axis-aligned thresholds), with an optional fast C++ backend.
from prismboost import PrismBoostClassifier
from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import train_test_split
X, y = load_breast_cancer(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(
X, y, test_size=0.2, random_state=0, stratify=y
)
clf = PrismBoostClassifier(n_estimators=100, max_depth=3, random_state=0)
clf.fit(X_train, y_train)
print(clf.score(X_test, y_test))
Why oblique boosting?
Axis-aligned GBDTs approximate curved boundaries with staircases. PrismBoost fits linear (oblique) splits, so decision surfaces on non-linear problems are typically smoother.
Predicted-probability surfaces on moons: PrismBoost (left) vs XGBoost (right).
Decision boundaries on six synthetic 2D datasets (rows) across classifiers (columns). Lower surface roughness S is smoother.
Benchmark highlights (PMLB)
Evaluated on 121 Penn Machine Learning Benchmark classification datasets against strong baselines (CatBoost, LightGBM, LightGBM-linear, XGBoost, SPORF, Random Forest, Logistic Regression). Hyperparameters are tuned with Optuna; scores are repeated stratified CV.
Median scores (higher is better for F1 / ROC-AUC; lower is better for inference latency):
| Model | Median macro-F1 | Median ROC-AUC | Median inference (ms/row) |
|---|---|---|---|
| PrismBoost | 0.903 | 0.976 | 0.056 |
| CatBoost | 0.892 | 0.976 | 0.184 |
| XGBoost | 0.875 | 0.970 | 0.615 |
| LightGBM-linear | 0.875 | 0.970 | 0.567 |
| LightGBM | 0.870 | 0.972 | 0.550 |
| Random Forest | 0.862 | 0.964 | 5.140 |
| SPORF | 0.856 | 0.970 | 10.058 |
| Logistic Regression | 0.822 | 0.942 | 0.053 |
Average ranks (1 = best; Friedman tests significant for macro-F1 and ROC-AUC):
| Model | Macro-F1 rank | ROC-AUC rank |
|---|---|---|
| CatBoost | 3.33 | 3.48 |
| PrismBoost | 3.88 | 4.26 |
| LightGBM-linear | 3.99 | 4.26 |
| LightGBM | 4.10 | 4.10 |
| XGBoost | 4.31 | 4.24 |
| Logistic Regression | 5.31 | 5.66 |
| Random Forest | 5.48 | 5.31 |
| SPORF | 5.61 | 4.70 |
Nemenyi critical-difference diagrams (α = 0.05). Models connected by a bar are not significantly different.
On these data, PrismBoost is competitive with modern GBDTs on accuracy while remaining among the fastest at inference (second only to logistic regression; fastest non-linear model by median latency).
Install
Requires Python 3.10–3.13, a C++17 compiler, and CMake (for the optional native extension).
pip install .
# or editable:
pip install -e ".[dev]"
If the C++ extension fails to build, the package still works via the pure-Python backend.
Public API
| Name | Description |
|---|---|
PrismBoostClassifier |
Primary classifier (sklearn-compatible) |
PrismBoostRegressor |
Primary regressor |
SEFRBoostClassifier / SEFRBoostRegressor |
Compatibility aliases |
SEFR |
Linear weak learner used inside oblique splits |
Features
- Oblique tree splits from SEFR (closed-form linear separator)
- Binary and multiclass classification; regression
- Optional C++ backend for faster fit/predict
- sklearn estimator API (
fit,predict,predict_proba, pipelines, pickling)
Quick example
Tests
pip install -e ".[dev]"
pytest -q
License
MIT — see LICENSE.
Third-party note: prismboost._utils includes code derived from wnb under BSD-3-Clause (src/prismboost/licenses/BSD-3-Clause.txt).
Citation
If you use PrismBoost in academic work, please cite the accompanying paper (to be updated on publication).
Authors
- Hamidreza Keshavarz
- Reza Rawassizadeh
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prismboost-0.1.0.tar.gz.
File metadata
- Download URL: prismboost-0.1.0.tar.gz
- Upload date:
- Size: 734.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b61fbab54fa66c2a79e3567c21256eabede1c18e26ca3796218f5af90ee2eabc
|
|
| MD5 |
7e37385bcacbecaadb5bab8bcd713187
|
|
| BLAKE2b-256 |
5e82d1f67f035a0daf8c91f9d59f70dc63997cfec41072ed04a371552e9415ef
|
File details
Details for the file prismboost-0.1.0-cp313-cp313-macosx_26_0_arm64.whl.
File metadata
- Download URL: prismboost-0.1.0-cp313-cp313-macosx_26_0_arm64.whl
- Upload date:
- Size: 151.5 kB
- Tags: CPython 3.13, macOS 26.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff0f9a4f81f6b0b850085b9a0c91388f9e6835447ee80e1dc520d4de4946a8e4
|
|
| MD5 |
add2f439fbbf07c51e42a417443ce7f4
|
|
| BLAKE2b-256 |
8107c75d93efcb97f8de9d6bacf1c9de69008e23d0377a499c1210a960ee0ecf
|