From: Rupika Bandara on
Hi all,
I want to reduce dimensions of the data, therefore I need to use princomp function in MATLAB. Can I use (1x39) matrix as input to princomp function? When I use it I can get (39x39) matrix which comprises of 0 and 1. Can you please help me?

Thank you
From: Steven Lord on

"Rupika Bandara" <rupika23(a)yahoo.com> wrote in message
news:hvc7i3$sui$1(a)fred.mathworks.com...
> Hi all,
> I want to reduce dimensions of the data, therefore I need to use princomp
> function in MATLAB. Can I use (1x39) matrix as input to princomp function?

Sure, although trying to generate principal components for 39 variables with
just one lone observation sounds a bit sketchy to me. Normally wouldn't you
want a LOT more data for such an analysis?

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com


From: Javier Montoya on
On Jun 17, 3:57 pm, "Steven Lord" <sl...(a)mathworks.com> wrote:
> "Rupika Bandara" <rupik...(a)yahoo.com> wrote in message
>
> news:hvc7i3$sui$1(a)fred.mathworks.com...
>
> > Hi all,
> > I want to reduce dimensions of the data, therefore I need to use princomp
> > function in MATLAB. Can I use (1x39) matrix as input to princomp function?
>
> Sure, although trying to generate principal components for 39 variables with
> just one lone observation sounds a bit sketchy to me.  Normally wouldn't you
> want a LOT more data for such an analysis?


Hi guys,

Just to understand the input for princomp(X). From the 'help', it's
written that the input X
is a N-by-P data matrix X. This means, that the we have 'N' feature
vectors, each containing 'P' elements, right?
As an example, in my case I have a 27 feature vectors, each of 500
dimensionality (size(X) = 27x500). When I do:
[COEFF, SCORE] = princomp(X) is turns out that in SCORE I have some
values from columns 1 to 26, then from columns 27
to 500 there are just zeros.

Best wishes
From: Peter Perkins on
On 7/13/2010 5:28 AM, Javier Montoya wrote:
> As an example, in my case I have a 27 feature vectors, each of 500
> dimensionality (size(X) = 27x500). When I do:
> [COEFF, SCORE] = princomp(X) is turns out that in SCORE I have some
> values from columns 1 to 26, then from columns 27
> to 500 there are just zeros.

That is exactly what you should expect. With only 27 observations, the
data can be rotated so that it lies in a 26 dim subspace of R^500. 26,
because the column means are removed. If you don't want to see those,
use the 'econ' flag.