sega_learn.trees.adaBoostRegressor

 
Modules
       
inspect
numpy

 
Classes
       
builtins.object
AdaBoostRegressor

 
class AdaBoostRegressor(builtins.object)
    AdaBoostRegressor(base_estimator=None, n_estimators=50, learning_rate=1.0, loss='linear', random_state=None, max_depth=3, min_samples_split=2)
 
AdaBoost regressor.
 
Builds an additive model by sequentially fitting weak regressors (default: decision trees)
on modified versions of the data. The weights of instances are adjusted at each iteration
so that subsequent regressors focus more on instances with larger errors.
 
Uses the AdaBoost.R2 algorithm.
 
Attributes:
    base_estimator_ (object): The base estimator template used for fitting.
    n_estimators (int): The maximum number of estimators at which boosting is terminated.
    learning_rate (float): Contribution of each regressor to the final prediction.
    loss (str): The loss function to use when updating the weights ('linear', 'square', 'exponential').
    estimators_ (list): The collection of fitted base estimators.
    estimator_weights_ (np.ndarray): Weights for each estimator (alpha values, specifically log(1/beta)).
    estimator_errors_ (np.ndarray): Loss value for each estimator on the weighted training data.
 
  Methods defined here:
__init__(self, base_estimator=None, n_estimators=50, learning_rate=1.0, loss='linear', random_state=None, max_depth=3, min_samples_split=2)
Initialize the AdaBoostRegressor.
 
Args:
    base_estimator (object, optional): The base estimator from which the boosted ensemble is built.
                                      Support for sample weighting is required. If None, then
                                      the base estimator is DecisionTreeRegressor(max_depth=3).
    n_estimators (int, optional): The maximum number of estimators. Defaults to 50.
    learning_rate (float, optional): Shrinks the contribution of each regressor by learning_rate. Defaults to 1.0.
    loss (str, optional): The loss function to use when updating sample weights ('linear', 'square', 'exponential').
                          Defaults to 'linear'.
    random_state (int, optional): Controls the random seed. Defaults to None.
    max_depth (int, optional): Maximum depth of the base estimator. Defaults to 3.
    min_samples_split (int, optional): Minimum number of samples required to split an internal node. Defaults to 2.
fit(self, X, y)
Build a boosted regressor from the training set (X, y).
get_stats(self, y_true, X=None, y_pred=None, verbose=False)
Calculate and optionally print evaluation metrics. Requires either X or y_pred.
predict(self, X)
Predict regression target for X.

Data descriptors defined here:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object