code for jet probability calibration and validation