Skip to content

NNLSEnsemble

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.