aNet.ai
Data Science/Learning path
0day streak0XP · Lv 1
← 4. From Clean Data to Useful Predictions
Lesson 5.3 6 min · 132 words

Standardisation, fit and transform

Standardisation puts numeric features into reference-SD units. Learn its parameters from training data and keep them fixed for later records.

Fit means learn and save parameters from training data. Transform means apply the saved rule to an input without relearning. Split before fitting anything data-dependent.

For A and B only, score mean=75, population SD=5; minutes mean=120, population SD=60. W4 divides by n, matching the teaching scaler convention. This differs from W2's sample SD exercise and is intentional.

A transforms to [-1,-1], B to [1,1], and NEW to [0.8,-1/3]. Distance to A is sqrt(1.8^2+(2/3)^2), about 1.919. Distance to B is sqrt((-0.2)^2+(-4/3)^2), about 1.348. B is nearest again. NEW must not influence the training mean or spread.

Use the saved training rule on training, test and future rows. Fitting a separate test scaler would put the two sets into different reference systems. Fitting one scaler on their union would leak test information into fitting.

Sources: W4 PDF pp. 2-42; L4 Tasks 1-7. All fixed worked values here were recalculated from the supplied examples. These toy rules are teaching devices, not deployable student-support recommendations.

Practice problems

Supplementary study questions on the lecture concepts — not verbatim exam questions. Each answer counts toward spaced review.

1. Conceptual understanding

Definitions and distinctions.

Question 1 of 6 · +5 XP

What does fit learn for standardisation?

Question 2 of 6 · +5 XP

Training values [60,60,80,80] have which scaling parameters using ddof=0?

2. Application

Apply the concept to a case or calculation.

Question 3 of 6 · Transform arithmetic · +5 XP

Saved mean=20 and SD=5. What does value 10 transform to?

Question 4 of 6 · Fit boundary · +5 XP

Which values should determine scaling parameters in this workflow?

3. Interpretation and limitations

Evaluate assumptions and justify conclusions.

Question 5 of 6 · Reference properties · +5 XP

On the same fitted data and SD convention, a nonconstant standardised column has approximately what mean and SD?

Question 6 of 6 · Future distribution · +5 XP

A new group's transformed scores have mean 0.6. Does this automatically mean a bug?

Explain it in writing

Self-checked, not marked. Write a few sentences, then compare with the example answer. Your writing is saved as you type.

Show an example answer

The lecture scaler uses population-style SD with divisor n. Sample SD uses n−1 and produces different transformed values, so follow the stated convention.

Check: did you answer the question, use evidence or working, and avoid claiming more than the evidence supports?

Show an example answer

No. Those properties describe the fitted reference data under the same rule and convention. A new group's distribution can be different.

Check: did you answer the question, use evidence or working, and avoid claiming more than the evidence supports?

Practice this topic
Saved in this browser as you type.
aNet.ai · Data Science Fundamentals · Weeks 1–5 · practice material, not an official examProgress saved in this browser