Skip to main content

OQBoost 2.0 — gradient-boosted 2D-oblique decision trees (histogram-binned, C++ backend)

Project description

OQBoost 2.0

Gradient-boosted 2D-oblique decision trees — histogram-binned, C++ backend.

OQBoost splits on oblique hyperplanes over feature pairs (a·u + b·v < t) instead of axis-aligned thresholds, capturing diagonal and interaction boundaries that XGBoost/LightGBM approximate with coarse staircases. Version 2.0 is a ground-up redesign: a histogram-binned 2D-oblique core with a deterministic direction fit.

scikit-learn compatible · compiled C++ (pybind11) + OpenMP.


Install

pip install oqboost

A prebuilt wheel is provided for macOS (arm64, CPython 3.12). On other platforms pip builds from source — needs a C++17 compiler (clang++/g++) and, for parallelism, OpenMP (brew install libomp on macOS).

Quickstart

from oqboost import OQBoostClassifier, OQBoostRegressor

# Binary classification
clf = OQBoostClassifier(
    n_estimators=120, learning_rate=0.06, max_depth=4,
    max_bins=16, subsample=0.8, colsample=0.8, random_state=42,
)
clf.fit(X_train, y_train)
proba = clf.predict_proba(X_test)[:, 1]   # P(class 1)
pred  = clf.predict(X_test)

# Regression (squared error)
reg = OQBoostRegressor(n_estimators=120, learning_rate=0.06)
reg.fit(X_train, y_train)
y_hat = reg.predict(X_test)

Both are drop-in scikit-learn estimators — usable in Pipeline, GridSearchCV, cross_val_score, and clone.

Key hyperparameters

Param Default Meaning
n_estimators 120 boosting rounds
learning_rate 0.06 shrinkage
max_depth 4 interaction depth (stacked 2D cuts)
max_bins 16 grid / direction-seed resolution (keep small)
subsample 0.8 rows per tree (key overfit lever)
colsample 0.8 features per node
reg_lambda 1.0 L2 regularization
n_screen -1 SIS top-m feature screening (-1 = exhaustive)

Why oblique

Axis-aligned boosters need many stacked cuts to approximate a diagonal boundary. On a 2D XOR problem XGBoost reaches only AUC ≈ 0.53 while OQBoost reaches ≈ 0.92; on a Spiral OQBoost draws the smoothest boundary of all four boosters. Across tuned benchmarks it ranks above XGBoost and LightGBM.

Full benchmarks, decision-boundary figures, and design notes: https://github.com/cree1116/oqboost


MIT License.

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

oqboost-2.0.0.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

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

oqboost-2.0.0-cp312-cp312-macosx_11_0_arm64.whl (113.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

Details for the file oqboost-2.0.0.tar.gz.

File metadata

  • Download URL: oqboost-2.0.0.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for oqboost-2.0.0.tar.gz
Algorithm Hash digest
SHA256 1b607d74f03f7cfe43c34df4d89c5d459fe41758daa7a86d32cd6aa74db7b84c
MD5 dc748125f464a171d7d691299950b65d
BLAKE2b-256 02ffa032a990e2717570edd84ba21f339e663cf263012e2f5f54e33ac7ad0673

See more details on using hashes here.

File details

Details for the file oqboost-2.0.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oqboost-2.0.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4a8d223a14717702311e96785b7bc323a7cabc44cbb5fce90543b0ca4cdb6e11
MD5 37eac333e1d65777ce154888adee48a4
BLAKE2b-256 f5c0d46ec843457c19d8e97849393732ea75e5ce2f5acf6cfca773b0ac3aa5ae

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