jdb78 / pytorch-forecasting

Time series forecasting with PyTorch
https://pytorch-forecasting.readthedocs.io/
MIT License
3.75k stars 599 forks source link

How to find the RMSE and MAE from raw predictions ? #1574

Open Mohan16071996 opened 1 month ago

Mohan16071996 commented 1 month ago

COde is :

raw_prediction = best_tft.predict( training.filter(lambda x: (x.Ticker == "AAPL") ), mode="raw", return_x=True, )

Here I get raw predictions, after getting this , i want to find RMSE and MAE.

Or is there a way to predict for each ticker in this code: Below code is for overall RMSE I believe predictions = best_tft.predict(val_dataloader, return_y=True, trainer_kwargs=dict(accelerator="cpu")) RMSE()(predictions.output, predictions.y)

Mohan16071996 commented 1 month ago

Can someone please respond to this as soon as possible?