Skip to main content

scikit-learn compatible tools to work with GBM models

Project description

scikit-gbm

scikit-learn compatible tools to work with GBM models

Installation

pip install scikit-gbm

# or 

pip install git+https://github.com/krzjoa/scikit-gbm.git

Usage

For the moment, the only available class is GBMFeaturezier. It's a wrapper around scikit-learn GBMs, XGBoost, LightGBM and CatBoost models.

# Classification
from sklearn.datasets import make_classification
from sklearn.pipeline import Pipeline
from sklearn.linear_model import LogisticRegression

from skgbm.preprocessing import GBMFeaturizer
from xgboost import XGBClassifier

X, y = make_classification()
# train_test_split

pipeline = \
    Pipeline([
        ('gbm_featurizer', GBMFeaturizer(XGBClassifier())),
        ('logistic_regression', LogisticRegression())
    ])

# Try also:
# ('gbm_featurizer', GBMFeaturizer(GradientBoostingClassifier())),
# ('gbm_featurizer', GBMFeaturizer(LGBMClassifier())),
# ('gbm_featurizer', GBMFeaturizer(CatBoostClassifier())),


# Regression

Project details


Download files

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

Source Distribution

scikit-gbm-0.0.1.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

scikit_gbm-0.0.1-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page