week 9 - anomaly detection - select threshold function