tapios / risk-networks

Code for risk networks: a blend of compartmental models, graphs, data assimilation and semi-supervised learning
Other
2 stars 2 forks source link

Create a model performance tracking system #121

Closed agarbuno closed 4 years ago

agarbuno commented 4 years ago

The new class PerformanceTracker in performance_metrics measures how good the master equation model is for class predictions. By default it tracks the unobserved I and E statuses using a threshold level of 50% for the master equations probabilities using the two metrics below.

Two metrics are implemented.

An accompanying example file can be found in /examples/simple_epidemic_with_da_health_and_death_records.py. Which generates a figure as below.

performance_rrisk001_030randinf_deathstate_hospstate_080days_03hrs

MWE:

model_performance = PerformanceTracker([list of metrics], statuses = ['E', 'I'], threshold = .50)
               :
# simulation code 
               :
model_performance.update(epidemic_simulator.kinetic_model.current_statuses, states_ensemble)

# prints the current state of the metrics. 
model_performance.print()
              :