Allow specifying custom thresholds.