time-series-foundation-models / lag-llama

Lag-Llama: Towards Foundation Models for Probabilistic Time Series Forecasting
Apache License 2.0
1.1k stars 124 forks source link

the num_samples means #89

Open ympppppp opened 5 days ago

ympppppp commented 5 days ago

Hello, this work is very helpful to me, but I don't know what the num_samples means in the code, I found that its value seems to affect the prediction result, when it is equal to 1, the prediction result seems to change from interval prediction to point prediction

ashok-arjun commented 4 days ago

Yes, that means the number of samples sampled from the T distribution head. When it's set to 1, it becomes a point forecasting model. But note that we trained using the log-likelihood loss, and evaluated for probabilistic prediction (with 100 samples), so performance in point prediction is not guaranteed.

ympppppp commented 3 days ago

Hi, author, I still don’t understand the meaning of num_samples in detail. Do you mean that when sampling num_samples=100, the parameters of the t distribution will be calculated based on these 100 sets of prediction results, and then the interval prediction curve will be drawn. When num_samples=1 , which is equivalent to having only one set of prediction results and unable to calculate the parameters of the t distribution, because I see that the final distribution head described in your paper directly outputs the three parameters of the t distribution. These three parameters are obtained based on the results of num_samples sampling?Wish you a pleasant work and life.