Distinguish unsupervised learning models from supervised ones and from reinforcement learning models.
The idea
The three families differ in what feedback the algorithm gets. Supervised learning trains on labelled examples, inputs paired with the correct output, and learns to predict the label for new inputs. Regression predicts a number and classification predicts a category, such as default from past loans. Unsupervised learning has no labels and looks for structure in the inputs alone, for example clustering with K-means or compressing features with principal components. Reinforcement learning has no labelled answers either. An agent takes actions in an environment, receives rewards, and learns a policy that maximises cumulative reward over time, with today's action affecting future states. The test is to ask what the model learns from: labels, nothing but the data, or rewards earned through its own actions.
A practice question
What defines a supervised learning model?
- It finds structure in inputs without any labels.Why not: Describes unsupervised learning.
- It learns from rewards received from interacting with an environment.Why not: Describes reinforcement learning.
- It requires no training data at all.Why not: All three learning types require data or experience to learn from.
- It is trained on data in which each input is paired with a known output label. - correct
Supervised models learn the mapping from inputs to labelled outputs, for regression or classification.
A harder one
Which pairing of task and learning type is correct? Task 1: predict default using labelled historical loans. Task 2: group clients by behaviour without labels. Task 3: an algorithm learns an order-execution policy by trial and reward.
- Task 1 unsupervised; Task 2 supervised; Task 3 reinforcement.Why not: Swaps labelled and unlabelled data.
- Task 1 supervised; Task 2 unsupervised; Task 3 reinforcement. - correct
- Task 1 supervised; Task 2 reinforcement; Task 3 unsupervised.Why not: Treats trial-and-reward learning as unsupervised and clustering as reinforcement.
- Task 1 reinforcement; Task 2 unsupervised; Task 3 supervised.Why not: Treats labelled prediction as reinforcement and reward-based learning as supervised.
Labels point to supervised learning; no labels and a search for structure indicates unsupervised; rewards from actions indicate reinforcement learning.
The hardest tier
A bank has 100 features on 50,000 loans, each labelled default or non-default. It first compresses the features to ten with principal components analysis, then fits a logistic regression to predict default. How should the overall approach be described?
- Both steps are unsupervised, because PCA is used.Why not: Ignores that the logistic regression uses default labels.
- Both steps are supervised, because the data carry labels.Why not: PCA does not use the labels.
- The approach is reinforcement learning, because the bank repeats the process each period.Why not: Repetition over time does not create rewards or an agent.
- The PCA step is unsupervised and the logistic regression step is supervised. - correct
PCA is applied to the features alone, so it is unsupervised. The logistic regression learns from the default labels, so it is supervised.
In the app: 6 practice questions on this outcome, spaced review that brings it back before you forget it.
Start free →More in Machine-Learning Methods
- Discuss how machine-learning techniques differ from classical econometrics in both philosophy and practice.
- Compare the two methods used to rescale variables when preparing data, and apply them.
- Explain what the training, validation and test sub-samples are, and the distinct purpose each serves.
- Examine how underfitting and overfitting differ and what follows from each, and outline possible remedies for both.
- Use principal components analysis to compress a set of features into fewer dimensions, and explain why that works.
- Outline how K-means assigns the observations in a sample to separate clusters.
- Describe how natural language processing works and what it is used for.
- Describe the operation of reinforcement learning and calculate the Q-values used when making decisions.