Open cvanbommel opened 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.
Yes, that version makes sense to me. I'll have another look at the original, thanks.
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?