Map 1 · Supervised learning · Step 5

Control complexity

How simple can the model be and still capture the pattern?

Key formula

Fact or figure

gives ordinary least squares; as every coefficient goes to 0. In an SVM, C works the other way round: a small C means strong regularisation.

Skip this step and…

With hundreds of candidate features and only a few thousand customers, an unpenalised model fits the training set beautifully and next month badly.

Telco example

LASSO keeps 12 of Telco's 40 features and sets the rest exactly to zero. λ is chosen by 5-fold cross-validation on standardised training data.

Learn it

Taught in Section 5 (Regularisation and Model Selection) and Section 6 (Clustering and Support Vector Machines) of the course. The map follows the machine learning workflow, the order you build a model in; the course teaches in the order that is easiest to learn, so the numbers can jump.

How it connects

Feeds into · Step 6 Turn predictions into decisionsThe tuned model's scores are what the threshold is set on Where do I draw the line, given what each mistake costs?
Builds on · Step 2 Get, split and prepare the dataλ is chosen on validation data, with scaling fitted inside each training fold How do I keep part of the data honest for the final check?
Builds on · Regression lane · step R2 Fit itRidge and LASSO are this same objective plus a penalty Which coefficients fit the data best?
Builds on · Regression lane · step R3 Read and check itRidge steadies the coefficients that multicollinearity makes unstable What do the coefficients mean, and can I trust them?
Builds on · Classification lane · step C2 Fit itHinge loss plus the C parameter is a regularised objective Which coefficients make the observed labels most probable?
Builds on · Step 4 Evaluate honestlyCross-validation is how λ and C are chosen Will it work on customers it has never seen?
Builds on · Step 3 Choose K and judge the resultK is a complexity dial too: more clusters always fit the data more closely How many groups, and are they any use?Plot against and look for the elbow. Builds on · Foundation Empirical risk minimisationRegularisation is ERM plus a penalty Builds on · Foundation Bias–variance trade-offWhy a penalty can lower test error

← Back to the whole map