check_training_frac function

Check that the training fraction is between 0 and 1