Threshold calculation cross-validation