Modified calibration.py to use cross validation