Comwindexphptitle stat841pr intable yes 1274 10092013

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: Stat841 - Wiki Cour se Notes Those familiar with the programming language C will find the s r n fline refreshingly familiar; those with no exposure to C are directed to Matlab's s r n f pit pit (http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/sprintf.html) page. Essentially, this code sets up the equation of the line in the form 0 = a + b + c . We then use the e p o x y zlt (http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/ezplot.html) function to plot the line. The 2-3 data after LDA is performed. The line shows where the two classes are split. Let's perform the same steps, except this time using QDA. The main difference with QDA is a slightly different call to c a s f , and a more complicated procedure lsiy to plot the line. > [ls,err PSEIR lg,cef =casf(ape sml,gop 'udai'; > cas ro, OTRO, op of] lsiysml, ape ru, qartc) > sm(ls=gop >u cas=ru) as= n 31 7 > k=cef12.os; > of(,)cnt > l=cef12.ier > of(,)lna; > q=cef12.udai; > of(,)qartc > f=srnf' =%+gx%*+gx2%*.y%*.2,k l q11,q12+(,) q22) > pit(0 g%*+gy%*^+gx*+gy^' , , (,) (,)q21, (,); > epo(,[i(ape:1) mxsml(,),mnsml(,),mxsml(,)]; > zltf mnsml(,), a(ape:1) i(ape:2) a(ape:2)) The 2-3 data after QDA is performed. The curved line shows where QDA splits the two classes. Note that it is only correct 2 in 2 more data points compared to LDA; we can see a blue point and a red point that lie on the correct side of the curve that do not lie on the correct side of the line. wikicour senote.com/w/index.php?title= Stat841&pr intable= yes 13/74 10/09/2013 Stat841 - Wiki Cour se Notes c a s f can also lsiy be used with other discriminant analysis algorithms. The steps laid out above would only need to be modified slightly for those algorithms. Re call: An analys is of the function of p i c m in matlab. rnop In our assignment 1, we have learnt that how to perform Principal Component Analysis using SVD method. In fact, the matlab offers us...
View Full Document

This document was uploaded on 03/07/2014.

Ask a homework question - tutors are online