HistGradientBoostingRegressor
#include <Skigen/Ensemble>
template <typename Scalar = double>
class Skigen::HistGradientBoostingRegressor(loss=Loss::SquaredError, learning_rate=0.1, max_iter=100, max_leaf_nodes=31, max_depth=std::nullopt, min_samples_leaf=20, l2_regularization=0, max_bins=255, categorical_features=std::nullopt, monotonic_cst=std::nullopt, early_stopping=false, validation_fraction=0.1, n_iter_no_change=10, tol=1e-7, random_state=std::nullopt)
Histogram-based Gradient Boosting for regression.
Bins each feature into at most max_bins quantile-based buckets up front, then runs stage-wise additive gradient boosting on the binned representation. The binning step is what gives sklearn's HistGradientBoostingRegressor its scaling advantage on large datasets — split candidates collapse from n_samples distinct thresholds per feature down to max_bins.
Mirrors sklearn.ensemble.HistGradientBoostingRegressor for the squared-error loss case.
Attributes:
-
loss : Loss
-
learning_rate : Scalar
-
max_iter : int
-
max_bins : int
-
init : Scalar
-
n_iter : int
-
bin_edges : const std::vector< std::vector< Scalar > > &
-
train_score : VectorType
Methods
SKIGEN_PARAMS()
fit(X, y)
Fit natively from a sparse design matrix.
The sparse input is binned directly into the compact uint8 histogram representation without ever materialising a dense double matrix (sklearn's HistGB likewise always operates on a dense uint8 binned matrix). Implicit zeros are binned as the value-0 bin.
fit_from_binned(X_binned, y)
predict(X)
predict(X)
Predict from a sparse design matrix without densifying.