LSY-Cython / DiffPLF

23 stars 2 forks source link

关于median的生成 #2

Open sunny0315 opened 3 months ago

sunny0315 commented 3 months ago

你好,结合论文和代码顺利把代码run起来了,对于median有一些疑问,median是在collect和test阶段产生,分别用于指导fine-tuning基于50%分位数进行迭代和test infer的point forecast。代码中生成median的部分如下: true = np.array(true)[96-pred_len:] gen_samples = np.array(preds)[:, 96-pred_len:] mae = np.mean(np.abs(gen_samples-true), axis=1) low_100 = np.argsort(mae)[0:100] gen_samples = gen_samples[low_100] median = np.percentile(gen_samples, q=50, axis=0) 注意到median 的生成使用了mae 选取gen_samples中的mae 的100个,然后对这100个取中位数,作为point forecast,但在实际的预测阶段是无法事先知道其真是观测值的,也就没法计算出mae,从而无法通过取最小的100个gen_samples 来得到待预测点的median 。如果仅在test阶段去掉按mae筛选gen_samples直接对1000个取中位数,其效果会比较差(PI宽度较大,point forecast偏差较大),请问有什么更好的建议呢?

LSY-Cython commented 3 months ago

Hi friend, sincere appreciation for your notice on our work. Maybe we can talk more details on email if you want, Thanks!

sunny0315 commented 3 months ago

Thank you for your reply. It's a pleasure to have further in-depth discussions with you. May I ask how to get in touch with you

Doudou0920 commented 1 month ago

你好,请问有下载好的数据集吗