Implementation:Interpretml Interpret Boost
| Field | Value |
|---|---|
| Sources | InterpretML |
| Domains | Machine_Learning, Ensemble_Methods |
| Last Updated | 2026-02-07 12:00 GMT |
Overview
Boost is a concrete tool for running the cyclic gradient boosting training loop provided by the InterpretML library.
Description
The boost function executes the core EBM training loop for a single outer bag. It creates a native C++ booster, runs cyclic round-robin boosting across all terms, applies early stopping based on inner bag validation, and returns the learned score tensor updates. This function is called once per outer bag during parallel training. The cyclic boosting approach iterates over each term (feature or interaction) in round-robin fashion, fitting a single boosting step to the residuals for that term before moving to the next. Early stopping is determined using inner validation bags held out within each outer bag.
Usage
Import this function when implementing custom EBM training loops or understanding the internal training mechanism. It is normally called by the EBM fit() method via joblib parallel execution.
Code Reference
Source Location
- Repository
interpretml/interpret- File
python/interpret-core/interpret/glassbox/_ebm/_boost.py- Lines
- 28--396
Signature
def boost(
shm_name,
bag_idx,
callback,
dataset,
intercept_rounds,
intercept_learning_rate,
intercept,
bag,
init_scores,
term_features,
n_inner_bags,
term_boost_flags,
learning_rate,
min_samples_leaf,
min_hessian,
reg_alpha,
reg_lambda,
max_delta_step,
gain_scale,
min_cat_samples,
cat_smooth,
missing,
max_leaves,
monotone_constraints,
greedy_ratio,
cyclic_progress,
smoothing_rounds,
nominal_smoothing,
max_rounds,
early_stopping_rounds,
early_stopping_tolerance,
noise_scale,
bin_weights,
rng,
create_booster_flags,
objective,
acceleration,
experimental_params,
develop_options,
):
Import
from interpret.glassbox._ebm._boost import boost
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
shm_name |
str | Yes | Shared memory name for the dataset |
bag_idx |
int | Yes | Outer bag index |
callback |
callable | Yes | Progress callback function |
dataset |
str / ndarray | Yes | Compressed training data |
intercept_rounds |
int | Yes | Number of intercept boosting rounds |
intercept_learning_rate |
float | Yes | Learning rate for intercept fitting |
intercept |
ndarray | Yes | Initial intercept values |
bag |
ndarray | Yes | Sample bag assignments |
init_scores |
ndarray / None | No | Initial prediction scores |
term_features |
list | Yes | Feature indices per term |
n_inner_bags |
int | Yes | Number of inner validation bags |
learning_rate |
float | Yes | Boosting step size |
max_rounds |
int | Yes | Maximum boosting iterations |
early_stopping_rounds |
int | Yes | Patience for early stopping |
early_stopping_tolerance |
float | Yes | Tolerance for early stopping |
max_leaves |
int / list | Yes | Tree complexity per term |
noise_scale |
float / None | No | Differential privacy noise scale |
bin_weights |
list | Yes | Bin weight tensors |
objective |
str | Yes | Learning objective function |
Note: Additional parameters control regularization (reg_alpha, reg_lambda, max_delta_step), categorical handling (min_cat_samples, cat_smooth), monotone constraints, smoothing, and experimental options. See the full signature above for the complete list.
Outputs
| Index | Name | Type | Description |
|---|---|---|---|
| 0 | exception | Optional[Exception] | Any exception raised during boosting, or None on success |
| 1 | intercept | ndarray | Updated intercept array |
| 2 | term_scores | dict | Dictionary mapping term index to score tensor ({term_idx: score_tensor}) |
| 3 | best_iteration | int | Best boosting iteration (determined by early stopping) |
| 4 | rng | object | Updated random number generator state |
Usage Examples
Typical Usage via EBM
# boost() is typically called internally by EBM's fit() method via joblib:
# from joblib import Parallel, delayed
# results = Parallel(n_jobs=n_jobs)(
# delayed(boost)(shm_name, bag_idx, ...) for bag_idx in range(n_outer_bags)
# )
# Direct usage requires a compressed dataset and many parameters.
# See ExplainableBoostingClassifier.fit() for the standard entry point.
from interpret.glassbox import ExplainableBoostingClassifier
ebm = ExplainableBoostingClassifier()
ebm.fit(X_train, y_train) # Calls boost() internally