An enterprise team builds a customer churn model using records from sales, billing and support systems. Before training begins, the data scientists must resolve inconsistent formats, decide which fields belong in the model and establish how records will be divided for evaluation.
The scikit-learn preprocessing documentation explains that its preprocessing package provides utility functions and transformer classes for changing raw feature vectors into representations more suitable for downstream estimators. Common operations include scaling, normalization and encoding, depending on the requirements of the model.
Preparation decisions should begin with the intended AI task. CUBIG explores this in its article on why AI data preparation starts with the task, showing why the same customer data can require different preparation for different AI applications.
Common data preparation activities include:
- Cleaning: Correct inconsistent values, handle missing records and resolve duplicate entries.
- Transformation: Convert categorical fields, normalize numerical values and create usable features through feature engineering.
- Labeling: Assign target values that represent the outcome a supervised learning model should predict.
- Splitting: Separate training and evaluation records using an appropriate train-test split to measure performance on data excluded from training.
How is data preparation different from data cleaning?
- Data cleaning focuses on correcting errors, inconsistencies and missing or duplicate values.
- Data preparation covers a broader workflow, including cleaning, transformation, labeling and dataset splitting.
- Cleaning can be one stage of preparation, while the complete preparation process depends on the intended model and task.
Where does data preparation break in AI work?
Preparation can introduce data leakage when information unavailable at prediction time enters the model inputs. The scikit-learn guide to common pitfalls explains that using such information when building a model produces overly optimistic performance estimates.
A CUBIG Bank Marketing experiment documented in October 2026 shows why timing matters: call duration was included among the inputs, although the experiment notes it becomes available only after a call. The experiment therefore does not demonstrate pre-call targeting performance. Preparation also becomes unreliable when teams reuse one dataset configuration for different tasks without reconsidering which information each task requires.