Home / Learning guides / Data Science
The practice notebook · Nagpur

Data Leakage: Why a High Model Score Can Be Misleading

Use a fictional delivery prediction exercise to spot information that would not exist at prediction time.

Data Science IT Accurate · 30 October 2026 · 3 minute read

Define the prediction moment

Imagine predicting whether a parcel will arrive late at the time it is dispatched. Write that moment at the top of the project. Delivery completion time is unavailable then, even if it appears in the historical spreadsheet. Using it as an input would give the model information from the future. A high test score would not make that feature appropriate for a real prediction.

Audit a fictional feature list

List dispatch date, destination region, planned service level, actual delivery time and final complaint status. For each field, record when it becomes available. The last two are suspicious for a dispatch-time prediction. This paper exercise is useful before choosing an algorithm because it tests whether the question and the data fit together.

Separate learning from evaluation

The scikit-learn guidance recommends separating training and test data before fitting preprocessing steps. Learn transformations from training data and apply the learned transformation to held-out data. A pipeline can help keep those steps together. Also consider how observations are related: repeated records from the same customer or a time-dependent problem may need a split that reflects the real use case.

Report the honest experiment

Create a project note showing the prediction moment, allowed inputs, split method and an untouched evaluation result. Explain why you excluded suspicious columns. Compare with a simple baseline, and document mistakes you found during development. For Data Science training in Nagpur, ask how projects cover evaluation and leakage, not only model fitting. This exercise demonstrates reasoning; it is not evidence of production readiness or a promised employment outcome.

Your practice checklist

  • Write down when a prediction is made.
  • Check when each feature becomes available.
  • Fit preprocessing only on training data.
  • Explain the baseline and evaluation limits.

Further reading: Official technical guidance. The fictional exercises and checklists above are IT Accurate learning examples.

← Explore more learning guides · Visit our Nagpur centre page