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, so diagonal and interaction boundaries are represented directly rather than as axis-aligned approximations. Version 2.0 finds split directions by H-weighted least-squares regression of the gradient — deterministic, one 2×2 solve per feature pair (no random projections or numerical search).

scikit-learn compatible · compiled C++ (pybind11) + OpenMP · native missing-value handling (NaN routed to a learned bin) · pandas / scipy-sparse inputs.

Install

pip install oqboost

Prebuilt wheels for Windows, macOS (arm64), and Linux. On other platforms pip builds from source — needs a C++17 compiler and (for parallelism) OpenMP.

Quickstart

from oqboost import OQBoostClassifier, OQBoostRegressor

# Binary / multiclass classification (3+ classes use a joint softmax automatically)
clf = OQBoostClassifier(n_estimators=120, learning_rate=0.06, max_depth=4)
clf.fit(X_train, y_train)
proba = clf.predict_proba(X_test)   # (n_samples, n_classes), rows sum to 1
pred  = clf.predict(X_test)

# Regression
reg = OQBoostRegressor().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; pickle / joblib compatible.

Key parameters

OQBoostClassifier(
    n_estimators=120,      # boosting rounds
    learning_rate=0.06,    # shrinkage
    max_depth=4,           # tree depth (stacked 2D oblique cuts)
    reg_lambda=1.0,        # L2 regularization
    subsample=0.8,         # row sampling per tree
    colsample=0.8,         # feature sampling per node
    multiclass="joint",    # "joint" softmax (default) | "ovr" one-vs-rest
    fast_dir="full",       # pair search: "full" all pairs (default) | "fast" Star (cheaper at high d)
)

Common extras: class_weight="balanced" for imbalance, categorical_features=[...] (cross-fitted target encoding), monotone_constraints=[...], n_iter_no_change=10 for early stopping, warm_start=True to add trees incrementally. The regressor takes the same core knobs plus loss="squared"|"huber"|"quantile".

Tips: keep max_bins small (default 16). On high-dimensional data the default fast_dir="full" is O(d²) per node — switch to fast_dir="fast" or set n_screen (feature screening) to cut training time.

Documentation

Full documentation is on GitHub: https://github.com/cree1116/oqboost-2.0

OQBoost 2.0 is a ground-up rewrite. The original 1.x line (oblique splits via a Deterministic Gradient-Covariance Scan) lives at 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.3.0.tar.gz (43.9 kB view details)

Uploaded Source

Built Distributions

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

oqboost-2.3.0-cp313-cp313-win_amd64.whl (180.3 kB view details)

Uploaded CPython 3.13Windows x86-64

oqboost-2.3.0-cp313-cp313-manylinux_2_28_x86_64.whl (310.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

oqboost-2.3.0-cp313-cp313-macosx_14_0_arm64.whl (426.2 kB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

oqboost-2.3.0-cp312-cp312-win_amd64.whl (180.2 kB view details)

Uploaded CPython 3.12Windows x86-64

oqboost-2.3.0-cp312-cp312-manylinux_2_28_x86_64.whl (310.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

oqboost-2.3.0-cp312-cp312-macosx_14_0_arm64.whl (426.1 kB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

oqboost-2.3.0-cp311-cp311-win_amd64.whl (177.2 kB view details)

Uploaded CPython 3.11Windows x86-64

oqboost-2.3.0-cp311-cp311-manylinux_2_28_x86_64.whl (308.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

oqboost-2.3.0-cp311-cp311-macosx_14_0_arm64.whl (423.7 kB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

oqboost-2.3.0-cp310-cp310-win_amd64.whl (176.3 kB view details)

Uploaded CPython 3.10Windows x86-64

oqboost-2.3.0-cp310-cp310-manylinux_2_28_x86_64.whl (306.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

oqboost-2.3.0-cp310-cp310-macosx_14_0_arm64.whl (422.6 kB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

File details

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

File metadata

  • Download URL: oqboost-2.3.0.tar.gz
  • Upload date:
  • Size: 43.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for oqboost-2.3.0.tar.gz
Algorithm Hash digest
SHA256 bb2f87ec8d02f633901ccd54338472aed9234e04a6c0cd47e3b6b04c53c31bd3
MD5 9d2a2efaed4c68d48c9c75d7e9bd7da5
BLAKE2b-256 cbcd473aa2ba193f77101b0babaa08bb7a794346bf616b16e9252e822d2c9872

See more details on using hashes here.

File details

Details for the file oqboost-2.3.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: oqboost-2.3.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 180.3 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for oqboost-2.3.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 7375db17f3d81fcb51214648110adca82e8bce85ca3fcfce26c5768cf2f7ed76
MD5 a329c48ba72cd7568a1ca6eac5ae08cb
BLAKE2b-256 8c56629e3ba4b4cab78fd5c9adb358516caf6cae931dfce52f4deb6f6c642c5d

See more details on using hashes here.

File details

Details for the file oqboost-2.3.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for oqboost-2.3.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a52de636c8df1eac30bce31446b5e0525faf0f5f558dea0493bd20eb46016d60
MD5 1cb17de8d9441defcd87a7f5145bf30b
BLAKE2b-256 7500f3f0fe97660611c6713102467149930255bd6b817f9744d210e4d4478e71

See more details on using hashes here.

File details

Details for the file oqboost-2.3.0-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for oqboost-2.3.0-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 38383307d76bc3ef006731125e1aa98b53efda15aab765205844f1baff35286a
MD5 6c4e9a5e6f65af084880f09a616efe30
BLAKE2b-256 d59ff1b2170c45bc0efd036e9000428669833cb52764c1421f2651676053e555

See more details on using hashes here.

File details

Details for the file oqboost-2.3.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: oqboost-2.3.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 180.2 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for oqboost-2.3.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c4cf7ad43d135c5bc410746a9e6abad2ef88e8912e2884fc4afe50f5f39dcbc2
MD5 4015902ba0117093610e75409006420a
BLAKE2b-256 319602330cc6272c9aa074a7fdb603e5c3b0538396e13e1e4f0c03142efaa167

See more details on using hashes here.

File details

Details for the file oqboost-2.3.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for oqboost-2.3.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 077b8f5358a17e931cee5a66f2b84a15b2948a1a7d7898c669d7498867b98c46
MD5 d926d58ac26a47312d345c4397dc26d2
BLAKE2b-256 a65f99eb809af2c05f636fc4ca77617ebd02f0bb63f325db91b05cc65f03c2c7

See more details on using hashes here.

File details

Details for the file oqboost-2.3.0-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for oqboost-2.3.0-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 7a1ff4891469e92bf16e9d485505a3e914abd4268cf344735a5396c463852bb4
MD5 6ed3497d92d5a652a57aa1c5b8ecc0ee
BLAKE2b-256 b78935d683e33ed364aeec650fd3f8e43d7d793a597e796c91ab86167e48b0e4

See more details on using hashes here.

File details

Details for the file oqboost-2.3.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: oqboost-2.3.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 177.2 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for oqboost-2.3.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3bc2fc8468b6e9ee43b1575bb914056fb272dd6fdda164acba3e3e0183729afa
MD5 52dbee8876bb5367fe88c2e31f04fe0a
BLAKE2b-256 c81e6287a852e0675e9455ead4a14c9a64ffeec1d8681a3595eb12d39cb1489c

See more details on using hashes here.

File details

Details for the file oqboost-2.3.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for oqboost-2.3.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a211b8e8933bed184bf3fd2e63de7bd69d8ef0a4c6b562a32c3f8e31dc04a547
MD5 03c33f776d589225549631020a11cd5c
BLAKE2b-256 fd3cdd8848129c241361de5bbae309e8963b014d6dec13b9cd2431bd2de1144a

See more details on using hashes here.

File details

Details for the file oqboost-2.3.0-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for oqboost-2.3.0-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 e722cd48f043e2c723e18f975f2940e20838c59cdb7731b3cdc475d09573635a
MD5 b9649e784dbe186ac18a3c40fbd6cdfe
BLAKE2b-256 b2cc7df56857dd5936c2110997f755f6ed5483055253c4652bace493fa5d3dde

See more details on using hashes here.

File details

Details for the file oqboost-2.3.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: oqboost-2.3.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 176.3 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for oqboost-2.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 126b1f9b08a85813057fec93549b201fc6368a6fe2415076ec4dd5c578acfb91
MD5 e6429156f1cc2873c42586536d679b46
BLAKE2b-256 f059a39878c58e0e3312b89e289c4f9f1b7875a267bbf5244c811c5d80836795

See more details on using hashes here.

File details

Details for the file oqboost-2.3.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for oqboost-2.3.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 622a39d77d82d93d52d33240e8f099892ed3d29501f454b5759d15ca268600ca
MD5 acb2b49f1eef2f99924cfb58a0463ef0
BLAKE2b-256 1dce97eebd8d1acd7277911f384a732900810f53cdc05e114cf718928a358561

See more details on using hashes here.

File details

Details for the file oqboost-2.3.0-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for oqboost-2.3.0-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 a1d19769471eb529207273ef8fb6f4d83d3b185c1e9b5fae7199e66507738273
MD5 00a50446ff7f9d4a751a2b4f012b0712
BLAKE2b-256 11f9517a343121e8860f722268e5b1c5b1fb5f89c75053bf2acb6a15aec7c025

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