Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!postnews.google.com!w24g2000prd.googlegroups.com!not-for-mail
From: "russell.fung@gmail.com" <russell.fung@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Feature Extraction for EMG data using PCA
Date: Wed, 4 Mar 2009 06:46:10 -0800 (PST)
Organization: http://groups.google.com
Lines: 43
Message-ID: <201b79d3-5e38-45ee-9b0b-04cbc8584045@w24g2000prd.googlegroups.com>
References: <goh104$17e$1@fred.mathworks.com> <6a1f9244-51d8-4e3b-9fb8-2aefcab53109@y33g2000prg.googlegroups.com> 
	<golmid$8sp$1@fred.mathworks.com>
NNTP-Posting-Host: 129.89.57.61
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1236177970 1128 127.0.0.1 (4 Mar 2009 14:46:10 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 4 Mar 2009 14:46:10 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: w24g2000prd.googlegroups.com; posting-host=129.89.57.61; 
	posting-account=40KBCAoAAACMcpWjfyXfeKnqSR9nlxRk
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; 
	rv:1.9.0.6) Gecko/2009011912 Firefox/3.0.6,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:522444


On Mar 4, 4:53=A0am, "anoop " <nomail...@rediffmail.com> wrote:
> "russell.f...@gmail.com" <russell.f...@gmail.com> wrote in message <6a1f9=
244-51d8-4e3b-9fb8-2aefcab53...@y33g2000prg.googlegroups.com>...
> > On Mar 2, 10:20=3DA0am, "anoop " <nomail...@rediffmail.com> wrote:
> > > I have a EMG data matrix of size 90(subjects) x 4800(variables). I wa=
nt t=3D
> > o apply PCA to reduce the no. of variables, e.g ( i want matrix of size=
 90 =3D
> > x 1200 after PCA).
> > > I need a matlab program to do so. suggestions are welcome!!
>
> > You can write a program to do PCA using subroutines included in basic
> > Matlab without any extra toolboxes.
>
> > You need to find the eigenvectors and eigenvalues of the covariance
> > matrix of your data, from which you find the most significant
> > principal components, then you expand your data along the principal
> > directions.
>
> well i wrote the program as given below:
> max_PCs=3D1200;
> covariance_matrix=3Dcov(data);
> [eigvect,eigval]=3Deig(covariance_matrix);
> eigval=3Ddiag(eigval);
> [junk,rindices]=3Dsort(-1*eigval);
> eigen_values=3Deigval(rindices);
> arranged_eigen_vectors=3Deigvect(:,rindices);
> eigen_values_extacted=3Deigen_values(1:max_PCs);
> principle_components=3Darranged_eigen_vectors(:,1:max_PCs);
> projected_data=3Dxpca*principle_components;
>
> but it takes very long time to execute. could you please give me faster m=
atlab code?? what should i use for training the neural network (projected d=
ata or principal components) ??

The PCA function in MATLAB's statistical toolbox may be faster,
although I have never tried it.

You can also ask yourself if you really need an exact PCA solution? If
an approximate solution is good enough, take a look at
http://www.cse.msu.edu/~weng/research/ccipca.m

Russell