Owning Palette: Statistical Analysis VIs
Installed With: Advanced Signal Processing Toolkit
Performs principal component analysis (PCA) on an input multivariate (vector) time series. Wire data to the Xt input to determine the polymorphic instance to use or manually select the instance.
Use the pull-down menu to select an instance of this VI.
c.gif)
![]() |
Xt specifies the input multivariate (vector) time series. | ||||||
![]() |
error in describes error conditions that occur before this VI or function runs.
The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
| ||||||
![]() |
unified? specifies to remove the mean and then unify Xt before performing PCA. The default is FALSE. | ||||||
![]() |
Xt out returns the computed principal component scores. | ||||||
![]() |
variance returns the variance values of the calculated principal component scores. | ||||||
![]() |
weights returns the weight matrix that this VI used when computing principal component scores from input multivariate time series. | ||||||
![]() |
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces.
Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.
|
c.gif)
![]() |
Xt specifies the input multivariate (vector) time series. Each column of the 2D array represents a vector at certain time. | ||||||
![]() |
error in describes error conditions that occur before this VI or function runs.
The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
| ||||||
![]() |
unified? specifies to remove the mean and then unify Xt before performing PCA. The default is FALSE. | ||||||
![]() |
Xt out returns the computed principal component scores. Each column of the 2D array represents a series of the computed principal component scores. | ||||||
![]() |
variance returns the variance values of the calculated principal component scores. | ||||||
![]() |
weights returns the weight matrix that this VI used when computing principal component scores from input multivariate time series. | ||||||
![]() |
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces.
Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.
|
Principal component analysis (PCA) computes a new set of uncorrelated multivariate (vector) time series by a transform of coordinate rotation from original correlated multivariate time series.
This VI performs PCA according to the following steps:
1. Calculates the covariance/correlation coefficient matrix
This VI calculates the covariance matrix according to the following equation:

where w = N–1, N is the number of time series samples. The dimension of the covariance matrix is m×m.
This VI calculates the correlation coefficient matrix according to the following equation:

If unified? is TRUE, this VI calculates the correlation coefficients matrix first and then performs PCA. If unified? is FALSE, this VI calculates the covariance matrix first, and then performs PCA.
2. Calculates the eigenvectors and eigenvalues of the matrix
This VI obtains the m eigenvalues li and eigenvectors vi from either covariance matrix or correlation matrix. li and vi satisfy the following equation:
AVi = liVi, i=1, …, m
where A is an m×m covariance matrix or correlation matrix.
3. Generates the new time series
This VI then computes a new set of uncorrelated multivariate (vector) time series according to the following equation:
Xtnew=VTXt
where Xtnew is the new uncorrelated multivariate (vector) time series, and Xt is the original correlated multivariate (vector) time series. Both of them are m×n matrices whose row vectors represent a single channel time series. V is eigenvectors matrix [v1, v2,…, vm].
V also is the weight matrix. Each column of V is one principle component. Xtnew also is the principal component scores. Each row of Xtnew is the scores for one principal component. Each li is variance of the scores for one principal component.
Refer to the Principal Component Analysis VI in the labview\examples\Time Series Analysis\TSAGettingStarted.llb for an example of using the TSA Principal Component Analysis VI.