New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gbt

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gbt

A gradient boosted tree library with automatic feature engineering.

  • 0.2
  • PyPI
  • Socket score

Maintainers
1

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.

Install

pip install gbt

Quickstart

class DatasetBuilder:
    def training_dataset(self):
        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],
            }
        )
        return df
    
    def testing_dataset(self):
        return self.training_dataset()

TrainingPipeline(
    params_preset="binary",  # one of mape, l2, binary, multiclass
    params_override={"num_leaves": 10},
    label_column="c",
    val_size=0.2,  # fraction of the validation split
    categorical_feature_columns=["b"],
    numerical_feature_columns=["a"],
).fit(DatasetBuilder())

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc