AI engineering glossary · Feature engineering data prep
What is fit-transform pattern?
Fit-transform pattern (also called fit_transform): The rule that data preprocessors learn their parameters, such as mean or category list, from training data only using fit, then apply them to training, validation and test data using transform. This avoids information from test data leaking in.
Fit-transform pattern: an example
A scaler is fitted on training rows to learn mean 50, then the same mean 50 is used to transform the test rows.
Related terms
More Feature engineering data prep terms
- Forward selection
- Frequency encoding
- Geospatial features
- Group-aware splitting
- Hashing trick
- Hashing vectorizer
- Haversine distance
- High-cardinality feature
Where you learn it
Fit-transform pattern is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.