July 2017
Intermediate to advanced
254 pages
6h 29m
English
Let's use PCA to reduce the following two-dimensional dataset to one dimension:
|
x1 |
x2 |
|
0.9 |
1 |
|
2.4 |
2.6 |
|
1.2 |
1.7 |
|
0.5 |
0.7 |
|
0.3 |
0.7 |
|
1.8 |
1.4 |
|
0.5 |
0.6 |
|
0.3 |
0.6 |
|
2.5 |
2.6 |
|
1.3 |
1.1 |
The first step of PCA is to subtract the mean of each explanatory variable from each observation:
|
x1 |
x2 |
|
0.9 - 1.17 = -0.27 |
1 - 1.3 = -0.3 |
|
2.4 - 1.17 = 1.23 |
2.6 - 1.3 = 1.3 |
|
1.2 - 1.17 = 0.03 |
1.7 - 1.3 = 0.4 |
|
0.5 - 1.17 = -0.67 |
-0.7 - 1.3 = 0.6 |
|
0.3 - 1.17 = -0.87 |
-0.7 - 1.3 = 0.6 |
|
1.8 - 1.17 = 0.63 |
1.4 - 1.3 = 0.1 |
|
0.5 - 1.17 = -0.67 |
0.6 - 1.3 = -0.7 |
|
0.3 - 1.17 = -0.87 |
0.6 - 1.3 = -0.7 |
|
2.5 - 1.17 = 1.33 |
2.6 - 1.3 = 1.3 |
|
1.3 - 1.17 = 0.13 ... |
Read now
Unlock full access