Determination of thresholds