SolarArbiter / solarforecastarbiter-core

Core data gathering, validation, processing, and reporting package for the Solar Forecast Arbiter
https://solarforecastarbiter-core.readthedocs.io
MIT License
33 stars 21 forks source link

report datamodel or schema change for probabilistic forecasts #425

Closed wholmgren closed 4 years ago

wholmgren commented 4 years ago

Pulling this out of #266...

We need to modify the Report datamodel or at least the json schema to support probabilistic forecasts.

@alorenzo175 suggested https://github.com/SolarArbiter/solarforecastarbiter-core/issues/266#issuecomment-559194798

For the report metadata, lets add a type key or similar that can be probabilistic or deterministic and then metric validation etc can use that.

building on that and my suggestion in https://github.com/SolarArbiter/solarforecastarbiter-core/issues/266#issuecomment-559216787 I propose:

"object_pairs": [
{"forecast": uuid_of_constant_value, "forecast_type": "probabilistic_forecast_constant_value", "observation"...},
{"forecast": uuid_of_prob_fx, "forecast_type": "probabilistic_forecast", "observation"...}
...]

Putting the type in the object_pair dict will allow us to support both kinds of probabilistic forecasts in a single report. This metadata is needed to ensure api.process_report_dict does the right thing when fetching forecast objects.

https://github.com/SolarArbiter/solarforecastarbiter-core/blob/9813fd6d779029d3bbce81ee7a827edc15c13311/solarforecastarbiter/io/api.py#L779-L786

Completing this would probably allow us to at least implement the dashboard interface for probabilistic reports https://github.com/SolarArbiter/solarforecastarbiter_dashboard/issues/215

wholmgren commented 4 years ago

Somewhat related, #361 added a small switch to api.py for dealing with event forecasts

https://github.com/SolarArbiter/solarforecastarbiter-core/pull/361/files#diff-969d804dcecd5333ab873299d51bc2a1R247-R251

We might want to use this forecast_type or similar keyword instead of the variable type so it's a little less magical.

lboeman commented 4 years ago

What are the values we should use for designating forecast_type? I've used forecast, event_forecast, probabilistic_forecast, and probabilistic_forecast_constant_value in my api PR to start.

wholmgren commented 4 years ago

That's consistent with my proposal https://github.com/SolarArbiter/solarforecastarbiter-core/pull/426/files#diff-969d804dcecd5333ab873299d51bc2a1R780-R782

@alorenzo175 ?

alorenzo175 commented 4 years ago

Sounds good to me. Should we consider deterministic_forecast?

lboeman commented 4 years ago

I'm all for deterministic_forecast it will also make it easier to pattern match on type.

wholmgren commented 4 years ago

closed by #445