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: Construct losses for the ensemble and each constitute model
  
  Parameters
  ----------
  data: np.ndarray
      The univariate time series
  
  predictions : np.ndarray
      The predictions of each constitute model
  
  ensemble_prediction : np.ndarray
      The prediction of the ensemble model
  
  Returns
  ----------
  - np.ndarray of the losses for each model
docstr_tok: ["Construct","losses","for","the","ensemble","and","each","constitute","model","Parameters","--","--","--","--","--","data",":","np.ndarray","The","univariate","time","series","predictions",":","np.ndarray","The","predictions","of","each","constitute","model","ensemble_prediction",":","np.ndarray","The","prediction","of","the","ensemble","model","Returns","--","--","--","--","--","-","np.ndarray","of","the","losses","for","each","model"]
code: def _construct_losses(self, data, predictions, ensemble_prediction):
      """Construct losses for the ensemble and each constitute model
  
      Parameters
      ----------
      data: np.ndarray
          The univariate time series
  
      predictions : np.ndarray
          The predictions of each constitute model
  
      ensemble_prediction : np.ndarray
          The prediction of the ensemble model
  
      Returns
      ----------
      - np.ndarray of the losses for each model
      """
  
      losses = []
      losses.append(
          self.loss_type(data, ensemble_prediction).sum()
          / data.shape[0]
      )
      for model in range(len(self.model_list)):
          losses.append(
              self.loss_type(data, predictions[:, model]).sum()
              / data.shape[0]
          )
      return losses
  
file_path: pyflux/pyflux/ensembles/mixture_of_experts.py
imports: import pandas
  import numpy
label_desc: Use image node_id 7 for calling the Aggregate obj's underlying member method code with example usage: obj._construct_losses(data, predictions, ensemble_prediction) and returns: losses