Understanding Overfitting and Underfitting in Machine Learning