class_docstr: Ensemble forecasts with Non-negative least squares based weighting.
  
  Ensemble class that performs a non-negative least squares to fit to the
  estimators. Keeps track of all observations seen so far and fits to it.
  
  Parameters
  ----------
  n_estimators: int
      number of estimators
  loss_func : function
      loss function which follows sklearn.metrics API, for updating weights
class_docstr_tok: ["Ensemble","forecasts","with","Non-negative","least","squares","based","weighting",".","Ensemble","class","that","performs","a","non-negative","least","squares","to","fit","to","the","estimators",".","Keeps","track","of","all","observations","seen","so","far","and","fits","to","it",".","Parameters","--","--","--","--","--","n_estimators",":","int","number","of","estimators","loss_func",":","function","loss","function","which","follows","sklearn.metrics","API",",","for","updating","weights"]
docstr: Update the online ensemble with new data.
  
  Parameters
  ----------
  y_pred : np.array(), shape=(time_axis,estimator_axis)
      array with predictions from the estimators
  y_true : np.array(), shape=(time_axis)
      array with actual values for predicted quantity
docstr_tok: ["Update","the","online","ensemble","with","new","data",".","Parameters","--","--","--","--","--","y_pred",":","np.array","(",")",",","shape=","(","time_axis",",","estimator_axis",")","array","with","predictions","from","the","estimators","y_true",":","np.array","(",")",",","shape=","(","time_axis",")","array","with","actual","values","for","predicted","quantity"]
code: def update(self, y_pred, y_true):
      """Update the online ensemble with new data.
  
      Parameters
      ----------
      y_pred : np.array(), shape=(time_axis,estimator_axis)
          array with predictions from the estimators
      y_true : np.array(), shape=(time_axis)
          array with actual values for predicted quantity
      """
      self.total_y_pred = np.concatenate(
          (self.total_y_pred, y_pred), axis=1
      )
      self.total_y_true = np.concatenate((self.total_y_true, y_true))
      weights, loss = nnls(self.total_y_pred.T, self.total_y_true)
      self.weights = weights
  
imports: import numpy
  from scipy.optimize import bisect, nnls
label_desc: Use image node_id 2 for calling the NNLSEnsemble obj's underlying member method code with example usage: obj.update(y_pred, y_true) without return types