A fast boosting implementation using Rust and Python
Project description
Genbooster
A fast 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.
1 - Installation
pip install genbooster
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))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file genbooster-0.3.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: genbooster-0.3.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 200.1 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50e292d63ffc476777f243415c80a4f9ac6d3788fa5d7c7e6191c53d416794a9
|
|
| MD5 |
c00235a16786794087b08c7b36bf17c2
|
|
| BLAKE2b-256 |
9379362f88b4a6da3b3f547f5da5a1c49897a3d3dff83e2e57011557e0888061
|
File details
Details for the file genbooster-0.3.0-cp311-cp311-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: genbooster-0.3.0-cp311-cp311-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 346.5 kB
- Tags: CPython 3.11, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cc23b0360d7bcec7c9893bbcd573708a124739a1c4173dbd37320c9985f5c75
|
|
| MD5 |
c23fb9b4004191f520ebed7042bbe095
|
|
| BLAKE2b-256 |
8ac79513dad43c53ebba09d4ffce7f4ba867f19f97223dae1fa8c1c5d294109b
|
File details
Details for the file genbooster-0.3.0-cp311-cp311-macosx_10_12_x86_64.whl.
File metadata
- Download URL: genbooster-0.3.0-cp311-cp311-macosx_10_12_x86_64.whl
- Upload date:
- Size: 310.1 kB
- Tags: CPython 3.11, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
480e808345736a05b6076e2bad60d14be2da7606a43a7ea1aa38c8d77788b627
|
|
| MD5 |
1ad3410c10e89fe65e00065c43a8d6de
|
|
| BLAKE2b-256 |
ce873a4321b145650921ef60bdf024aa9b58acae30ccb06d35e606f6d73740b7
|
File details
Details for the file genbooster-0.3.0-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: genbooster-0.3.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 200.1 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecea9890fb1baeefca83424d17933b569504938fa96183038b53d87944d45d76
|
|
| MD5 |
459d6df78766b61f1a6d5826877ca97a
|
|
| BLAKE2b-256 |
4af4db35d89d1a32107fa4f22e5846646ca9223cf6b08bf90038f8f15b62ff82
|
File details
Details for the file genbooster-0.3.0-cp310-cp310-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: genbooster-0.3.0-cp310-cp310-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 346.4 kB
- Tags: CPython 3.10, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec334bbc94537a161eeab2ea85ac74b28809e31155b4b99ed9b1e219f1e90f83
|
|
| MD5 |
bc8dbebdab4d3ba77a350d6a9e96b97d
|
|
| BLAKE2b-256 |
022d7c2f6cb736eed7363a3cd263323eeccdca149b10de5140a3461cf512c071
|
File details
Details for the file genbooster-0.3.0-cp310-cp310-macosx_10_12_x86_64.whl.
File metadata
- Download URL: genbooster-0.3.0-cp310-cp310-macosx_10_12_x86_64.whl
- Upload date:
- Size: 310.0 kB
- Tags: CPython 3.10, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76b8d7ba5c776420ba1182dfb444a94fce6dfb0fdf4c7221f94d71a23ce61c06
|
|
| MD5 |
f97e1c5fe41e821d1c3f489e9ffa6e19
|
|
| BLAKE2b-256 |
fdeeec7178eb2f75578c2c9b964469a22f0db2d3270c882df471d083baa4db03
|
File details
Details for the file genbooster-0.3.0-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: genbooster-0.3.0-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 200.6 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6741b27c1e493a5cd864dcda78ebb85c73b6e47767f2761269efe8260cc8ab8f
|
|
| MD5 |
a496416a3844deb96c7b4fbc9e8a2c7f
|
|
| BLAKE2b-256 |
e468251f00e5bed95a5c656282dc97882d497b4bcbfe06be112e1563c8b1fa02
|
File details
Details for the file genbooster-0.3.0-cp39-cp39-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: genbooster-0.3.0-cp39-cp39-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 346.9 kB
- Tags: CPython 3.9, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c239e1492e9db2f172b226119692b4633d96f711a123de10c6ae8564cb0f251c
|
|
| MD5 |
84cc1ed522353d1fc82436d34e4cc29b
|
|
| BLAKE2b-256 |
d9652363ca36859bc4eb5d5ad77f5287548c8e5832955dc485ceeb117903f27c
|
File details
Details for the file genbooster-0.3.0-cp39-cp39-macosx_10_12_x86_64.whl.
File metadata
- Download URL: genbooster-0.3.0-cp39-cp39-macosx_10_12_x86_64.whl
- Upload date:
- Size: 310.4 kB
- Tags: CPython 3.9, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9ffd66a10d7e1526a522fe302f7f1d6cff3340cecda745eb49b57c2f31c25cd
|
|
| MD5 |
38214f1bb8ca9bfd2ee5996e4a3ca6ee
|
|
| BLAKE2b-256 |
697fbfaef12b7e0d55ffc51b5465629ec7b0951e293393b2314d093520cd9d9d
|
File details
Details for the file genbooster-0.3.0-cp38-cp38-win_amd64.whl.
File metadata
- Download URL: genbooster-0.3.0-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 200.0 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe2189a8a97731f9bdf9c7ebe5512e04b3875c34feaead85cf4ddfbe344a5078
|
|
| MD5 |
6cc15d9f503a70fc115f7d9f514593a3
|
|
| BLAKE2b-256 |
0aed4c335145919c7c73a326f1732ae9f8b9ee63cf000b1f0e3f4c17119b9afa
|
File details
Details for the file genbooster-0.3.0-cp38-cp38-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: genbooster-0.3.0-cp38-cp38-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 346.7 kB
- Tags: CPython 3.8, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b804707d1846d7044e9d19699477b5b5e330779b215c0bdefc8ebd170ba2668
|
|
| MD5 |
2487018f4a0b9ec9338a2d914ed417b6
|
|
| BLAKE2b-256 |
1b9dc74ddedee1cc5505f15d0f8c3f193bcc60f2413dcc9be500ddbdff65e7b1
|
File details
Details for the file genbooster-0.3.0-cp38-cp38-macosx_10_12_x86_64.whl.
File metadata
- Download URL: genbooster-0.3.0-cp38-cp38-macosx_10_12_x86_64.whl
- Upload date:
- Size: 310.5 kB
- Tags: CPython 3.8, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3010d165de861c3f31e1826b83afcfbf28d660de9bc822b0bd402c686f42b73f
|
|
| MD5 |
f808b21d9877bc3daff3bc1a7e815cc3
|
|
| BLAKE2b-256 |
fa3e46e94ed91b343629dc2da62e2e9c1de37e34b1356d140c61a73ce50e6034
|