5-classification-DA

# 3z3u 6636 a s

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

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

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern