Multi Forecasting Features #572
-
Hello to everyone, for x, y in datasets.AirlinePassengers():
y_pred = model.forecast(horizon=1, xs=[x])
model = model.learn_one(x,y)
metric = metric.update(y, y_pred[0]) My goal is to give to the function for x, y in datasets.AirlinePassengers():
y_pred = model.forecast(horizon=1, xs=[x])
model = model.learn_one(x,[y[0],y[1]])
metric = metric.update([y[0],y[1]], [y_pred[0],y_pred[1]]) In order to forecast not one single features but more features. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @protti, I'm not sure I fully understand what you are looking for. If you want to learn from several target variables, the multioutput.RegressorChain module is not compatible with SNARIMAX. But you can create two separate models and store them into a dict if you have two different target variables. Regarding metrics, the module from river import metrics
metric = metrics.RegressionMultiOutput(metrics.MAE())
metric.update(
y_pred = {"y_1": y_pred_1, "y_2": y_pred_2},
y_true = {"y_1": y_1, "y_2": y_2},
) |
Beta Was this translation helpful? Give feedback.
Hi @protti,
I'm not sure I fully understand what you are looking for. If you want to learn from several target variables, the multioutput.RegressorChain module is not compatible with SNARIMAX. But you can create two separate models and store them into a dict if you have two different target variables.
Regarding metrics, the module
metrics.RegressionMultiOutput
offers what you are looking for. The input parameters are dictionaries and not lists. :)