pytorch-forecasting icon indicating copy to clipboard operation
pytorch-forecasting copied to clipboard

Question: Predictions exported as pandas.DataFrame

Open eltoncyc opened this issue 3 years ago • 1 comments

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!

eltoncyc avatar Mar 26 '22 02:03 eltoncyc

I think this link should help you https://github.com/jdb78/pytorch-forecasting/issues/834

daniwxcode avatar Apr 11 '22 15:04 daniwxcode