### Create a StudySoup account

#### Be part of our community, it's free to join!

Already have a StudySoup account? Login here

# 479 Class Note for CHEM C1260 at Purdue

### View Full Document

## 21

## 0

## Popular in Course

## Popular in Department

This 14 page Class Notes was uploaded by an elite notetaker on Friday February 6, 2015. The Class Notes belongs to a course at Purdue University taught by a professor in Fall. Since its upload, it has received 21 views.

## Similar to Course at Purdue

## Reviews for 479 Class Note for CHEM C1260 at Purdue

### What is Karma?

#### Karma is the currency of StudySoup.

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 02/06/15

Using LDA Randy Julian Lily Research Laboratories Linear Discriminant Analysis Used in Supervised Learning Must know some class information Q Uses withinclass scatter and betweenclass scatter to choose coordinate for transformation Compare to PCA n Eigenvectors PCA and LDA PC1 Classes unknown Unsupervised Projection to a new axis 2 Classes known supervised LD2 n Comparison of LDA ancl PCA o o o 0 00 n a an arm a 0 on s a on m a 4 0 e o a u u u 3 a 2n g 2 E 5 m o m 5 Equot n a 75 5 4m 45 3 2n 2U 45 4n 75 n 5 m 45 x1 Multiplot i x1 Largest a 2 spread 39 39 393 in x1x2 39 2 23 Classes a 3 separated 393 on x3 X3 smallest quotw nz QM 45 4n 75 n 5 4n 4 7n5 nu n5 4 PCA quot 39 z 39 P01 3 as 39 w PC1ampPC2 capture most 3 39 varIatIon m PC2 t 239 PC3 captures quot 39 least PC3 Canomcals LD1 w largest DXi in rst smaller DX last LD2 LD3 Computing Projections in R ibrarymva this comes with R pcaltprcompcgtlt 4 vltdataframepcagtlt1pcagtlt2pcagtlt3 namesvltcquotPC1quotquotPC2quotquotPC3quot plotvcocgtlt4 ibraryfpc get this from the course web site fpczip Xltdiscrcoordcx4cx4 dataltdataframegtltproj namesdataltcquotLD1quotquotLD2quotquotLD3quot plotdata cocgtlt4 u date ackagesfmmtRAN R Cupvn P P yeeeloh 162 izooaeolelui R lo 22 software oho Domes Inch ABSOLUTELY No WARRANTY you are welcome to redlscrlhuce lo under DErtaln oohomohe Type lloeheeii o lloehoeiil in dlstrlhutl n decalls R ls o cullshurarJVE project Inch loony concrlhucurs Type cohoelhooozsiil for more lhzomooloh Type demuii for some oemos helpii for ohellhe hElpr or helpscartii to o llThL browser ncerface to help Type qii to on R gtI or from CRAN nrhr rm r mm m J h We AnalyzeFMRl N W E hindaia W h haulsivav m hail hm cclusl cla chmquot EucSlals v Linear Discrimin sample mean vectors 1 N Sample oovariance ma ant Functions 112 trix Pooled sa mple cova ria nce matrix 1 11 er Ni IJS Nz IJSzl 3 n Standard Distances to discrimants multivariate standard distance T DX1gtXzr fgiw multivariate standard distance nonsingular S Di1gtiz il izTsili1 izIZ vector of coef cients of the linear discriminant function b SW 42 And now in R by hand rawdatalt matrixscanquottablldatquotncol3byrowT group lt rawdata K lt 100 rawdata23 Apf lt XgrouplJ Af lt XgroupOJ Xbarl lt applyAf 2 mean 81 lt varAf N1 lt dim1 f 1 Xbar2 lt applyApf 2 mean 82 lt varApf N2 lt dim1 pf 1 Slt Nll SlN2l82 NlN22 SinvsolveS dlt Xbarl Xbar2 b lt Sinv d v lt X b Ancl using LDA d lt data frame rawdata names ltc IlyIl I quotX1quot I quotX2 ll dxl dx2 dxl 100 dx2 100 glt1da y x1 x2 datad v2 lt predictg d Assembling R into a system Windows NT System Web Server R H Statistical sequest 62gt LCQ Mass Spec Computing 3 Summary MS les dta zta Package Y Manual Calculation Projection onm1st Canonical rmnual W3 20 38 a E a a 39 f E E a 5 62 A a E 59 A BI 7 g 7 f 1 i m I I I I i I I I I I I I2n Ian MEI I5n 75 u 5 In I5 2n gt11 v LDA Calculation Projection onto 1st Canonical LDA a hsla 1n15hsIa 7nnq7 a f a a 39 f g E 7 I a A 95 a a A 26 5 a g 7 f I cu m l I I I I I I I a 2 I u I 2 a gtq 1 LDI How this can blow up from hep da The function tries hard to detect if the within class covariance matrix is singular If any variable has within group variance less than tol 2 it will stop and report the variable as constant This could result from poor scaling of the problem but is more likely to result from constant variables 10 n If you have this X1 g 33 a39 quota x Lquot X2 xi F 39 x3 You ll see this gt gltdayx1x2x3datacx Error in dadefautx grouping variables 1 appear to be constant within groups R could not solve the matrix inverse because the withinclass covariance matrix was singular n Singular Covariance Matrix R could not solve the matrix inverse because the withinclass covariance matrix was singular x1 x2 x3 x1 0 000000000 0000000000 x2 0 2376704236 0005248020 x3 0 000524802 0009958677 5 LD1 239 39 i g L D2 4 a L03 mg n 3210123 m mg on mg m 1u5u51u muauuu m 13 x10 H mm a a gang X7 luvWm Ha A MH 5 Ana ypoa zu ma w 2 3 mampm w an 39 m maquot x3 cm weawwb i m m m 31 3P 35 f f i WQ 511 3i 52 34i3i l 5 g 5 P05 EQ ii am 54 in 4 mMi mama apov m igxs gmmwmwwampmmw Q wmg w gwd w w m h E mmampW H T 5 x8 l 223 4n n mmm i 1m suggests Hmi2 i333 5quot E7 2314 23 fir 1 at Hewwwww wWS ii E E 2 3M 41quot 4 5e 7 References lt gt Fixed Point Clusters and Discriminant Project Plots Christian Hennig Univ Hamburg Dept of Mathematics Center of Mathematical Statistics and Stochastic Processes httpwwwmathunihamburgdehomehennigfixregfixreghtml 14

### BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.

### You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

#### "I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

#### "I made $350 in just two days after posting my first study guide."

#### "I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

#### "It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.