sksurv.meta.Stacking

class sksurv.meta.Stacking(meta_estimator, base_estimators, probabilities=True)[source]

Meta estimator that combines multiple base learners.

By default, base estimators’ output corresponds to the array returned by predict_proba. If predict_proba is not available or probabilities = False, the output of predict is used.

Parameters
  • meta_estimator (instance of estimator) – The estimator that is used to combine the output of different base estimators.

  • base_estimators (list) – List of (name, estimator) tuples (implementing fit/predict) that are part of the ensemble.

  • probabilities (bool, optional, default: True) – Whether to allow using predict_proba method of base learners, if available.

__init__(meta_estimator, base_estimators, probabilities=True)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(meta_estimator, base_estimators[, …])

Initialize self.

fit(X[, y])

Fit base estimators.

get_params([deep])

Attributes

predict

mock imports

predict_log_proba

mock imports

predict_proba

mock imports

fit(X, y=None, **fit_params)[source]

Fit base estimators.

Parameters
  • X (array-like, shape = (n_samples, n_features)) – Training data.

  • y (array-like, optional) – Target data if base estimators are supervised.

Returns

Return type

self