Module 2 · step 3 of 4 · Data and profiling
Spot data issues
Recognise missing values, outliers, imbalance, duplicates and leakage, and where mlflow flags them.
Concept8 min
In this step you will learn to recognise the problems that cause most damage (missing values, outliers, imbalance, duplicate and ID-like columns, leakage) and find each one in the Data profile. It matters because a model quietly learns whatever the data contains, including its mistakes.
The idea
Missing values are empty cells. Many algorithms cannot handle them, and why a value is missing can itself carry information. You decide whether to fill them in (imputation), drop the column, or keep a signal that the value was missing.
Outliers are values far from the rest. Some are errors, such as an age of 250; some are real, such as a very large customer. Either way they can distort averages and the scale of a column, so you decide per column whether to keep, clip or investigate them.
Class imbalance means one outcome is much rarer than another. A model can reach high accuracy by always predicting the common class while missing every case you care about.
Duplicates, constant columns and ID-like columns add no information. Duplicate rows can put the same case in training and testing. A column with a different value on every row, such as an order number, invites the model to memorise rows instead of learning a pattern.
Data leakage is the most dangerous: a column holds information you will not have when you make a real prediction, for example a field filled in after the outcome. The model looks excellent in testing and fails in use.
Step by step
- Select Data, then Explore on the employee data source, and open Missing. Read Missing rate by column.
- Open Columns. For a numeric column read Outliers (IQR). Look for columns tagged ID-like (a different value in every row) or Constant (one value only).
- Open Quality. Read All warnings, grouped by severity.
- On the same tab read the three cards that need a target: Target leakage (an association with the target of 0.80 or more is flagged as possible leakage), Duplicate columns and Class balance (a majority to minority ratio of 3 or more is a warning).
- Pick the warning that worries you most and write down what you would do. The fix happens in Pipeline Studio, in the Columns part: press Choose... on a column, or use its Suggested: row and press Apply. Fill-in and extreme-value operations handle gaps and outliers; Remove column drops IDs and duplicates.
mlflow reports and suggests; it never changes your data on its own. Suggestions are rules computed from the profile, and you accept or undo each one.
Common mistakes
- Trusting the quality score without opening the warnings behind it.
- Filling missing values with the average without asking why they are missing.
- Deleting outliers that are real and important, such as your best customers.
- Judging a model by accuracy when the classes are very uneven. Class balance warns you; look at precision and recall instead.
- Keeping a column that is only known after the outcome because it "improves" the score. Target leakage lists the strongest associations with the target.
- Treating a flag as proof. A strong association can be legitimate; ask whether the value exists at prediction time.
As a data scientist
A suspiciously good score is a reason to search for leakage first, not to celebrate. Decide per column and write the reason down, so the pipeline you build in mlflow documents your choices. For depth, read Missing values, Outliers, Imbalanced data and Data leakage.