The `apply` function in the `sklearn.ensemble.GradientBoostingRegressor` class is used to obtain the leaf indices of the decision trees in the ensemble that were used to make predictions. It takes a data array as input and returns a numpy array containing the indices of the leaf nodes for each sample in the input data. This function is useful when we want to interpret or visualize the individual decisions made by the ensemble of decision trees.
Python GradientBoostingRegressor.apply - 17 examples found. These are the top rated real world Python examples of sklearn.ensemble.GradientBoostingRegressor.apply extracted from open source projects. You can rate examples to help us improve the quality of examples.