powered by
Computes the orthogonality constraint violation defined as the distance (infinity norm) between \(U^\top U\) and the identity matrix.
orthogonality_violation(U)
A float.
A matrix. Each column correspond to an p-dimensional PC.
library(datasets) TestMat <- cor(datasets::mtcars) mspcares <- mspca(TestMat, 2, c(4,4)) orthogonality_violation(mspcares$x_best)
Run the code above in your browser using DataLab