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

TruePositiveRates/TrueNegativeRates and ROC plotting #165

Closed odunbar closed 4 years ago

odunbar commented 4 years ago

Adds the calculators for TPR/sensitivity, TNR/specificity, and a simple plotter for ROC curves given np.arrays of TNRs/TPRs. For multiple plots on a figure this is provided as a size (number of plots x number data points per plot) array.

Some oddities we have resolved found in the PerformanceMetrics class:

  1. We use the performance metrics only work in the case of a binary classifier (are you in a status_list or not) so feels odd to give the option to not be binary. [Corrected: We now only construct Binary confusion matrix]

  2. I'm not convinced we require a threshold & average approach for the ensemble. This will leave nodes without a classification, or nodes with multiple classifications. Perhaps better to average first and then take an argmax . [Corrected: We now average over the ensemble, then use the threshold as a way of seeking positive classifications]