Why is it critical to fit a scaler only on the training set before transforming the test set?
Key points
- Data leakage occurs when test information influences training.
- Scaling parameters must be derived solely from training data.
- Test data must be treated as unseen during the fitting phase.
Ready to go further?
