class_docstr: Aggregation Algorithm
  
  Parameters
  ----------
  learning_rate : float
      Learning rate for the Aggregation algorithm
  
  loss_type : string
      'absolute' or 'squared'
  
  match_window : int
      (default: 10) how many of the observations at the end of a model time 
      series to assess whether the data being used in each model is the same
docstr: Outputs ensemble model predictions for out-of-sample data
  
  Parameters
  ----------
  h : int
      How many steps at the end of the series to run the ensemble on
  
  recalculate: boolean
      Whether to recalculate the predictions or not
  
  fit_once : boolean
      Whether to fit the model once at the beginning, or with every iteration
  
  Returns
  ----------
  - pd.DataFrame of the model predictions, index of dates
docstr_tok: ["Outputs","ensemble","model","predictions","for","out-of-sample","data","Parameters","--","--","--","--","--","h",":","int","How","many","steps","at","the","end","of","the","series","to","run","the","ensemble","on","recalculate",":","boolean","Whether","to","recalculate","the","predictions","or","not","fit_once",":","boolean","Whether","to","fit","the","model","once","at","the","beginning",",","or","with","every","iteration","Returns","--","--","--","--","--","-","pd.DataFrame","of","the","model","predictions",",","index","of","dates"]
code: def _model_predict(self, h, recalculate=False, fit_once=True):
      """Outputs ensemble model predictions for out-of-sample data
  
      Parameters
      ----------
      h : int
          How many steps at the end of the series to run the ensemble on
  
      recalculate: boolean
          Whether to recalculate the predictions or not
  
      fit_once : boolean
          Whether to fit the model once at the beginning, or with every iteration
  
      Returns
      ----------
      - pd.DataFrame of the model predictions, index of dates
      """
  
      if (
          len(self.model_predictions) == 0
          or h != self.h
          or recalculate is True
      ):
          for no, model in enumerate(self.model_list):
              if no == 0:
                  model.fit()
                  result = model.predict(h)
                  self.predict_index = result.index
                  result.columns = [model.model_name]
              else:
                  model.fit()
                  new_frame = model.predict(h)
                  new_frame.columns = [model.model_name]
                  result = pd.concat([result, new_frame], axis=1)
  
          self.model_predictions = result
          self.h = h
          return result, self.predict_index
  
      else:
          return self.model_predictions, self.predict_index
  
file_path: pyflux/pyflux/ensembles/mixture_of_experts.py
imports: import pandas
  import numpy
label_desc: Use image node_id 5 for calling the Aggregate obj's underlying member method code with example usage: obj._model_predict(h, recalculate, fit_once) and returns: result,  self, self,  self