Performs Principal Component Analysis on matrix X.
Utilises the JTPcrossValidatedPCA. Cross Validates a JTPpca model.
Calculates residuals and DModX values. Can be used as input for
Variable | Type | Default Value | Description |
---|---|---|---|
*spectra | csm_spectra | None | csm_spectra object containing spectral matrix. |
*npc | 1*1 | None | Number of components to be computed. |
prep | str | 'none' | Preprocessing type; 'mc' for mean centering, 'uv' for univariance Scaling, 'par' for Paretto Scaling |
Variable | Type | Description |
---|---|---|
csm_pca | csm_wrapper | Object with some stored inputs, the outputs and auditInfo. |
csm_pca.output.P | m*n | Matrix of Loadings, components*loadings. |
csm_pca.output.T | m*n | Matrix of scores, scores*components. |
csm_pca.output.Tcv | m*n | Matrix of cross validated scores, scores*components. |
csm_pca.output.Xr | m*1 | Model residuals, residuals*1. |
csm_pca.output.R2 | m*1 | Modeled variation, componentvariance*1. |
csm_pca.output.Q2 | m*1 | Cross-validated modeled variation, componentvariance*1. |
csm_pca.output.ns | 1*1 | Number of samples. |
csm_pca.output.Residual | m*1 | Summed residuals for each sample. |
csm_pca.output.TotalResidual | 1*1 | Summed residuals for all samples. |
csm_pca.output.DModX | m*1 | Distance from model for each sample. |
csm_pca.output.Dcrit | 1*1 | Critical value for DModX. |
NIPALS
Copyright Imperial College London 2019