This preview shows page 1. Sign up to view the full content.
Unformatted text preview: h cloud onto
one point on some projected line, then make those two points as far apart as possible. In doing so, we make it very easy to tell which class a data point belongs to. In
practice, it is not possible to collapse all of the points in a cloud to one point, but we attempt to make all of the points in a cloud close to each other while simultaneously far
from the points in the other cloud. Example in R P CA and FDA primary dimension for normal multivariate data, using R
wikicour senote.com/w/index.php?title= Stat841&pr intable= yes 17/74 10/09/2013 Stat841 - Wiki Cour se Notes > X=mti(rw40no=)
(e(rd,0)rp"le,0) Create 2 multivariate normal random variables with . Create Y an index indicating which class they
, belong to.
> s< sdXn=,v1
- v(,u1n=) Calculate the singular value decomposition of X. The most significant direction is in s v , ] and is displayed as a black line.
> s < laXgopn=)
> 2 - d(,ruigY The l afunction, given the group for each item, uses Fischer's Linear Discriminant Analysis (FLDA) to find the most discriminant direction. This can be found in
Now that we've calculated the PCA and FLDA decompositions, we create a plot to demonstrate the differences between the two algorithms. FLDA is clearly better suited
to discriminating between two classes whereas PCA is primarily good for reducing the number of dimensions when data is high- dimensional.
> po(,o=,an"C v.FAeape)
> ltXclYmi=PA s
xml" Plot the set of points, according to colours given in Y.
> bieaitretbsoe Plot the main PCA direction, drawn through the mean of the dataset. Only the direction is significant.
View Full Document
This document was uploaded on 03/07/2014.
- Winter '13