1
$\begingroup$

I'm currently trying to perform analysis of a spectrogram, with the use of PCA. I'm confused about what the dimensions of the result should therefore be. Currently, the dimensions are: 451x128. But I thought that it was a standard image, and therefore it should have 2 dimensions.

$\endgroup$
  • $\begingroup$ what result are you referring to? $\endgroup$ – geometrikal Jun 2 '14 at 10:35
  • $\begingroup$ @geometrikal Hey - I'm referring to the STFT results. The dimensions are: 128x128 it's making it difficult to determine the Eigen values/vectors any ideas? $\endgroup$ – Phorce Jun 2 '14 at 13:21
0
$\begingroup$

It does have two dimensions. An image of size $N \times M$ has two dimensions. Three dimensions would be $N \times M \times L$, and so on. For each pixel with coordinates $x$ and $y$, in two dimensions, you have a spectrum magnitude value.

However, if you start treating rows or columns of your spectrogram as vectors, then you're interpreting them as 451 points in 128-dimensional space or 128 points in 451-dimensional space. This is different.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks for the reply. Basically, I have this: std::vector<std::vector<double> > which would therefore infer $N x M$ right? I'm just computing the eigen values and vectors and still getting the same as if I had a matrix which looked like: $ M = [1 2; 3 4]$ does this make sense? $\endgroup$ – Phorce Jun 3 '14 at 20:34
  • $\begingroup$ How are you computing them? $\endgroup$ – Phonon Jun 3 '14 at 20:58
  • 1
    $\begingroup$ I calculate the cov matrix of the spectrogram and then using the standard equation: $$\frac{a+b\pm\sqrt{(a+b)^2-4(ab-c^2)}}2.$$ calculate the eigen values. I get a 2x2 matrix of eigen values. Do you want an example? I understand what you mean about the 2x2 and this equation should work. I just don't see how I can validate this. I'm computing PCA by the way! $\endgroup$ – Phorce Jun 3 '14 at 23:24

Not the answer you're looking for? Browse other questions tagged or ask your own question.