5-classification-DA

58 x 5810 x 03350 72703197 980 2732119653 194 162853

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: leic, arachidic, eicosenoic) we’ll find the space son with comp three with but ju s) tatisti regions, Example: Using /)*&=#)* var rule. lofthreeeparation accbut justthe (g-1)*3"&.'#"='#G achidic, eicosenoic) we’ll find the s best s regions, ording to 3 LDAiables (linoleic, ar ording to the 1033.50 le. LDA ru 1196.53 727.03 980.53 ¯ ¯ ¯ ¯ X1 = 63.12 X2 = 73.17 3 = 37.58 X = 58.10 X 033.50 727.031.97 980 27.321196.53 1.94 16.28.53 ¯ ¯ X3 = 37.58 ¯ 63. X2 = 12 73.17 Statistics 503, Spring 2013, ISU X = 58.10 11499.04 −38.47 −1.38 20484 27. 44383.12 −709.53 −806.2 32 1. 94 1.97 16.28 .07 −52093.16 S1 = −709.53 −806.20 124.64 55.08 55.08 70.42 S2 = 09.53 −806.2 H%"@"'(+*>(%"(6+.# 11499.04 5 15181902.6 1190534.28 432963.52 −38.47 24B = 1190534.3 94004.06 41048.13 .64 55.08 S2 = 0 x1 -5 5 55.08 70.042 − 64 432963.5 41048.13 90443.1.38 Cor : -0.591 Cor : -0.397 Cor : 0.854 1: 0.526 1: 0.598 2: 0.63 2: 0.6 2: 0.66 3: 0.704 3: 0.714 3: 0.656 1: 0.583 −38.47 −1.38 141.20 0.37 0.37 0.55 −2093.16 4.18 S3 = 861.93 −3.96 −38.47 −1.38 20484.07 18479382.0 − 546173.84 −259104.52 data=df3) 141.20 546173..8 183120345 0 37 S . = −2093.16 W = −> df.lda <- lda(y~., 17177.11 predict(df.lda, 4.18 0.37> df3.ds <-17177.11 0.55 −259104.5 22808.04 df3)$x 4 Cor : 0.629 Cor : and We’re not going to calculate this out by h-0.296 ! So using R: > df3$LD1 <- df3.ds[,1] 0 1: 0.594 1:2:0.621 x2 2: 0.64 -4 1190534.28 432963.520.599 18479382.0 −546173.84 − example4.lda<-lda(d.olive[,c(7,9,10)],d.olive[,1]) > df3$LD2 <- df3.ds[,2]259104.52 3: 0.695 3: 0.605 4 2 x3 0 -2 0 2 4 Cor : -0.259 W = −546173.8 Yields the.coefficients of the discriminant space to −259104.5 b e: 41048 13 90443.64 -8 example4.lda$scaling-4 0 4 .13 94004.06 41048 1: 0.565 2: 0.672 3: 0.689 LD1 LD2 calculate-0.003758341 y hand! So using R: this out b -0.003917144 linoleic 2 0 arachidic -0.007025583 -0.043607248 x4 -2 d.olive[,c(7,9,10)],d.olive[,1]) -4 eicosenoic -0.162984687 0.062939203 2 -6 -4 -2 0 2 ng 1 ex2<-predict(example4.lda,d.olive[,c(7,9,10)],dimen=2)$x LD2 y 0 y 2 cl<-predict(example4.lda,d.olive[,c(7,9,10)],dimen=2)$class nts of the discriminant space to be: ex3<-as.matrix(d.olive[,c(7,9,10)])%*%example4.lda$scaling 3 -2 par(mfrow=c(1,2)) LD1 LD2 plot(ex2[,1],ex2[,2],xlab="Discrim 1",ylab="Discrim 2",type="n") points(ex2[cl==1,1],ex2[ -4 58341 -0.003917144cl==1,2],pch="1") points(ex2[cl==2,1],ex2[cl==2,2],pch="2") 25583 -0.043607248cl==3,2],pch="3") points(ex2[cl==3,1],ex2[ -5 Statistics 503, Spring 2013, ISU plot(ex3[,1],ex3[,2],xla 84687 0.062939203b="-.0037Lin-.007Ara-.163Eic", ylab="-.004Lin-0.044Ara+0.063Eic",type="n") points(ex3[cl==1,1],ex3[cl==1,2],pch="1") le4.lda,d.olive[,c(7,9,10)],dimen=2)$x points(ex3[cl==2,1],ex3[cl==2,2],pch="2") e4.lda,d.olive[,c(7,9,10)],dimen=2)$class points(ex3[cl==3,1],ex3[cl==3,2],pch="3") 1 2 3 0 LD1 5 −2 17177.11 183120.45 !"#$%"&"'(')* 22808.04 1...
View Full Document

Ask a homework question - tutors are online