Good ML is less about fancy models and more about disciplined process. These habits keep your results honest and reproducible.
The core habits
- Split first, always — hold out a test set before touching the data; never let it influence training.
- Use pipelines — they make preprocessing leakage-free and cross-validation correct.
- Cross-validate — trust averaged CV scores over a single lucky split.
- Pick the right metric — accuracy lies on imbalanced data; match the metric to the cost of errors.
- Start simple — a linear/logistic or random-forest baseline before anything complex.
- Set random_state — for reproducible splits and results.
Always have a baseline
Key takeaways
- 01Split before anything; never let test data influence training.
- 02Use pipelines for leakage-free preprocessing and correct cross-validation.
- 03Trust averaged CV scores; choose the metric that matches the cost of errors.
- 04Start with a baseline and a simple model; set random_state for reproducibility.
