Epython Lab
Your model can look excellent and still be wrong.
One of the first things I check when evaluating an ML dataset is data leakage. 🔍
Data leakage happens when information that would not actually be available at prediction time gets into the training data.
For example:
🏥 Healthcare
You are predicting whether a patient will be admitted, but your dataset includes a field recorded after admission.
💳 Fraud detection
You are predicting fraud, but one of the features is created after the transaction has already been investigated.
📦 Customer churn
You are predicting who will leave, but the training data contains information that only becomes available after the customer leaves.
The result?
Your model may show:
📈 98% accuracy
📈 Excellent validation results
📈 Great performance during testing
Then you put it into production...
And the performance drops.
The problem was not necessarily the model.
The model had access to information it would never have in the real world.
That is why I don't look at model performance alone.
I also ask:
🔎 Where did each feature come from?
⏱️ When was it created?
🎯 Would this information actually be available when making the prediction?
A high score is not always a good score.
Sometimes, it is a warning sign.
Check out data quality issues
https://youtube.com/playlist?list=PL0nX4ZoMtjYHTtowSzzB2gVH2AuuoF9WW&si=EhLKvJCVlYQXknOs
Also checkout data quality checker tool https://datasetdoctor.fastapicloud.dev
#MachineLearning #DataScience #AI #DataLeakage #MLOps #Python
703 ·