<% from pandas_ml_utils.utils.functions import fig_to_png_base64 interpretation = { "FP Ratio": "FN/TP Ratio (should be < 0.5, ideally 0)", "FN Ratio": "FP/TP Ratio (should be < 0.5, ideally 0)", "F1 Score": "F1 Score (should be > 0.5, ideally 1)" } color = { "FP Ratio": ["green", "orange", "red"], "FN Ratio": ["green", "orange", "red"], "F1 Score": ["red","orange", "green"] } %> <%include file="../style.html"/>
<%def name="pretty_confusion_matrix(mx, fmt)">

Prediction/Truth | True | False
--- | --- | ---
True | ${fmt.format(mx[0,0])} | ${fmt.format(mx[0,1])}
False | ${fmt.format(mx[1,0])} | ${fmt.format(mx[1,1])}

###

Confusion Matrix

Confusion Matrix | Confusion Loss
--- | ---
${pretty_confusion_matrix(summary.get_confusion_matrix(), "{:.0f}")} | ${pretty_confusion_matrix(summary.get_confusion_loss(), "{:.2f}")}
| % for name, value in summary.get_metrics().items():
${interpretation[name]} | ${f"{value:.2f}"}
% endfor

###

Loss

Chart
% for target, plot in summary.plot_classification().items():
${target or ""}
% endfor