Statistical Learning
Study guides: Exam SRM, Exam MAS-II, DISC-DA, Exam ACIA-CAPSTONE
Statistical Learning is a set of methods for estimating the relationship between a response Y and predictors X_1, \ldots, X_p from data, for prediction or for inference. The relationship is modelled as
Y = f(X) + \varepsilon
fis a fixed but unknown function of the predictors.\varepsilonis a random error term, independent ofX, with mean 0.
A method is supervised when its training data record a response for each observation, and the model is trained to predict that response from the predictors. A method is unsupervised when there is no response, and it looks for structure among the predictors, such as the groups found by clustering or the directions found by principal components analysis.
Which of these is supervised: a model predicting next year's claim count from past policy years, or a grouping of territories by their loss characteristics?
- The claim count model is supervised, because each past policy year records its claim count.
- The territory grouping is unsupervised, because no territory has a recorded group to fit against.
The idea A more flexible method can fit more shapes of
f, but it is harder to interpret and does not always predict better.
Regression and classification problems
A problem with a quantitative response, such as a claim severity or a pure premium, is a regression problem. A problem with a qualitative response, taking one of K classes such as fraud or not, is a classification problem.
The line is not crisp. Logistic regression classifies a binary response but estimates class probabilities, and K-nearest neighbors and boosting handle either kind of response.
Is predicting whether a policy renews a regression or a classification problem?
- The response takes one of two classes, renew or lapse.
- It is a classification problem, even when the model used is logistic regression.
Prediction and inference
For prediction, the goal is the smallest test error, and interpretability may be sacrificed. For inference, the goal is to understand which predictors affect Y and how, so interpretability is essential. When inference is the goal, simpler and less flexible methods are preferred because they are easier to interpret.
An actuary wants to know how much a driver's age changes expected claim frequency. Is this prediction or inference?
- The question is about how one predictor affects the response.
- It is inference, so an interpretable model such as a GLM is preferred over a black-box one.
Flexibility and interpretability
There is a trade-off between flexibility and interpretability. Linear regression is relatively inflexible, because it restricts f to a linear form, and it is easy to interpret. The lasso is less flexible still, and it is interpretable because it sets some coefficients exactly to zero. Bagging, boosting and neural networks are flexible and hard to interpret.
A more flexible method has lower bias but higher variance (bias-variance trade-off). More flexible methods tend to overfit the training data, so greater flexibility does not guarantee better accuracy on test data. The test error is typically U-shaped in flexibility.
A KNN classifier is fitted with
K = 1and withK = 100. Which fit has the higher bias, and which the higher variance?
- With
K = 1, each prediction depends on one training observation, so the fit is very flexible: low bias, high variance.- With
K = 100, each prediction averages many observations, so the fit is rigid: high bias, low variance.
Methods on the syllabus
Both MAS-I and MAS-II read James et al., An Introduction to Statistical Learning. MAS-I reads Chapters 1, 2 (excluding §2.2.3), 3 (§§3.1–3.3), 4 (§§4.1–4.4), 5, 6 and 7:
| Method | James chapter | Task |
|---|---|---|
| Linear Regression | 3 Linear Regression | Regression |
| Logistic Regression, Quadratic Discriminant Analysis, Naive Bayes | 4 Classification | Classification |
| Cross-Validation, Bootstrap | 5 Resampling Methods | Estimating test error and standard errors |
| Variable Selection, Regularization, Principal Components Regression, Partial Least Squares, High-Dimensional Data | 6 Linear Model Selection and Regularization | Regression |
| Polynomial Regression, Step Function, Regression Spline, Smoothing Spline, Local Regression, Generalized Additive Model | 7 Moving Beyond Linearity | Regression (GAMs also classification) |
MAS-II reads Chapter 1, §2.2, §4.4.2 (the confusion matrix), and Chapters 8, 10 and 12:
| Method | Type | Task |
|---|---|---|
| K-Nearest Neighbors | Nonparametric | Classification or regression |
| Decision Tree | Tree-based | Classification or regression |
| Tree Ensemble | Ensemble | Classification or regression |
| Principal Components Analysis | Dimension reduction | Unsupervised |
| Clustering | K-means or hierarchical | Unsupervised |
| Neural Network | Deep learning | Classification or regression |
Logistic regression is a classifier Its name says regression, but it is used for a qualitative response, so a problem solved with it is a classification problem.
Practice questions
- Exam DISC-DA Practice Question 222
- CAS Exam MAS-I Spring 2018, Question 35
- CAS Exam MAS-I Spring 2018, Question 36
- CAS Exam MAS-I Spring 2019, Question 28
- Exam MAS-II Practice Question 7
- SOA Exam SRM Sample Question 12
- SOA Exam SRM Sample Question 29
- SOA Exam SRM Sample Question 50
- Exam SRM Practice Question 3