class_docstr: An ensembler using the voting method.
  
  Parameters
  ----------
  ensemble_size : int
      The number of base models selected by the voter. These selected models can be redundant. Default as 10.
class_docstr_tok: ["An","ensembler","using","the","voting","method",".","Parameters","--","--","--","--","--","ensemble_size",":","int","The","number","of","base","models","selected","by","the","voter",".","These","selected","models","can","be","redundant",".","Default","as","10","."]
docstr: Fit the ensembler to the given data using Rich Caruana's ensemble selection method.
  
  Parameters
  ----------
  predictions : a list of np.ndarray
      Predictions of base learners (corresponding to the elements in identifiers).
  labels : a list of int
      Class labels of instances.
  identifiers : a list of str
      The names of base models.
  feval : (a list of) instances in autogl.module.train.evaluate
      Performance evaluation metrices.
  
  Returns
  -------
  (a list of) ``float``
      The validation performance of the final voter.
docstr_tok: ["Fit","the","ensembler","to","the","given","data","using","Rich","Caruana","'s","ensemble","selection","method",".","Parameters","--","--","--","--","--","predictions",":","a","list","of","np.ndarray","Predictions","of","base","learners","(","corresponding","to","the","elements","in","identifiers",")",".","labels",":","a","list","of","int","Class","labels","of","instances",".","identifiers",":","a","list","of","str","The","names","of","base","models",".","feval",":","(","a","list","of",")","instances","in","autogl.module.train.evaluate","Performance","evaluation","metrices",".","Returns","--","--","--","-","(","a","list","of",")","``","float","``","The","validation","performance","of","the","final","voter","."]
code: def fit(
      self, predictions, label, identifiers, feval, *args, **kwargs
  ):
      """
      Fit the ensembler to the given data using Rich Caruana's ensemble selection method.
  
      Parameters
      ----------
      predictions : a list of np.ndarray
          Predictions of base learners (corresponding to the elements in identifiers).
      labels : a list of int
          Class labels of instances.
      identifiers : a list of str
          The names of base models.
      feval : (a list of) instances in autogl.module.train.evaluate
          Performance evaluation metrices.
  
      Returns
      -------
      (a list of) ``float``
          The validation performance of the final voter.
      """
  
      self._re_initialize(identifiers, len(predictions))
  
      if not isinstance(feval, list):
          feval = [feval]
  
      weights = self._specify_weights(predictions, label, feval)
      self.model_to_weight = dict(zip(self.identifiers, weights))
  
      VOTE_LOGGER.debug(self.identifiers, weights)
  
      training_score = self._eval(predictions, label, feval)
  
      return training_score
  
file_path: AutoGL/autogl/module/ensemble/voting.py
imports: from collections import Counter
  import numpy
  from .base import BaseEnsembler
  from .None import register_ensembler
  from ...utils import get_logger
label_desc: Use image node_id 2 for calling the Voting obj's underlying member method code with example usage: obj.fit(predictions, label, identifiers, feval) and returns: training_score