5-classification-DA

3z3u 6636 a s

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: “large” & spee 18 These are called the linear discriminant functions. 2.2 Incorp orating prior probabilities C>D*'(*0>'(E If the prior probability for group k is pk then the discriminant functions ¯￿ ¯￿ ¯ Xk S−1 ed X0 − Xk S−1 ed Xk + log pk pool pool k=1 where log is F#)"&()"'@*A=A2+()"='*>(%"('$.*"#*(* away from the grou the natual log. This shifts the boundary Example: We might use the sample size in the olive oils, nS ard = 98, A%=6+.&0*<")?*(*+"&").3*'2&6.%*=;*3()(* bilities, pS ard = 98/249 = 0.39, pN th = 151/249 = 0.61. The result is to ch A="')#G −42.61(= −43.04 + log(151/98)). The training error is slightly better, 7/ R=+2)"='S*:?('@.*)?.*.#)"&()"='*&.)?=30* ('3*2#.*(*A.'(+"8.3*.#)"&().0* (1 − λ)S + λI, λ ∈ [0, 1] ¯ ¯ (Xk − X0 )￿ S−1 (Xk pooled 4 19 Statistics 503, Spring 2013, ISU a1 = β0 + β1 mxPH + β2 mnO2 + β3 Cl F$2-,'G$)*456 β7 Chla + τseason + 60 80 100 > library(penalizedLDA) > df5.plda <- PenalizedLDA(df5[,1:200], df5[,201], lambda=0.2, K=1, xte=df5.test[,1:200]) > hist(df5.plda$xproj, col="grey70", ylim=c(-10,+ β2 mnO2 + β3 Cl + β4 N a1 = β0 + β1 mxPH 100), xlab="PLD1", main="Penalized LDA") Penalized LDA β8 Chla + τseas > abline(h=0, lty=2) > text(df5.plda$xteproj, rep(-5, 40), label=df5.test$y) > table(df5.test$y,df5.plda$ypred) Frequency 12 1 20 0 2 0 20 0 20 40 a1 = β0 + β1 Cl + β2 oPO4 + β3 Chla + 2 ￿ a1 = 22 22 222 2 2 222 2 1 111111 1 1 11 11 5.27 − 0.41Cl − 0.69oPO4 − 0.55Ch -2 -1 0 1 2 PLD1 = 5.57 ISU Statistics 503, Spring 2013,− 0.41Cl − 0.69oPO4 − 0.55Ch = = 5.77 − 0.41Cl − 0.69oPO4 − 0.55Ch 20 5.76 − 0.41Cl − 0.69oPO4 − 0.55Ch Linear Discriminant Analysis F%1H$/0'12*(0$# LDA is based on the assumption that the data comes from a multivariate normal distribution with equal variance-covariance matrices. Comparing the density functions reduces the rule to: Y?.'*)?.%.*(%.*)<=*@%=2A#S Allocate a new observation, X0 to group 1 if 1 ¯ ¯ ¯ ¯ ¯ ¯ (X1 − X2)￿S−1 X0 − (X1 − X2)￿S−1 (X1 + X2) ≥ 0 pooled pooled 2 else allocate to g...
View Full Document

This note was uploaded on 02/06/2014 for the course STAT 503 taught by Professor Staff during the Fall '08 term at Iowa State.

Ask a homework question - tutors are online