nasa/progpy

Dispersion Metric in Ensemble Model

Opened this issue · 0 comments

Requirement Text
Ensemble model should return a measurement of dispersion

Background Information
Ensemble model aggregates the results of the component models, but does not produce any measurement of the dispersion of the results from the models

Suggested Solution
Allow specification of "dispersion metrics" as parameter. Metrics will be calculated each time values are aggregated. The result is then saved as an attribute of the *Container (e.g., StateContainer, OutputContainer, etc.).

E.g.,
dispersion_metrics = {'std': np.std, 'custom1': some_custom_method}

Then
X = m.next_state(...)
Print(X.dispersion_metrics['std'])
Print(X.dispersion_metrics['custom1'])

Or just one metric
Dispersion = np.std

Then x.dispersion

Another thought:
It would be nice if it's only calculated when you need it (e.g., at save_pts). Maybe we save raw data as member, and calculate when saving

DoD

  • Implement feature
  • Add to example
  • Add tests
  • update documentation