pcas
Functions
-
int main(int argc, char *argv[])
pcas [ option ] evfile [ infile ]
-l int
length of vector \((1 \le L)\)
-m int
order of vector \((0 \le M)\)
-n int
number of principal components \((1 \le N \le L)\)
evfile str
double-type mean vector and eigenvectors
infile str
double-type vector sequence
stdout
double-type principal component score
The input of this command is the \(M\)-th order vectors:
\[ \begin{array}{cccc} \boldsymbol{x}(0), & \boldsymbol{x}(1), & \boldsymbol{x}(0), & \ldots, \end{array} \]the mean vector \(\boldsymbol{m}\), and \(N\) eigenvectors\[ \boldsymbol{A} = \left[ \begin{array}{cccc} \boldsymbol{e}(0) & \boldsymbol{e}(1) & \cdots & \boldsymbol{e}(N-1) \end{array} \right]. \]The pricipal component score of \(\boldsymbol{x}(t)\) is calculated as\[ \boldsymbol{z}(t) = \boldsymbol{A}^{\mathsf{T}} (\boldsymbol{x}(t) - \boldsymbol{m}). \]In the below example, the principal component scores of
data.d
are calculated using the mean vector and the eigen vectors ineigvec.dat
.pcas -l 3 -n 2 eigvec.dat < data.d > score.dat
- Parameters:
argc – [in] Number of arguments.
argv – [in] Argument vector.
- Returns:
0 on success, 1 on failure.
See also