guide.GuideForestRegressor

class guide.GuideForestRegressor(*, kind='forest', n_estimators=100, max_samples=1.0, max_features=None, loss='squared_error', quantile=0.5, quantiles=(0.25, 0.75), node_model='constant', degree=2, stepwise_alpha=0.05, max_variables=None, backward=True, prediction_truncation='none', max_depth=10, min_samples_leaf=2, min_gain=1e-12, interactions=True, significance_level=0.1, max_split_candidates=100, pruning='none', cv_folds=10, cv_standard_errors=0.25, ccp_alpha=0.0, max_leaves=None, categorical_features=None, feature_roles=None, periodic_features=None, missing_flags=None, n_jobs=None, random_state=0)

Ensemble of GUIDE regression trees fitted to bootstrap samples.

Parameters:
kind{“forest”, “bagging”}, default=”forest”

"forest" samples max_features candidate split variables at each node and requires pruning="none". "bagging" considers every variable and allows "cost_complexity" or "max_leaves" pruning. Neither allows cross-validation pruning, because bootstrap samples repeat rows.

n_estimatorsint, default=100
max_samplesfloat, default=1.0

Bootstrap sample size as a fraction of the training rows.

max_featuresint or float, default=None

Split variables sampled per node: a count, or a fraction of the splitting features. By default a third of them, at least one.

The remaining parameters are those of :class:`GuideRegressor`, with
``pruning`` defaulting to ``”none”``. ``oob_loss_`` holds the mean
out-of-bag loss.
__init__(*, kind='forest', n_estimators=100, max_samples=1.0, max_features=None, loss='squared_error', quantile=0.5, quantiles=(0.25, 0.75), node_model='constant', degree=2, stepwise_alpha=0.05, max_variables=None, backward=True, prediction_truncation='none', max_depth=10, min_samples_leaf=2, min_gain=1e-12, interactions=True, significance_level=0.1, max_split_candidates=100, pruning='none', cv_folds=10, cv_standard_errors=0.25, ccp_alpha=0.0, max_leaves=None, categorical_features=None, feature_roles=None, periodic_features=None, missing_flags=None, n_jobs=None, random_state=0)

Methods

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

apply(X)

Terminal node ids, shape (n_samples, n_estimators).

fit(X, y[, sample_weight, exposure, ...])

Fit the model.

get_metadata_routing()

Get metadata routing of this object.

get_params([deep])

Get parameters for this estimator.

predict(X[, exposure])

Predicted response; Poisson models fitted with exposure need it here too.

score(X, y[, sample_weight])

Return coefficient of determination on test data.

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

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

set_params(**params)

Set the parameters of this estimator.

set_predict_request(*[, exposure])

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

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

oob_loss_

Mean out-of-bag loss, or None if no row is out of bag.