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.

Level: intermediateTopic: Feature engineering data prep

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

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.