Select best threshold for epsilon with cross validation