LOG to summarize steps in Discrimination among the Bank Notes using PC projections ================================================== > BankS = var(SwissBNot) PCbank = (data.matrix(SwissBNot)- outer(rep(1,200), apply(SwissBNot,2,mean),"*")) %*% eigen(BankS)$vec[,1:2] > apply(PCbank,2,summary) [,1] [,2] Min. -2.724e+00 -3.195e+00 1st Qu. -1.652e+00 -6.111e-01 Median -2.468e-01 -9.049e-03 Mean 1.108e-15 -3.758e-15 3rd Qu. 1.507e+00 5.804e-01 Max. 3.073e+00 3.164e+00 > plot(PCbank[,1],PCbank[,2], xlab="PC1 coord", ylab="PC2 coord", main="Scatterplot of PC1&2 for BankNotes, 2 Groups", type="n") points(PCbank[1:100,1],PCbank[1:100,2], pch=5) points(PCbank[101:200,1],PCbank[101:200,2], pch=18) ### So there is virtually perfect discrimination by this method ### using PC1 alone; PC2 is not helpful except perhaps in ### helping us to find an oblique line to discriminate perfectly. legend(locator(), legend=c("Genuine","Forged"), pch=c(5,18))