Huanfa Chen - huanfa.chen@ucl.ac.uk
17th November 2025
CASA0007 Quantitative Methods
Lecture 8 - multilevel regression
Looked at:
Image credit: Google Gemini
Image credit: www.photofacts.nl
Canon EOR R8 has a maximum resolution of 6000 * 4000 pixels for JPEG/HEIF, where every pixel corresponds to three colour channels (RGB). What is the dimensionality of an image from EOR R8?
You are given the following dataset (with 1000 rows and 3 columns)
| x1 | x2 | month | |
|---|---|---|---|
| 0 | 1.2 | 4.5 | Jan |
| 1 | 3.4 | 2.2 | Feb |
| 2 | -0.5 | 3.3 | Mar |
| 3 | 2.1 | -1.1 | Apr |
| 4 | 0.0 | 0.7 | May |
| … | … | … | … |
What is the dimensionality of the feature space for this dataset after one-hot encoding of the month** column (with one category dropped)?**
A. 2 B. 11
C. 13
D. 14
Pearson, Karl. “LIII. On lines and planes of closest fit to systems of points in space.” The London, Edinburgh, and Dublin philosophical magazine and journal of science 2.11 (1901): 559-572.
Image credit: Mathematics for Machine Learning
| Attribute | Description |
|---|---|
| PTFSM6CLA1A | Percentage of pupils eligible for Free School Meals in the past six years (FSM6) and/or Children Looked After (CLA1A). |
| PTNOTFSM6CLA1A | Percentage of pupils not eligible for FSM6 and not CLA1A. |
| PNUMEAL | Percentage of pupils whose first language is known or believed to be other than English. |
| PNUMFSMEVER | Percentage of pupils who have ever been eligible for Free School Meals in the past six years (FSM6 measure). |
| ATT8SCR_FSM6CLA1A | Average Attainment 8 score for pupils eligible for FSM6 and/or CLA1A. |
| ATT8SCR_NFSM6CLA1A | Average Attainment 8 score for pupils not eligible for FSM6 and not CLA1A. |
| ATT8SCR_BOYS | Average Attainment 8 score for male pupils. |
| ATT8SCR_GIRLS | Average Attainment 8 score for female pupils. |
| P8MEA_FSM6CLA1A | Progress 8 measure for disadvantaged pupils (FSM6 and/or CLA1A). |
| P8MEA_NFSM6CLA1A | Progress 8 measure for non-disadvantaged pupils. |
Rule #1: “5-10 times as many subjects as variables”
Rule #2: with several hundred observations, PCA are probably reliable.
Reference: R in Action, by Robert I Kabacoff
Source: R in Action
60,000 examples of handwritten digits 0~9. Each digit is an 28*28 image or 784 pixels (dimensions)
Source: Chapter 10, Mathematics for Machine Learning
© CASA | ucl.ac.uk/bartlett/casa