AI & Machine Learning · reviewed in July 2026
Feature engineering
Feature engineering is the process of creating, transforming, or selecting the input variables (features) a machine learning model will use to learn, with the goal of better capturing the pattern you want to predict. It often has more impact on the final model's quality than the algorithm you choose.
Frequently asked questions
Can you give an example of feature engineering?
From a purchase date you can derive new features like the day of the week, whether it was a weekend, or days since the last purchase — information the model wouldn't see directly in the raw date.
What does it mean to encode a categorical variable?
It means converting a text variable (like 'red', 'green', 'blue') into a numeric representation the model can process, for example via one-hot encoding, which creates one binary column per category.
Why does scaling numeric variables matter?
Because many algorithms are sensitive to scale: a variable in the millions next to one in the tens can make the model give the first one disproportionate weight just from its magnitude, not its actual relevance.