y = {'true': torch.stack(total_y_true) 'pred': torch.stack(total_y_pred), 'true_informer': total_y_true_informer 'pred_informer': total_y_pred_informer} Assumes that samples are not shuffled, strided
(y)
| 53 | |
| 54 | |
| 55 | def get_plotting_samples(y): |
| 56 | """ |
| 57 | y = {'true': torch.stack(total_y_true) |
| 58 | 'pred': torch.stack(total_y_pred), |
| 59 | 'true_informer': total_y_true_informer |
| 60 | 'pred_informer': total_y_pred_informer} |
| 61 | |
| 62 | Assumes that samples are not shuffled, strided |
| 63 | """ |
| 64 | samples = {} |
| 65 | for k, _y in y.items(): |
| 66 | if 'informer' not in k and 'true' not in k: # Only plot raw-scale samples |
| 67 | samples[k] = average_horizons(_y) |
| 68 | elif k == 'true': |
| 69 | samples[k] = average_horizons(_y) |
| 70 | return samples |
| 71 | |
| 72 | |
| 73 | def average_horizons(y): |
no test coverage detected