Skip to main content

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.

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

PyPI Downloads Documentation

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

genbooster-0.4.0-cp311-cp311-win_amd64.whl (254.7 kB view details)

Uploaded CPython 3.11Windows x86-64

genbooster-0.4.0-cp311-cp311-manylinux_2_34_x86_64.whl (407.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

genbooster-0.4.0-cp311-cp311-macosx_10_12_x86_64.whl (368.2 kB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

genbooster-0.4.0-cp310-cp310-win_amd64.whl (254.7 kB view details)

Uploaded CPython 3.10Windows x86-64

genbooster-0.4.0-cp310-cp310-manylinux_2_34_x86_64.whl (407.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

genbooster-0.4.0-cp310-cp310-macosx_10_12_x86_64.whl (368.1 kB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

genbooster-0.4.0-cp39-cp39-win_amd64.whl (255.2 kB view details)

Uploaded CPython 3.9Windows x86-64

genbooster-0.4.0-cp39-cp39-manylinux_2_34_x86_64.whl (408.4 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

genbooster-0.4.0-cp39-cp39-macosx_10_12_x86_64.whl (368.7 kB view details)

Uploaded CPython 3.9macOS 10.12+ x86-64

genbooster-0.4.0-cp38-cp38-win_amd64.whl (254.8 kB view details)

Uploaded CPython 3.8Windows x86-64

genbooster-0.4.0-cp38-cp38-manylinux_2_34_x86_64.whl (407.9 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.34+ x86-64

genbooster-0.4.0-cp38-cp38-macosx_10_12_x86_64.whl (368.6 kB view details)

Uploaded CPython 3.8macOS 10.12+ x86-64

File details

Details for the file genbooster-0.4.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: genbooster-0.4.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 254.7 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

Hashes for genbooster-0.4.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8d2340d6f198a53aaea61d4fed7e29082eb981fb8841a575710425d4c75d2cdb
MD5 44ad08e5afed330081a49369ba9f87a8
BLAKE2b-256 7c5f9b13787539079a333da0b951eb615e8515db306efdd62df15b4d8ac4da0a

See more details on using hashes here.

File details

Details for the file genbooster-0.4.0-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for genbooster-0.4.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 92e58f66f3c7752867a65a7fbcbdabdcf533ca0b0985687566b7c3181e01678b
MD5 9ac492eedf4eaa4b111328e632c2555f
BLAKE2b-256 fa72d56d78f9f4a8d32e80c218ef5b517a5758bd0b102508431cc26ec13aed8a

See more details on using hashes here.

File details

Details for the file genbooster-0.4.0-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for genbooster-0.4.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f39150d5790b3e7cc998559153a69de70ca9a27640e8f7b453bf9cf5e0916e30
MD5 ac16a62b692f84762fc6133d1e57f493
BLAKE2b-256 018e4b98cad49ac224eeaacbe5a3ed8e94921d81852ed73f43b2b3d1ef852f64

See more details on using hashes here.

File details

Details for the file genbooster-0.4.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: genbooster-0.4.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 254.7 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

Hashes for genbooster-0.4.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d8c7199c75d79eb941a3ea62b2f1655819a0729040a5c725b7f3b3242c00f853
MD5 115bf1ef66a7505cd7fa304376112546
BLAKE2b-256 915276832dac07127f4af5192f7ccb12cd69d47b8e04ec340b4739fa952f0450

See more details on using hashes here.

File details

Details for the file genbooster-0.4.0-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for genbooster-0.4.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0d9103bfb7fb167a1c6cd6b39bb617862129d8cca5a2c7cf58b92d79217ada38
MD5 974a77006e9c50567112a8765bb58bca
BLAKE2b-256 7422d6316429b39f3b3eaf99c3b5a804cbc8e83024f6add1feb2fe65c9a00423

See more details on using hashes here.

File details

Details for the file genbooster-0.4.0-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for genbooster-0.4.0-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2200cac8133714370249482f868b7cc5a9ad0d1241a97169a6216a3509b8be77
MD5 e1d97f30e27ac48f6c49b64206cf273d
BLAKE2b-256 86048fa787e9933218966a1dbfb17c7bb75d192904db3919124b7db91f2d423e

See more details on using hashes here.

File details

Details for the file genbooster-0.4.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: genbooster-0.4.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 255.2 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

Hashes for genbooster-0.4.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 050deb2f9a1ad9ba40779d58508927544cd323de36106684894972b788d71189
MD5 66127bd6c899166ba9433b07f663edd4
BLAKE2b-256 8cb5bbff866a66eb5bfb7b32bab55b9eecae4b8cd9b7781f31fae6197be36567

See more details on using hashes here.

File details

Details for the file genbooster-0.4.0-cp39-cp39-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for genbooster-0.4.0-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8fa2fbfa2e6083abe263d0397eddc38218ee36ded7c7f1cc5fae1e5a3f3e1951
MD5 47111080796479435eab5be39d9512e1
BLAKE2b-256 4ecfcbb52395657f323729d68caca9dda2b9cc4d83f0ca5f136fb6731d0fa401

See more details on using hashes here.

File details

Details for the file genbooster-0.4.0-cp39-cp39-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for genbooster-0.4.0-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 349c9c0c0d37d043ec3408b47a9145fbb7c676c0cfba1d4270f188616d7615bd
MD5 a98764613ba71eacaa7f822e352de90b
BLAKE2b-256 fb037dd07a612e426138b07913d1d0ede7b4eb9a0ab3c82360bb662d3f8a0cbd

See more details on using hashes here.

File details

Details for the file genbooster-0.4.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: genbooster-0.4.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 254.8 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

Hashes for genbooster-0.4.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 a7060ead855a608bfdd4b040dab3893e331a78a475b1a3d275e280ba44c0585d
MD5 7a0f52969f5ce9394a2dccd5455d1135
BLAKE2b-256 4da6ebe1f58685ba1002fffacec31a5779fdb191a38e36ff09f5a80d3424f8cd

See more details on using hashes here.

File details

Details for the file genbooster-0.4.0-cp38-cp38-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for genbooster-0.4.0-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a7d3d81507688a9966e0a38af1dcbae85fc50a10aa91616c385c9c8eb9ee586d
MD5 417a092c137ea8d61c114563fd43470e
BLAKE2b-256 4d823028d298ad048ea1b52d63a22a39b4848b3723b51fd9c87e97c67465c9c1

See more details on using hashes here.

File details

Details for the file genbooster-0.4.0-cp38-cp38-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for genbooster-0.4.0-cp38-cp38-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ef6098af1bd9060d0acbce2e8679dcea8958933afbb1e466562c15844ada0688
MD5 b26a35ad61f75501572392d0f42e9f77
BLAKE2b-256 6e2f1a56920886586e588dcc684e7ab28508a734544bacb1fb2475c0c250448b

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