← AI glossary

AI glossary · Basic · Classic ML, recsys & search

Feature engineering

Feature engineering is the work of selecting, processing and creating input values (features) from raw data so that a machine learning model can find patterns more easily.

About this term
Level
Basic · Technical terms you often meet in AI news
Added
2026-10-09
In plain words It is similar to how a cook does not throw ingredients straight into the pot but washes, chops and seasons them first. Just as the same ingredients can taste very different depending on how they are prepared, the same data can lead to different model performance depending on how the features are built.

How it works

First, examine the data and pick information likely to be related to the outcome you want to predict. Then do basic processing: fill in missing values, put numbers on a similar scale, and convert categorical values such as 'Seoul, Busan' into numbers. Next, use domain knowledge to create new features. For example, 'membership length' can be derived from 'sign-up date' and 'today's date,' and 'number of purchases in the past month' from order records. Check with cross-validation whether the new features actually help, and drop the ones that do not.

Feature engineering steps

  1. 1
    Select relevant informationData likely related to the predicted outcome
  2. 2
    Basic processingFill missing values · scale · convert categories to numbers
  3. 3
    Create new featuresMembership length · recent purchase count, etc.
  4. 4
    Validate and trimCheck effect with cross-validation
The process of selecting and cleaning data, then creating new features with domain knowledge, validating them and trimming the set.

Why it matters

For models such as decision trees and gradient boosting that work with structured data organized like tables, feature quality largely determines performance. Good features directly supply domain knowledge that the model would struggle to discover on its own. Because deep learning learns features from images and text by itself, less hand-crafting is needed, but feature engineering remains core work in practical areas such as demand forecasting, anomaly detection and recommender systems. Well-built features are sometimes collected in a feature store so that multiple models can share them.

Things to keep in mind

The most common pitfall is data leakage. If a feature includes future information that cannot be known at prediction time, test scores look good but performance drops sharply in the real service. Creating too many features makes overfitting more likely. It is also important that features are computed in exactly the same way during training and in the live service. Over time, as the nature of the data changes, features can lose their usefulness, so data drift needs to be monitored.

Example

Suppose a telecom company wants to identify in advance which customers will cancel next month. The raw data has separate records for bill payments, calls and customer support. An analyst builds features such as 'change in data usage over the past three months,' 'whether a recent support contact asked about cancellation' and 'time remaining until the contract ends,' and feeds them into a gradient boosting model. Information that cannot be known at prediction time, such as 'whether a cancellation request has already been filed,' counts as data leakage and must be excluded.

Related terms