March 2019
Beginner to intermediate
448 pages
13h 14m
English
We will follow a similar to the one as we have used so far. We will generate a dataset, contaminate it, and then extract both regular principal components and robust ones. Because principal components are calculated using the covariance matrix, they suffer from serious sensitivity to outliers:
library(MASS)library(rospca)set.seed(100)matrix = diag(10)matrix[2,1] = 0.8matrix[1,2] = 0.8matrix[4,3] = 0.8matrix[3,4] = 0.8matrix[5,6] = 0.8matrix[6,5] = 0.8
d <- mvrnorm(n = 1000, mu=rep(0,10), matrix) prcomp(d,scale=TRUE,center=TRUE)
These eigenvalues can be interpreted as ...
Read now
Unlock full access