Skip to main content

Give an example of feature engineering that made a model better.

Machine learning basics · Intermediate 1

Short answer

Turn raw data into signals the model can use. For a food delivery time model, a raw timestamp helps little, but hour of day, day of week, whether it is a festival day, distance from restaurant to customer and the restaurant's recent average preparation time capture what really drives delay. Check each feature on validation data and watch for leakage.

Deeper answer

Good answers name the domain reasoning, not just the technique. Common transforms: extracting parts of dates, ratios such as amount over the customer's average, counts and aggregates over a time window, text length or keyword flags, and encodings for categories, such as target encoding fitted inside training folds.

Then prove value: compare validation scores with and without the feature, and look at feature importance. Be careful that aggregates use only past data at prediction time. Tree models need less scaling and fewer interaction features than linear models, which is worth saying if you mention model choice.

What a strong answer covers

Answer it out loud in the mock interview about 1.5 min

Follow-ups to expect

Common mistakes

Learn it

Feature engineering

Today's AI turns are used

Lessons, roadmaps, videos, practice cards and the code playground stay free with your account, with no limit.