Skip to main content

Genbooster

A gradient boosting and bagging (RandomBagClassifier, similar to RandomForestClassifier) implementation using Rust and Python. Any base learner can be employed. Base learners input features are engineered using a randomized artificial neural network layer.

For more details, see also https://www.researchgate.net/publication/386212136_Scalable_Gradient_Boosting_using_Randomized_Neural_Networks.

PyPI Downloads Documentation

1 - Installation

From PyPI:

pip install genbooster

From GitHub:

pip install git+https://github.com/Techtonique/genbooster.git

It might be required to install Rust and Cargo first (normally, it isn't, and you can skip this step):

Command line:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

Python:

import os
os.environ['PATH'] = f"/root/.cargo/bin:{os.environ['PATH']}"

Command line:

echo $PATH
rustc --version
cargo --version

2 - Usage

2.1 - Boosting

import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
from sklearn.utils.discovery import all_estimators
from sklearn.datasets import load_iris, load_breast_cancer, load_wine
from sklearn.linear_model import Ridge, RidgeCV
from sklearn.tree import ExtraTreeRegressor
from sklearn.model_selection import train_test_split
from genbooster.genboosterclassifier import BoosterClassifier
from genbooster.randombagclassifier import RandomBagClassifier

X, y = load_iris(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
clf = BoosterClassifier(base_estimator=ExtraTreeRegressor())
clf.fit(X_train, y_train)
preds = clf.predict(X_test)
print(np.mean(preds == y_test))

2.2 - Bagging (RandomBagClassifier, similar to RandomForestClassifier)

clf = RandomBagClassifier(base_estimator=ExtraTreeRegressor())
clf.fit(X_train, y_train)
preds = clf.predict(X_test)
print(np.mean(preds == y_test))

Release files for genbooster 0.6.8

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

Built distributions (wheels)

Table of built distributions (wheels) for genbooster 0.6.8
File
genbooster-0.6.8-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
genbooster-0.6.8-cp311-cp311-manylinux_2_34_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.34+ x86-64 Details
genbooster-0.6.8-cp311-cp311-macosx_10_12_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.12+ x86-64 Details
genbooster-0.6.8-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
genbooster-0.6.8-cp310-cp310-manylinux_2_34_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.34+ x86-64 Details
genbooster-0.6.8-cp310-cp310-macosx_10_12_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.12+ x86-64 Details
genbooster-0.6.8-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
genbooster-0.6.8-cp39-cp39-manylinux_2_34_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.34+ x86-64 Details
genbooster-0.6.8-cp39-cp39-macosx_10_12_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.12+ x86-64 Details
genbooster-0.6.8-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
genbooster-0.6.8-cp38-cp38-manylinux_2_34_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.34+ x86-64 Details
genbooster-0.6.8-cp38-cp38-macosx_10_12_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.12+ x86-64 Details

Total release size: 4.3 MB

Release files / genbooster-0.6.8-cp311-cp311-win_amd64.whl

Download URL genbooster-0.6.8-cp311-cp311-win_amd64.whl
Size 270.5 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
fecac5ad11013bd056f7b793aed120fb637ca4e5d883999e54236398b2794f2c
BLAKE2b-256 checksum
How to use checksums
80747563441bfe460aa8fed340afe6d3f864b49f235aff4de8457f59a4adbce2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / genbooster-0.6.8-cp311-cp311-manylinux_2_34_x86_64.whl

Download URL genbooster-0.6.8-cp311-cp311-manylinux_2_34_x86_64.whl
Size 427.3 kB
Tags CPython 3.11 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
be1fc7cc407d3badbcfae046b5e6c77267b584c6abe5b7ccf3d30f10a056f680
BLAKE2b-256 checksum
How to use checksums
8ea5adc68507600bd042df90d56317167d8a75cd03159f779b00ebb5fe3351d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / genbooster-0.6.8-cp311-cp311-macosx_10_12_x86_64.whl

Download URL genbooster-0.6.8-cp311-cp311-macosx_10_12_x86_64.whl
Size 386.0 kB
Tags CPython 3.11 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
be8651ccfe3873dc1ec25048b38c7b381b52b03bf26d366abdb18155a693b43a
BLAKE2b-256 checksum
How to use checksums
8953c15ad72cf1ab66106ee4009b3ec8495bb15d1bc6f99539088741244c1725
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / genbooster-0.6.8-cp310-cp310-win_amd64.whl

Download URL genbooster-0.6.8-cp310-cp310-win_amd64.whl
Size 270.5 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
470e12cad5bc8b591f3e7b14329d53c3306fbd0153f21792e8efe6a6dcb59512
BLAKE2b-256 checksum
How to use checksums
fe73a401d23bd7fdd62f0e90cc323eaf5f5ee409ffa5cbb7fa4ca4da8ac1d0ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / genbooster-0.6.8-cp310-cp310-manylinux_2_34_x86_64.whl

Download URL genbooster-0.6.8-cp310-cp310-manylinux_2_34_x86_64.whl
Size 427.1 kB
Tags CPython 3.10 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
fbd0805146f502513db0dcc6c7ef9e49cb171857a254074ab624c1400b4f7d7e
BLAKE2b-256 checksum
How to use checksums
255621d282bbdc729b3a1213617b9fe92881cecc6dbc1bd4d9cf2e66907a4eae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / genbooster-0.6.8-cp310-cp310-macosx_10_12_x86_64.whl

Download URL genbooster-0.6.8-cp310-cp310-macosx_10_12_x86_64.whl
Size 386.0 kB
Tags CPython 3.10 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
af59440d4e2f22ced5d5e4a679aafd63a0b364134c9170cff8c68a2aad1a6698
BLAKE2b-256 checksum
How to use checksums
79c0faf874d6de53311a611a8318d1f5c7701e5adae12a7167a7b222d11cd58d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / genbooster-0.6.8-cp39-cp39-win_amd64.whl

Download URL genbooster-0.6.8-cp39-cp39-win_amd64.whl
Size 271.3 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
e88fbd26db34f31d81f2eb564fe3d552a09c2493bee882245aa9c46961486018
BLAKE2b-256 checksum
How to use checksums
8aab71fd5809dc4b3dfe8b6f7267bf9b9f0fffa141120caabc4a6b9b0b820224
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / genbooster-0.6.8-cp39-cp39-manylinux_2_34_x86_64.whl

Download URL genbooster-0.6.8-cp39-cp39-manylinux_2_34_x86_64.whl
Size 426.7 kB
Tags CPython 3.9 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
d6fc94e18d708961f3a763b5015ccc112d26a128ce4d7224b7bda1bdc3caf9bf
BLAKE2b-256 checksum
How to use checksums
a21b1b4a37f83a7240753b7b73ce8d47fa7cfc7e1b96842ff7fc75ff3f07ff61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / genbooster-0.6.8-cp39-cp39-macosx_10_12_x86_64.whl

Download URL genbooster-0.6.8-cp39-cp39-macosx_10_12_x86_64.whl
Size 385.4 kB
Tags CPython 3.9 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
9b9cde8703f95920416bc198406287656f6923ac23267d5309ec7852aba624e0
BLAKE2b-256 checksum
How to use checksums
23b8f23dff21ce28e802233f9f4acfafcca3551939a41ddb0dda170ca4ec24a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / genbooster-0.6.8-cp38-cp38-win_amd64.whl

Download URL genbooster-0.6.8-cp38-cp38-win_amd64.whl
Size 270.4 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
d58c9989407b97b00ec101a24135e49da37eaaac79395b1ba90631547ce018ab
BLAKE2b-256 checksum
How to use checksums
f5b7b8ec03b0049d141781adbcbdc483230d68ff40e28e08d61fbfe193a58467
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / genbooster-0.6.8-cp38-cp38-manylinux_2_34_x86_64.whl

Download URL genbooster-0.6.8-cp38-cp38-manylinux_2_34_x86_64.whl
Size 427.6 kB
Tags CPython 3.8 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
6b714ae936355a33600fa051cd63119b86b9b9af394dd781439dfe6fb3de73ac
BLAKE2b-256 checksum
How to use checksums
4123d7040e778f27997e914e4fdfc55428dfdd455e87f857bdd91d1ea5a6faf5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / genbooster-0.6.8-cp38-cp38-macosx_10_12_x86_64.whl

Download URL genbooster-0.6.8-cp38-cp38-macosx_10_12_x86_64.whl
Size 386.1 kB
Tags CPython 3.8 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
f58623b61cd662503e903d40e77478b84fea7d52d22bd20a5498305beec31f53
BLAKE2b-256 checksum
How to use checksums
2bae31317cc1c429b320e6926be0872fa5f4e789b29340a2df19df18c5171302
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.6.8 This release

12 release files

0.6.1

1 release file

0.5.1

12 release files

0.5.0

12 release files

0.4.0

12 release files

0.3.0

12 release files

0.2.0

12 release files

0.1.1

12 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