Skip to main content

RuleBoost

Learn additive rule ensembles via gradient boosting.

Usage Example for Classification

>>> from ruleboost import RuleBoostingClassifier
>>> import numpy as np
>>> x = np.array([[0.1], [0.2], [0.3], [0.4], [0.5], [0.6], [0.7], [0.8], [0.9]])
>>> y = np.array([0, 0, 0, 1, 1, 1, 0, 0, 0])
>>> model = RuleBoostingClassifier(num_rules=1, fit_intercept=True).fit(x, y)
>>> print(model.rules_str()) # doctest: +NORMALIZE_WHITESPACE
    -0.475 if  
    +0.675 if x1 >= 0.400 & x1 <= 0.600
>>> model.predict(x)
array([0, 0, 0, 1, 1, 1, 0, 0, 0])
>>> np.round(model.predict_proba(x)[:, 1], 2)
array([0.38, 0.38, 0.38, 0.55, 0.55, 0.55, 0.38, 0.38, 0.38])

Release files for ruleboost 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ruleboost 0.4.0
File Size Uploaded
ruleboost-0.4.0.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ruleboost 0.4.0
File Interpreter ABI Platform
ruleboost-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.6 kB

Release files / ruleboost-0.4.0.tar.gz

Download URL ruleboost-0.4.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9b873d21847ee69f140bf1dc750d1017161b03b2da222e0371cbaa7f29c5779f
BLAKE2b-256 checksum
How to use checksums
562dd275c5a3f0cd14ddaa74d2f1d40ea169541eda98436d4b2d6104ccf16ecb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release files / ruleboost-0.4.0-py3-none-any.whl

Download URL ruleboost-0.4.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7803324ae267ea21941853fd90f48f9b4660528ae723253b17984025396650e7
BLAKE2b-256 checksum
How to use checksums
854d73102ebbb54f3b01e26fd0bb972899c597098bea9ef62cb310bc750a40cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page