![]()
where
![\begin{displaymath}\mathbf{A}=\left[ \begin{array}{ccc}\mathbf{a}_{1} & \cdots......s & \Psi _{N}\\\downarrow & & \downarrow\end{array}\right] \end{displaymath}](img15.png)
and N is the rank of F. A
is a KT x N matrix of the left eigenvectors of F,
D
is an N x N diagonal matrix of eigenvalues (a.k.a. singular
values), and
is a P x N matrix of right eigenvectors (eigenimages).
In Matlab, this is accomplished by the svd routine, but you
might want to use pca.m instead, whose results can be fed directly
into the subsequent analysis by ind.m, which calculates the indicator
functions.
The syntax of pca.m looks like this,
![]()
where
is the number of largest eigenvalues (and corresponding eigenvectors) to
calculate. In other words, the full data matrix F
is approximated by n most significant principal components. Of course,
the full spectrum of N eigenvalues can be calculated, but our experience
tells us that, for typical imaging data form our laboratory (intrinsic
optical imaging of cat or monkey primary visual cortex), most of the neural
signal is captured by the first ~100 principal components. We often choose
n
~200 , which is a fairly conservative truncation, yet the subsequent calculations
are considerably faster, and the results are almost indistinguishable from
the full calculation.
After obtaining the principal components, we recommend users to plot
the eigenvalue spectrum (semilogy probably gives the best scale),
and to check the
's
and a's to see if there is any obvious artifacts
or strange behavior in the data. The eigenview.m routine displays
the
's
as images and plots its associated a's, but
some modification may be necessary in order to adjust for a particular
pixel dimension of the images.