Saltar al contenido principal

Fit transforms on training data only

Apply the fit-on-train, transform-everywhere rule to engineered features.

feature-engineering5 min read

The move: Fit learned transforms on training data only. Feature engineering succeeds when a raw column becomes a defensible piece of evidence. That requires more than a transformation function. You need to know what decision the model supports, when the score is produced, which data was available then, and how the feature will be recreated later. The common failure mode is silent optimism. A leakage column, full-data scaler, vague missing-value fill, or undocumented shared feature can raise validation metrics while making production behavior worse. The model did not become smarter; the evidence boundary became unfair or unclear. Apply the discipline…

Read the full lesson

Sign up free: one personalized lesson every day, matched to your role and goals.

← Back to library

Contáctanos