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.

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(), 
                        n_hidden_features=10)
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(), 
                        n_hidden_features=10)
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.2.0-cp311-cp311-win_amd64.whl (199.4 kB view details)

Uploaded CPython 3.11Windows x86-64

genbooster-0.2.0-cp311-cp311-manylinux_2_34_x86_64.whl (346.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

genbooster-0.2.0-cp311-cp311-macosx_10_12_x86_64.whl (309.5 kB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

genbooster-0.2.0-cp310-cp310-win_amd64.whl (199.4 kB view details)

Uploaded CPython 3.10Windows x86-64

genbooster-0.2.0-cp310-cp310-manylinux_2_34_x86_64.whl (345.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

genbooster-0.2.0-cp310-cp310-macosx_10_12_x86_64.whl (309.4 kB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

genbooster-0.2.0-cp39-cp39-win_amd64.whl (200.0 kB view details)

Uploaded CPython 3.9Windows x86-64

genbooster-0.2.0-cp39-cp39-manylinux_2_34_x86_64.whl (346.5 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

genbooster-0.2.0-cp39-cp39-macosx_10_12_x86_64.whl (309.8 kB view details)

Uploaded CPython 3.9macOS 10.12+ x86-64

genbooster-0.2.0-cp38-cp38-win_amd64.whl (199.4 kB view details)

Uploaded CPython 3.8Windows x86-64

genbooster-0.2.0-cp38-cp38-manylinux_2_34_x86_64.whl (346.2 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.34+ x86-64

genbooster-0.2.0-cp38-cp38-macosx_10_12_x86_64.whl (309.9 kB view details)

Uploaded CPython 3.8macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: genbooster-0.2.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 199.4 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for genbooster-0.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 837c8c4773b4765fd4c82bca3e8bc5c1ba1f0e84ad435d3472a54e68351551a0
MD5 9fb7cce9c74ce0b52ec39eab0bedcf6e
BLAKE2b-256 27ac9a947013ae296a94907578b64f540d2eb48820763a5bf68acee7e5f7e8a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for genbooster-0.2.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 7807f55c5c7582ede6c4236df8d570249bdca918f6eb51c6a5252a841849ed66
MD5 ab6fb555b0ed7a764fa33d1e10e909de
BLAKE2b-256 d8bd50ae3c7cc22758b284b2f7a5eddd2f4118a21a663dc843fca69aab703f0e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for genbooster-0.2.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 85380277da892d9ae877c86bd0585097ae24243dc141d9e3e31b8edd2f2ca628
MD5 2c045e5b03a4458302b1c9d3725d1fb9
BLAKE2b-256 6ef87505edbc5dc51d062535e02a7fe87fe4d2a79490027bf7e8e5a59a331a1c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: genbooster-0.2.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 199.4 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for genbooster-0.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 811d21d05cb8a626457670b19417c358c526b9065f026628a3ba8be5b3acb0de
MD5 de0de15575f3d70bf234120839a073ba
BLAKE2b-256 7b3b7cc1470aa858d51300e5c7ac4f2a95fb0343376361bc99d17ed51f3244cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for genbooster-0.2.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1de58e9a2f27ad535178da6417e874decc4989de899fd9eb8d19c1a6dca2bd68
MD5 007cb71f0fa18f0a4917a35f30a0fb26
BLAKE2b-256 7541392b27a5c464924f2d8cdf57ef6e27f0640f84031a098fa28121bd22b9ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for genbooster-0.2.0-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 54f255ecd21d8c8e6223192e72b99b351ac369b2c7401c8bae29d3a61c11b531
MD5 4653f14e8bce6f6c1ed41d69c6b738a7
BLAKE2b-256 e42b16f1bed7a5b8c3fc88f683f003d09278eb345d008656fbddf13b0c30dc32

See more details on using hashes here.

File details

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

File metadata

  • Download URL: genbooster-0.2.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 200.0 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for genbooster-0.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7f83b901c7cc2b6a63e88739015610f603b4d87e19136806b02e577f192c70a2
MD5 f4d72bacdc424621b821bbd8a6578801
BLAKE2b-256 1367342d299417cc5a9b3673d7bb4f7f2e3289385ecbd1100239fb8985b37d64

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for genbooster-0.2.0-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 440685607d250cffadd3dfd3b9a234c9c6185b928070cd2c4ed2544fb7195d62
MD5 17040a24799a6a8b722f7d6faf3843ba
BLAKE2b-256 e61a5d73dabc5b36d4c3426b3a6f32a304ba6ec3c2718a19d052576fbe7061c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for genbooster-0.2.0-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8c19752fcadffe680adb8848f5968016bbc8fdc745dece239265817f7eb2e384
MD5 6c6f3a506e77da6408e82610376ad198
BLAKE2b-256 bf7d477defea5c22e53b0daf2519a4a5e959ac8874032600e7d3c454fde42c36

See more details on using hashes here.

File details

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

File metadata

  • Download URL: genbooster-0.2.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 199.4 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for genbooster-0.2.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 4eee72d5315c7ddff5916fdf027b6759ace2efd6015844ba05891a4a819af0fb
MD5 eada72bf79a34e36457bc511095e12fa
BLAKE2b-256 2600faca63e0c984b0d11b178bc9d97593bc4aa8fc6a9564b2cd92119c91963a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for genbooster-0.2.0-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c4f1701a91dcc01661b28cb7f034fe832d582ca7a83c463d7673bd2e21cd4b81
MD5 252b57acc4b2f7c7806ee210ffc67b0e
BLAKE2b-256 4204bf1efb9974aad25e989d79814b06c3d9597224c951448fbcbdaa4471aac4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for genbooster-0.2.0-cp38-cp38-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9ff973b2d0558e83c71e7f8c6216c7c276d6f48c87de57d8471e70b805a8920f
MD5 9a98a4b9f1ec0897da041ac5407bb11f
BLAKE2b-256 94588aad948eed32542e3a0b9fbfb28d38d63e2dc442f1053ce3f8fe3503fb81

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