NNLSEnsemble#
- class NNLSEnsemble(n_estimators=10, loss_func=None)[source]#
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_funcfunction
loss function which follows sklearn.metrics API, for updating weights
Methods
update(y_pred, y_true)Update the online ensemble with new data.
- update(y_pred, y_true)[source]#
Update the online ensemble with new data.
- Parameters
- y_prednp.array(), shape=(time_axis,estimator_axis)
array with predictions from the estimators
- y_truenp.array(), shape=(time_axis)
array with actual values for predicted quantity