Min-max scaling
Min–max scaling uses the training minimum and maximum as a fixed ruler. A future value can fall outside that ruler.
Formula: (x - training minimum) / (training maximum - training minimum). With training values [4,12,16], save minimum=4 and maximum=16. The outputs are 0, 8/12=0.667 and 1.
A future value 22 maps to 18/12=1.5. That is correct under the saved reference. Training observations lie within [0,1]; future observations need not. Clipping to [0,1] is an additional information-changing policy, and refitting with the new value changes the reference. Decide and document policies before evaluation.
If training maximum equals training minimum, the hand formula divides by zero. Treat a constant feature explicitly rather than pretending a meaningful scale can be estimated from no variation.
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.
The same raw score gets different z-scores when the reference changes. This lab uses sample SD (ddof=1); the Week 4 prediction scaler uses training-only population-style SD (ddof=0).
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.
Training min=10 and max=30. How does 40 transform?
Why should the scaler not be refitted using a future record?
2. Application
Apply the concept to a case or calculation.
Training minimum=10 and maximum=30. What does 10 become?
Using the same min=10 and max=30, what does a new value 0 become?
3. Interpretation and limitations
Evaluate assumptions and justify conclusions.
Using min=10 and max=30, what does 20 become?
All training values are 7. What issue occurs in ordinary min–max scaling?
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 original value was 0, below the training minimum. A negative transformed value can simply mean the future value lies outside the training range.
Check: did you answer the question, use evidence or working, and avoid claiming more than the evidence supports?
Show an example answer
If every training value is the same, maximum−minimum is zero. The ordinary division is undefined, so the implementation needs a documented constant-feature policy.
Check: did you answer the question, use evidence or working, and avoid claiming more than the evidence supports?