← Machine learning: intermediate and advanced
Lesson 2 of 4
Feature engineering
Watch, read the card, then practise. Scaling · Encoding categories · Choosing features
The video for this lesson is being recorded.
Meanwhile, the notes below and the 60-second cards cover the same ideas.
Practise this topicScaling
Scaling puts features on similar ranges, so no feature dominates just because of its units.
Remember: Fit the scaler on training data only, then apply it to test data.
Encoding categories
Models need numbers, so text categories must be encoded.
Remember: No natural order → one-hot. Real order → ordinal.
Choosing features
Feature selection keeps the inputs that help and drops the ones that add noise or leak the answer.
Remember: Ask: would I know this feature at prediction time?
Try the example in Code Lab
import numpy as np x = np.array([10, 30, 60]) print(((x - x.min()) / (x.max() - x.min())).round(2).tolist())