Beta

Sync to cloud

Uses your current signed-in YoolVi account. A Learn profile is not required.

Upload a snapshot of this browser’s saved lesson work across all subjects, including notes, experiments, journal and review history. Existing guest work is included only when you confirm below. This does not upload account credentials or award XP.

Sync uploads to your private account; it does not automatically merge or replace this device’s work. On another device, download the cloud copy and use My Learning’s backup import. The previous cloud snapshot is retained when a new one replaces it.

Export or import this device’s work

No background uploads. Edits made after a snapshot need another sync. On shared devices, work is bound to the first account observed by cloud sync; another account must use a separate browser profile. Keep your own downloaded backup too.

Learning preferences

Make learning more comfortable. Changes apply immediately.

Enlarges page content, including diagrams and their labels. You can also use your browser’s zoom.

Choose the colours that are easiest for you to distinguish. Applies to lesson diagrams and lab plots. Labels, shapes, hatching and line patterns also distinguish meanings. Source photographs and raw image brightness stay unchanged; mask-only views are available for image overlays.

ExampleComparisonSample link

Saved in this browser on this device. Preferences are separate from progress backups.

Back to Evidence and uncertainty

Shared AI lesson · Evidence and uncertainty

Explain: Data leakage

Why did that happen?

This lab uses flower measurements with clearly marked teaching changes. Related rows must stay together. Averages used to fill gaps should come only from training rows. A repaired test can get a lower score while giving you a fairer picture of what the model can do.

Explain it in your own words · optional

Compare your prediction and explanation with the observed numbers.

Try a different case · guided practice
A different case

Observed training lengths are 2 cm and 10 cm; a training value is missing. Validation includes 90 cm. Which mean can fill the training blank without using validation?

Observed training lengths are 2 cm and 10 cm; a training value is missing. Validation includes 90 cm. Which mean can fill the training blank without using validation?
How this helps your classifier project

Before trusting your classifier’s score, describe its data source and split. The synthetic classifier and Iris audit are different experiments; do not merge their scores into one claim.

READ & CONNECT

Understand what changed.

Back to the experiment

A shorter explanation, with the original worked examples available below. Both explain the same experiment and its limits.

Same learning goal in both modes: Find copied measurements and other clues that make a test too easy.

The idea in everyday terms

A model should learn from training data and be checked using data that did not supply its fitting answers. Leakage happens when information crosses that boundary, such as using validation values to choose preprocessing or putting duplicate measurements on both sides.

What to watch in the experiment

Inspect the original Iris measurements and the declared teaching alterations. Track measurement groups rather than assuming every row is a different specimen. Compare clean and leaky processing and ask which information produced the apparently better score.

What this does not establish

A higher score after leakage is not stronger evidence. Repeatedly inspecting the development set makes it part of selection, and grouped measurements are not verified specimen identities.

Open the full worked examples, calculations and limitations

This is the same reference used in Technical mode. Expand it whenever you need the exact numbers, assumptions or further explanation.

The score answers the split’s question

A nearest-neighbor model copies the label of the closest training row. A duplicate in validation can therefore make the task almost trivial. That measures recognizing a repeated measurement, not predicting a new flower.

The local Iris source has 150 examples, four measurements in centimetres and three species. Our teaching view deliberately creates duplicates, missing petal lengths and some sepal lengths recorded in millimetres. Inspect the original view before attributing those issues to the source. The manifest records its license, hashes and transformations.

Choose the split to match the intended use. For a new person or site, keep that identity in one split. For future events at existing sites, hold out later times. For both new sites and future times, both boundaries matter. The Iris groups here use identical measurements; they are not verified specimen identities.

Repair one measurement, then fit the transformation

Suppose a recorded length is 60 mm. Divide by 10 to get 6 cm. If the training mean is 5 cm and its standard deviation is 0.5 cm, the standardized value is 2: two standard deviations above the training mean.

z=x−μtrainstrain=6−50.5=2z = \frac{x-\mu_{train}}{s_{train}} = \frac{6-5}{0.5}=2

Here x is the converted measurement, μ is the training average, s is the training standard deviation (a measure of spread), and z is a unitless coordinate. Treating 60 mm as 60 cm would produce 110 instead of 2 and distort which flower appears nearby.

Fit the mean using observed training cells. Fill missing cells with that mean, then calculate the standard deviation of the filled training column. Apply those same fitted values to validation. An entirely missing feature has no defined mean; stop rather than invent a number. A constant feature uses scale 1 to avoid dividing by zero.

Why the nearest flower wins

For each of four standardized measurements, subtract the candidate training value from the validation value. Square each difference, add them, then take a square root. The smallest distance wins; ties use the first training row. Labels do not enter these distances.

d(a,b)=∑j=14(za,j−zb,j)2d(a,b)=\sqrt{\sum_{j=1}^{4}(z_{a,j}-z_{b,j})^2}

a and b are two rows, j identifies a measurement, and d is their distance. For differences 1, 0, 2, 0, squared distance is 5 and distance is about 2.236. Compare the model with a majority-label baseline: a complicated procedure must justify its added value.

Report a limited claim

A clean pipeline can score lower because it asks a harder question. Changing splits also changes the training and validation examples, so the difference is not a controlled estimate of one repair’s effect. Repeatedly inspecting validation makes it development evidence. It is not an untouched final test or a guarantee about future populations.

For the project, capture the default run and a grouped, training-only, unit-corrected run. State counts, baseline, repairs and a limitation. Then attempt the sensor-site and future-period assessment cases without consulting the worked arithmetic. The project records first submissions separately from practice retries.

Optional depth: why filling with a mean changes spread

Mean imputation inserts values exactly at the center, so those cells contribute zero squared deviation. This usually reduces the estimated spread and hides uncertainty. It is a simple teaching baseline, not a universally appropriate missing-data model. Investigate why measurements are missing before using this repair in a real study.

Notes, help and related ideas
My notes and reflection
CURIOSITY JOURNAL

What will you take away?

Keep a private reminder for yourself.

Loading your journal…

Add a short reflection

Open your journal or back it up.

Prerequisites and related ideas

Key terms: Validation data Generalization Distribution shift