guide.GuideBoostingClassifier

class guide.GuideBoostingClassifier(*, n_estimators=100, learning_rate=0.1, max_depth=3, min_samples_leaf=2, min_child_weight=1.0, reg_lambda=1.0, gamma=0.0, subsample=1.0, max_features=None, early_stopping_rounds=None, interactions=True, significance_level=0.1, max_split_candidates=100, categorical_features=None, feature_roles=None, periodic_features=None, missing_flags=None, n_jobs=None, random_state=0)

Gradient-boosted GUIDE classification trees (experimental).

Logistic loss for two classes, softmax with one tree per class and round otherwise. Boosting is a guide-rs extension, not part of GUIDE; its variable selection and defaults may change between releases.

Each split variable is chosen by score tests of the gradients against each predictor’s bins, which keep GUIDE’s unbiased variable selection; the split point maximizes the second-order (Newton) gain.

Parameters:
n_estimatorsint, default=100

Maximum number of boosting rounds. Multiclass models fit one tree per class in each round.

learning_ratefloat, default=0.1

Shrinkage applied to every leaf value.

max_depthint, default=3

Depth of each tree; boosted trees are not pruned.

min_samples_leafint, default=2
min_child_weightfloat, default=1.0

Minimum sum of loss Hessians (times sample weights) in a child.

reg_lambdafloat, default=1.0

L2 penalty on leaf values.

gammafloat, default=0.0

Minimum gain to split.

subsamplefloat, default=1.0

Fraction of rows sampled without replacement for each round.

max_featuresint or float, default=None

Split variables sampled at each node; by default all.

early_stopping_roundsint, default=None

Stop when the loss on validation_data (passed to fit) has not improved for this many rounds, and keep the best round.

interactions, significance_level, max_split_candidates, categorical_features, feature_roles, periodic_features, missing_flags, n_jobs, random_state

As in GuideRegressor. After the first round the chi-square statistics rank variables; they are not significance tests.

__init__(*, n_estimators=100, learning_rate=0.1, max_depth=3, min_samples_leaf=2, min_child_weight=1.0, reg_lambda=1.0, gamma=0.0, subsample=1.0, max_features=None, early_stopping_rounds=None, interactions=True, significance_level=0.1, max_split_candidates=100, categorical_features=None, feature_roles=None, periodic_features=None, missing_flags=None, n_jobs=None, random_state=0)

Methods

__init__(*[, n_estimators, learning_rate, ...])

apply(X)

Terminal node ids, shape (n_samples, n_trees).

fit(X, y[, sample_weight, validation_data])

Fit the model.

get_metadata_routing()

Get metadata routing of this object.

get_params([deep])

Get parameters for this estimator.

predict(X)

Predicted class labels (cost-minimizing when costs are given).

predict_proba(X)

Class probabilities in the order of classes_.

score(X, y[, sample_weight])

Return accuracy on provided data and labels.

set_fit_request(*[, sample_weight, ...])

Configure whether metadata should be requested to be passed to the fit method.

set_params(**params)

Set the parameters of this estimator.

set_score_request(*[, sample_weight])

Configure whether metadata should be requested to be passed to the score method.

to_dot()

The fitted model in Graphviz DOT format.

to_json()

The fitted model in the format saved by the guide-rs CLI.

to_text()

The fitted model as indented text.

Attributes

n_estimators_

Boosting rounds kept; with early stopping, the best validation round.