blab / ncov-forecasting-fit

Assessing accuracy of fitness model forecasts
1 stars 2 forks source link

for MLR analysis , what is the forecast window parameter? #27

Closed adalisan closed 5 months ago

adalisan commented 6 months ago

First of all, thank you for this very useful repository for analysis.

I have a question for a parameter in the analysis notebook models_run.ipynb,

   if model == 'MLR':
                variant_data = ef.VariantFrequencies(raw_seq, pivot="Omicron 21L")
                posterior = svi.fit(model_type[model], variant_data)
                posterior.samples["freq_forecast"] = forecast_frequencies(posterior.samples, model_type[model], 74)

I don't fully understand how the argument forecast_L is 74. Initially I thought this parameter controlled the duration of data the model was going to use to fit the parameters, but I think you make use of days -90 to -14 from the analysis date and the model should be fit by the svi.fit call . Is this paramter controlling for which dates you are going to make predictions for (nowcast)? That does not totally fit either, because for figures in the paper, you make predictions and evaluate errors for 60 days (30 days in past for nowcast, 30 days in future for forecast). Can you clarify?

marlinfiggins commented 6 months ago

Hello!

Though we use only forecasts up to 30 days in the manuscript, we produce them up to 60 days from the time of analysis. The tricky bit here is that the sequence data stops 14 days before the time analysis, so we're just doing 60 + 14 = 74 as the total length of forecasts. I hope this clarifies a bit!

adalisan commented 5 months ago

Thank you.