Skip to main content

A gradient boosted tree library with minimal coding required.

Project description

gbt is a library for gradient boosted trees with minimal coding required. It is a thin wrapper around lightgbm. Give it a pandas.Dataframe, gbt.train() takes care of feature transforms (e.g. scaling for numerical features, label encoding for categorical features) and metrics print outs.

Example usage:

import pandas as pd
import gbt

df = pd.DataFrame({
    "a": [1, 2, 3, 4, 5, 6, 7],
    "b": ["a", "b", "c", None, "e", "f", "g"],
    "c": [1, 0, 1, 1, 0, 0, 1],
    "some_other_column": [0, 0, None, None, None, 3, 3]
})
train(
    df,
    recipe="binary",
    label_column="c",
    val_size=0.2,  # fraction of the validation split
    categorical_feature_columns=["b"],
    numerical_feature_columns=["a"],
)

Supported "recipes": mape, l2, l2_rf, binary, multiclass.

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

gbt-0.1.tar.gz (10.5 kB view hashes)

Uploaded Source

Built Distribution

gbt-0.1-py3-none-any.whl (12.3 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