Python API

Data Structure API

Dataset(data[, label, reference, weight, ...])

Dataset in LightGBM.

Booster([params, train_set, model_file, ...])

Booster in LightGBM.

CVBooster()

CVBooster in LightGBM.

Sequence()

Generic data access interface.

Training API

train(params, train_set[, num_boost_round, ...])

Perform the training with given parameters.

cv(params, train_set[, num_boost_round, ...])

Perform the cross-validation with given parameters.

Scikit-learn API

LGBMModel([boosting_type, num_leaves, ...])

Implementation of the scikit-learn API for LightGBM.

LGBMClassifier([boosting_type, num_leaves, ...])

LightGBM classifier.

LGBMRegressor([boosting_type, num_leaves, ...])

LightGBM regressor.

LGBMRanker([boosting_type, num_leaves, ...])

LightGBM ranker.

Dask API

New in version 3.2.0.

DaskLGBMClassifier([boosting_type, ...])

Distributed version of lightgbm.LGBMClassifier.

DaskLGBMRegressor([boosting_type, ...])

Distributed version of lightgbm.LGBMRegressor.

DaskLGBMRanker([boosting_type, num_leaves, ...])

Distributed version of lightgbm.LGBMRanker.

Callbacks

early_stopping(stopping_rounds[, ...])

Create a callback that activates early stopping.

log_evaluation([period, show_stdv])

Create a callback that logs the evaluation results.

record_evaluation(eval_result)

Create a callback that records the evaluation history into eval_result.

reset_parameter(**kwargs)

Create a callback that resets the parameter after the first iteration.

Plotting

plot_importance(booster[, ax, height, xlim, ...])

Plot model's feature importances.

plot_split_value_histogram(booster, feature)

Plot split value histogram for the specified feature of the model.

plot_metric(booster[, metric, ...])

Plot one metric during training.

plot_tree(booster[, ax, tree_index, ...])

Plot specified tree.

create_tree_digraph(booster[, tree_index, ...])

Create a digraph representation of specified tree.

Utilities

register_logger(logger)

Register custom logger.