class_docstr: Ensemble selection for survival analysis that accounts for a score and correlations between predictions.
  
  The ensemble is pruned during training only according to the specified score (accuracy) and
  additionally for prediction according to the correlation between predictions (diversity).
  
  The hillclimbing is based on cross-validation to avoid having to create a separate validation set.
  
  See [1]_, [2]_, [3]_ for further description.
  
  Parameters
  ----------
  base_estimators : list
      List of (name, estimator) tuples (implementing fit/predict) that are
      part of the ensemble.
  
  scorer : callable
      Function with signature ``func(estimator, X_test, y_test, **test_predict_params)`` that evaluates the error
      of the prediction on the test data. The function should return a scalar value.
      *Larger* values of the score are assumed to be better.
  
  n_estimators : float or int, optional, default: 0.2
      If a float, the percentage of estimators in the ensemble to retain, if an int the
      absolute number of estimators to retain.
  
  min_score : float, optional, default: 0.66
      Threshold for pruning estimators based on scoring metric. After `fit`, only estimators
      with a score above `min_score` are retained.
  
  min_correlation : float, optional, default: 0.6
      Threshold for Pearson's correlation coefficient that determines when predictions of
      two estimators are significantly correlated.
  
  cv : int, a cv generator instance, or None, optional
      The input specifying which cv generator to use. It can be an
      integer, in which case it is the number of folds in a KFold,
      None, in which case 3 fold is used, or another object, that
      will then be used as a cv generator. The generator has to ensure
      that each sample is only used once for testing.
  
  n_jobs : int, optional, default: 1
      Number of jobs to run in parallel.
  
  verbose : integer
      Controls the verbosity: the higher, the more messages.
  
  Attributes
  ----------
  scores_ : ndarray, shape = (n_base_estimators,)
      Array of scores (relative to best performing estimator)
  
  fitted_models_ : ndarray
      Selected models during training based on `scorer`.
  
  n_features_in_ : int
      Number of features seen during ``fit``.
  
  feature_names_in_ : ndarray of shape (`n_features_in_`,)
      Names of features seen during ``fit``. Defined only when `X`
      has feature names that are all strings.
  
  References
  ----------
  
  .. [1] Pölsterl, S., Gupta, P., Wang, L., Conjeti, S., Katouzian, A., and Navab, N.,
       "Heterogeneous ensembles for predicting survival of metastatic, castrate-resistant prostate cancer patients".
       F1000Research, vol. 5, no. 2676, 2016
  
  .. [2] Caruana, R., Munson, A., Niculescu-Mizil, A.
      "Getting the most out of ensemble selection". 6th IEEE International Conference on Data Mining, 828-833, 2006
  
  .. [3] Rooney, N., Patterson, D., Anand, S., Tsymbal, A.
      "Dynamic integration of regression models. International Workshop on Multiple Classifier Systems".
      Lecture Notes in Computer Science, vol. 3181, 164-173, 2004
class_docstr_tok: ["Ensemble","selection","for","survival","analysis","that","accounts","for","a","score","and","correlations","between","predictions",".","The","ensemble","is","pruned","during","training","only","according","to","the","specified","score","(","accuracy",")","and","additionally","for","prediction","according","to","the","correlation","between","predictions","(","diversity",")",".","The","hillclimbing","is","based","on","cross-validation","to","avoid","having","to","create","a","separate","validation","set",".","See","[","1","]","_",",","[","2","]","_",",","[","3","]","_","for","further","description",".","Parameters","--","--","--","--","--","base_estimators",":","list","List","of","(","name",",","estimator",")","tuples","(","implementing","fit\/predict",")","that","are","part","of","the","ensemble",".","scorer",":","callable","Function","with","signature","``","func","(","estimator",",","X_test",",","y_test",",","*","*","test_predict_params",")","``","that","evaluates","the","error","of","the","prediction","on","the","test","data",".","The","function","should","return","a","scalar","value",".","*","Larger","*","values","of","the","score","are","assumed","to","be","better",".","n_estimators",":","float","or","int",",","optional",",","default",":","0.2","If","a","float",",","the","percentage","of","estimators","in","the","ensemble","to","retain",",","if","an","int","the","absolute","number","of","estimators","to","retain",".","min_score",":","float",",","optional",",","default",":","0.66","Threshold","for","pruning","estimators","based","on","scoring","metric",".","After","`","fit","`",",","only","estimators","with","a","score","above","`","min_score","`","are","retained",".","min_correlation",":","float",",","optional",",","default",":","0.6","Threshold","for","Pearson","'s","correlation","coefficient","that","determines","when","predictions","of","two","estimators","are","significantly","correlated",".","cv",":","int",",","a","cv","generator","instance",",","or","None",",","optional","The","input","specifying","which","cv","generator","to","use",".","It","can","be","an","integer",",","in","which","case","it","is","the","number","of","folds","in","a","KFold",",","None",",","in","which","case","3","fold","is","used",",","or","another","object",",","that","will","then","be","used","as","a","cv","generator",".","The","generator","has","to","ensure","that","each","sample","is","only","used","once","for","testing",".","n_jobs",":","int",",","optional",",","default",":","1","Number","of","jobs","to","run","in","parallel",".","verbose",":","integer","Controls","the","verbosity",":","the","higher",",","the","more","messages",".","Attributes","--","--","--","--","--","scores_",":","ndarray",",","shape","=","(","n_base_estimators",",",")","Array","of","scores","(","relative","to","best","performing","estimator",")","fitted_models_",":","ndarray","Selected","models","during","training","based","on","`","scorer","`",".","n_features_in_",":","int","Number","of","features","seen","during","``","fit","``",".","feature_names_in_",":","ndarray","of","shape","(","`","n_features_in_","`",",",")","Names","of","features","seen","during","``","fit","``",".","Defined","only","when","`","X","`","has","feature","names","that","are","all","strings",".","References","--","--","--","--","--","..","[","1","]","P\u00f6lsterl",",","S.",",","Gupta",",","P.",",","Wang",",","L.",",","Conjeti",",","S.",",","Katouzian",",","A.",",","and","Navab",",","N.",",","``","Heterogeneous","ensembles","for","predicting","survival","of","metastatic",",","castrate-resistant","prostate","cancer","patients","''",".","F1000Research",",","vol",".","5",",","no",".","2676",",","2016","..","[","2","]","Caruana",",","R.",",","Munson",",","A.",",","Niculescu-Mizil",",","A",".","``","Getting","the","most","out","of","ensemble","selection","''",".","6th","IEEE","International","Conference","on","Data","Mining",",","828-833",",","2006","..","[","3","]","Rooney",",","N.",",","Patterson",",","D.",",","Anand",",","S.",",","Tsymbal",",","A",".","``","Dynamic","integration","of","regression","models",".","International","Workshop","on","Multiple","Classifier","Systems","''",".","Lecture","Notes","in","Computer","Science",",","vol",".","3181",",","164-173",",","2004"]
code: def _fit(self, X, y, cv, **fit_params):
      scores, base_ensemble = self._fit_and_score_ensemble(
          X, y, cv, **fit_params
      )
      self.fitted_models_, self.scores_ = self._prune_by_cv_score(
          scores, base_ensemble
      )
  
imports: import numbers
  from joblib import Parallel, delayed
  import numpy
  from scipy.stats import kendalltau, rankdata, spearmanr
  from sklearn.base import BaseEstimator, clone
  from sklearn.model_selection import check_cv
  from sklearn.utils._param_validation import Interval, StrOptions
  from .base import _fit_and_score
  from .stacking import Stacking
label_desc: Use image node_id 2 for calling the EnsembleSelection obj's underlying member method code with example usage: obj._fit(X, y, cv) without return types