Python Package

Below is the official documentation of the Python package. See also the Python package GitHub page for more information on the Python package (e.g., installation and examples).

GPModel, booster, and data structure

GPModel([likelihood, group_data, ...])

Class for random effects model (Gaussian process, grouped random effects, mixed effects models, etc.)

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

Class for boosting model in GPBoost.

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

Dataset in GPBoost.

GPBoost Algorithm Training and Choosing Tuning Parameters

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

Training function.

grid_search_tune_parameters(param_grid, ...)

Function that allows for choosing tuning parameters from a grid in a determinstic or random way using cross validation or validation data sets.

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

Perform cross-validation for choosing number of boosting iterations.

Scikit-learn API

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

Implementation of the scikit-learn API for GPBoost.

GPBoostClassifier([boosting_type, ...])

GPBoost classifier.

GPBoostRegressor([boosting_type, ...])

GPBoost regressor.

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

GPBoost ranker.

Various

Callbacks

early_stopping(stopping_rounds[, ...])

Create a callback that activates early stopping.

print_evaluation([period, show_stdv])

Create a callback that prints 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.

get_nested_categories(outer_var, inner_var)

Auxiliary function to create categorical variables for nested grouped random effects.

CVBooster()

CVBooster in GPBoost.