devnotes.

What is Data Preprocessing?

Data preprocessing (also called data preparation) is the set of steps that converts raw, messy data into a clean, structured and numeric form that a machine learning algorithm can learn from.

Real-world data is rarely ready to use. It usually contains:

  • missing entries and blank cells,
  • duplicated or contradictory records,
  • values in inconsistent formats (2026-04-28 vs 28/04/26),
  • extreme values (outliers),
  • text categories that algorithms cannot read directly,
  • features measured on very different scales.

Preprocessing fixes these problems before modeling, so the model learns real patterns instead of noise.

Where preprocessing fits in the ML workflow

Raw Data -> Cleaning -> Missing Values -> Outliers -> Train/Test Split
         -> Feature Engineering / Selection / Scaling -> Model -> Evaluation

"Garbage in, garbage out." A powerful algorithm trained on poor data will still produce poor predictions.

Two goals of preprocessing

  1. Make data usable — remove errors, fill gaps, convert everything to numbers.
  2. Make data informative — create, select and scale features so patterns are easier to learn.
What is Data Preprocessing? - Introduction | Data Preparation | DevNotes