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)
| File | Size | Uploaded | |
|---|---|---|---|
| ruleboost-0.4.0.tar.gz | 5.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|