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: Adds a PyFlux model to the aggregating algorithm
  
  Parameters
  ----------
  model : pf.[MODEL]
      A PyFlux univariate model
  
  Returns
  ----------
  - Void (changes self.model_list)
docstr_tok: ["Adds","a","PyFlux","model","to","the","aggregating","algorithm","Parameters","--","--","--","--","--","model",":","pf",".","[","MODEL","]","A","PyFlux","univariate","model","Returns","--","--","--","--","--","-","Void","(","changes","self.model_list",")"]
code: def add_model(self, model):
      """Adds a PyFlux model to the aggregating algorithm
  
      Parameters
      ----------
      model : pf.[MODEL]
          A PyFlux univariate model
  
      Returns
      ----------
      - Void (changes self.model_list)
      """
  
      if model.model_type not in self.supported_models:
          raise ValueError(
              "Model type not supported for Aggregate! Apologies"
          )
  
      if not self.model_list:
          self.model_list.append(model)
          if model.model_type in [
              "EGARCH",
              "EGARCHM",
              "EGARCHMReg",
              "GARCH",
              "LMEGARCH",
              "LMSEGARCH",
              "SEGARCH",
              "SEGARCHM",
          ]:
              self.data = np.abs(model.data)
          else:
              self.data = model.data
          self.index = model.index
      else:
          if model.model_type in [
              "EGARCH",
              "EGARCHM",
              "EGARCHMReg",
              "GARCH",
              "LMEGARCH",
              "LMSEGARCH",
              "SEGARCH",
              "SEGARCHM",
          ]:
              if (
                  np.isclose(
                      np.abs(
                          np.abs(model.data[-self.match_window :])
                          - self.data[-self.match_window :]
                      ).sum(),
                      0.0,
                  )
                  or model.model_type == "GPNARX"
              ):
                  self.model_list.append(model)
              else:
                  raise ValueError(
                      "Data entered is deemed different based on %s last values!"
                      % (s)
                  )
          else:
              if (
                  np.isclose(
                      np.abs(
                          model.data[-self.match_window :]
                          - self.data[-self.match_window :]
                      ).sum(),
                      0.0,
                  )
                  or model.model_type == "GPNARX"
              ):
                  self.model_list.append(model)
              else:
                  raise ValueError(
                      "Data entered is deemed different based on %s last values!"
                      % (s)
                  )
  
      self.model_names = [i.model_name for i in self.model_list]
  
file_path: pyflux/pyflux/ensembles/mixture_of_experts.py
imports: import pandas
  import numpy
label_desc: Use image node_id 4 for calling the Aggregate obj's underlying member method code with example usage: obj.add_model(model) without return types