benjaminbenteke / EWO_Methods

1 stars 0 forks source link

Point Forecasts? #5

Open cvanbommel opened 1 month ago

cvanbommel commented 1 month ago

Can you explain the function of the line:

data.append(dt.assign(cumulative=dt['value'].cumsum(), type="point").query('cumulative >= 0.5').iloc[0].value)

In the current season, I thought we just needed to identify the point forecast by the 0.5 quantile, why does a cumulative sum need to be taken?

benjaminbenteke commented 1 month ago

We get this code from CDC (in r and convert it to python). If it doesn't make sense, we can use:

data.append(dt[dt['output_type_id'] == 0.500]['value'].values[0]).

Let me know if this makes sense.

cvanbommel commented 1 month ago

Yes, that version makes sense to me. I'll have another look at the original, thanks.