coin flipping for machine learning