Back to Blog
Machine Learning June 28, 2026 5 min read

Common Mistakes Beginners Make in Machine Learning

Avoid these common pitfalls in ML: from data leakage during preprocessing to evaluation on the wrong metrics.

1. Data Leakage during Preprocessing

Doing preprocessing (like scaling or imputation) on the whole dataset before splitting into train/test leaks test information into the training phase.

2. Using Accuracy for Imbalanced Data

If 99% of your data is negative, a dummy model predicting always negative gets 99% accuracy but is useless. Use Precision, Recall, or F1-score instead.

3. Ignoring Baseline Models

Before jumping to deep neural networks, always build a simple baseline (like Logistic Regression or a simple Decision Tree).

MLAIBest Practices
Z

Zakaria Kassemi

Data Scientist & AI Engineer — Morocco