pytorch-forecasting
pytorch-forecasting copied to clipboard
Question: Predictions exported as pandas.DataFrame
Hi, I am new to pytorch-forecasting. I followed the TFT tutorial and have a question regarding the predictions output. After generating a set of raw predictions by raw_predictions, x = best_tft.predict(val_dataloader, mode="raw", return_x=True), what is the best way to convert it to a DataFrame as below,
| sku | time_idx | volume(x) | raw_prediction(y_raw) |
|---|---|---|---|
| SKU_03 | 8 | 0.5076 | 0.6060 |
| SKU_03 | 9 | 0.7076 | 0.5260 |
| SKU_03 | 10 | 0.6676 | 0.7060 |
| SKU_03 | 11 | 0.4476 | 0.5560 |
Would appreciate it if it could get answered!
I think this link should help you https://github.com/jdb78/pytorch-forecasting/issues/834