Data & Features

feature engineering

/ FEE-cher en-juh-NEER-ing /

A cook doesn't just throw raw groceries at a guest; they chop, season, and combine ingredients into something digestible. Feature engineering is that prep work for data: turning raw recordings into the informative inputs — the features — that a model can actually make sense of. It is often where human insight about a problem matters most.

In practice you create, transform, or combine columns so the signal becomes easier to learn. From a raw timestamp you might extract the day of the week, whether it's a holiday, or the hour of day. From height and weight you might compute body-mass index. You might take logs of skewed money values, bucket ages into ranges, multiply two features to capture an interaction, or count how many times a user logged in last month. The art is encoding what you know about the domain into numbers the model can use.

Why it matters: a simple model with well-chosen features often beats a fancy model fed raw, confusing inputs. For classic tabular data, thoughtful feature engineering is frequently the single biggest lever on performance. The caveat is that modern deep learning, especially on images, audio, and text, learns its own features from raw data, shrinking the need for hand-crafting in those areas — though it remains essential for the spreadsheet-style data that dominates business problems.

Predicting taxi fares, the raw pickup and drop-off coordinates are nearly useless on their own. Engineering the straight-line distance between them, plus whether the trip crosses a bridge and whether it's rush hour, gives a simple model nearly all the predictive power it needs.

Two raw coordinate pairs become one powerful feature: trip distance.

A feature must only use information available at prediction time. Building a feature from data that arrives after the moment you'd actually predict — or that secretly encodes the label — is the classic cause of data leakage and models that dazzle in testing then collapse in the real world.

Also called
feature constructionfeature crafting特征工程特徵工程