class_docstr: A stacking ensembler. Currently we support gradient boosting as the meta-algorithm.
  
  Parameters
  ----------
  meta_model : 'gbm' or 'glm' (Optional)
      Type of the stacker:
          'gbm' : Gradient boosting model. This is the default.
          'glm' : Generalized linear model.
  
  meta_params : a ``dict``  (Optional)
      When ``meta_model`` is specified, you can customize the parameters of the stacker.
      If this argument is not provided, the stacker will be configurated with default parameters.
      Default ``{}``.
docstr: Ensemble the predictions of base models.
  
  Parameters
  ----------
  predictions : a list of ``np.ndarray``
      Predictions of base learners (corresponding to the elements in identifiers).
  identifiers : a list of ``str``
      The names of base models.
  
  Returns
  -------
  ``np.ndarray``
      The ensembled predictions.
docstr_tok: ["Ensemble","the","predictions","of","base","models",".","Parameters","--","--","--","--","--","predictions",":","a","list","of","``","np.ndarray","``","Predictions","of","base","learners","(","corresponding","to","the","elements","in","identifiers",")",".","identifiers",":","a","list","of","``","str","``","The","names","of","base","models",".","Returns","--","--","--","-","``","np.ndarray","``","The","ensembled","predictions","."]
code: def ensemble(self, predictions, identifiers, *args, **kwargs):
      """
      Ensemble the predictions of base models.
  
      Parameters
      ----------
      predictions : a list of ``np.ndarray``
          Predictions of base learners (corresponding to the elements in identifiers).
      identifiers : a list of ``str``
          The names of base models.
  
      Returns
      -------
      ``np.ndarray``
          The ensembled predictions.
      """
  
      assert len(identifiers) == len(
          set(identifiers)
      ), "Duplicate name in" " identifiers {} !".format(identifiers)
  
      assert set(self.fit_identifiers) == set(identifiers), (
          "Different identifiers"
          " passed in fit {} and ensemble {} !".format(
              self.fit_identifiers, identifiers
          )
      )
  
      # re-order predictions if needed
      if not self.fit_identifiers == identifiers:
          re_id = [
              identifiers.index(identifier)
              for identifier in self.fit_identifiers
          ]
          predictions = [predictions[i] for i in re_id]
  
      if self.model_name in ["gbm", "glm"]:
          pred_packed = (
              torch.tensor(predictions)
              .transpose(0, 1)
              .flatten(start_dim=1)
              .numpy()
          )
          return self.model.predict_proba(pred_packed)
  
      elif self.model_name in ["nn"]:
          pred_packed = (
              torch.tensor(predictions)
              .transpose(0, 1)
              .flatten(start_dim=1)
          )
          return (
              F.normalize(self.model.forward(pred_packed), dim=0)
              .detach()
              .numpy()
          )
  
file_path: AutoGL/autogl/module/ensemble/stacking.py
imports: import numpy
  import torch
  import torch.nn.functional
  from sklearn.ensemble import GradientBoostingClassifier
  from sklearn.linear_model import LogisticRegression
  from .base import BaseEnsembler
  from .None import register_ensembler
  from ...utils import get_logger
label_desc: Use image node_id 3 for calling the Stacking obj's underlying member method code with example usage: obj.ensemble(predictions, identifiers) and returns: self, F