| Wavelet Toolbox | |
| Provide feedback about this page |
Multiscale Principal Component Analysis
Syntax
[X_SIM,QUAL,NPC,DEC_SIM,PCA_Params] = wmspca(X,LEVEL,WNAME,NPC) [...] = wmspca(X,LEVEL,WNAME,'mode',EXTMODE,NPC) [...] = wmspca(DEC,NPC)
Description
[X_SIM,QUAL,NPC,DEC_SIM,PCA_Params] = wmspca(X,LEVEL,WNAME,NPC) or
[...] = wmspca(X,LEVEL,WNAME,'mode',EXTMODE,NPC)
returns a simplified version X_SIM of the input matrix X obtained from the wavelet-based multiscale Principal Component Analysis (PCA).
The input matrix X contains P signals of length N stored columnwise (N > P).
Wavelet Decomposition Parameters
The wavelet decomposition is performed using the decomposition level LEVEL and the wavelet WNAME.
EXTMODE is the extended mode for the DWT (See dwtmode).
If a decomposition DEC obtained using mdwtdec is available, you can use
[...] = wmspca(DEC,NPC) instead of
[...] = wmspca(X,LEVEL,WNAME,'mode',EXTMODE,NPC).
Principal Components Parameter: NPC
If NPC is a vector, then it must be of length LEVEL+2. It contains the number of retained principal components for each PCA performed:
NPC(d) is the number of retained noncentered principal components for details at level d, for 1 <= d <= LEVEL.
NPC(LEVEL+1) is the number of retained non-centered principal components for approximations at level LEVEL.
NPC(LEVEL+2) is the number of retained principal components for final PCA after wavelet reconstruction.
NPC must be such that 0 <= NPC(d) <= P for 1 <= d <= LEVEL+2.
If NPC = 'kais' (respectively, 'heur'), then the number of retained principal components is selected automatically using Kaiser's rule (or the heuristic rule).
If NPC = 'nodet', then the details are "killed" and all the approximations are retained.
Output Parameters
X_SIM is a simplified version of the matrix X.
QUAL is a vector of length P containing the quality of column reconstructions given by the relative mean square errors in percent.
NPC is the vector of selected numbers of retained principal components.
DEC_SIM is the wavelet decomposition of X_SIM.
PCA_Params is a structure array of length LEVEL+2 such that:
Examples
% Load a multivariate signal x. load ex4mwden % Set the wavelet parameters. level = 5; wname = 'sym4'; % Set the PCA parameters to select the number % of retained principal components automatically % by Kaiser's rule. npc = 'kais'; % Perform a first multiscale PCA. [x_sim, qual, npc] = wmspca(x,level,wname,npc); % Display the original and simplified signals. kp = 0; for i = 1:4 subplot(4,2,kp+1), plot(x (:,i)); title(['Original signal ',num2str(i)]) subplot(4,2,kp+2), plot(x_sim(:,i)); title(['Simplified signal ',num2str(i)]) kp = kp + 2; end
% The results from a compression perspective are good: the % quality of column reconstructions are close to 100%. qual qual = 98.0545 93.2807 97.1172 98.8603 % The output argument npc gives the number % of retained principal components. npc = npc = 1 1 1 1 1 2 2 % The results can be improved by suppressing noise, % by killing the details at levels 1 to 3. npc(1:3) = zeros(1,3); % Perform again multiscale PCA. [x_sim, qual, npc] = wmspca(x,level,wname,npc); % Display the original and final simplified signals. % Use these plotting commands to generate the figure. kp = 0; for i = 1:4 subplot(4,2,kp+1), plot(x (:,i)); title(['Original signal ',num2str(i)]) subplot(4,2,kp+2), plot(x_sim(:,i)); title(['Simplified signal ',num2str(i)]) kp = kp + 2; end
Algorithm
The multiscale principal components generalizes the usual PCA of a multivariate signal seen as a matrix by performing simultaneously a PCA on the matrices of details of different levels. In addition, a PCA is performed also on the coarser approximation coefficients matrix in the wavelet domain as well as on the final reconstructed matrix. By selecting conveniently the numbers of retained principal components, interesting simplified signals can be reconstructed.
References
Aminghafari, M.; Cheze, N.; Poggi, J-M. (2006), "Multivariate de-noising using wavelets and principal component analysis," Computational Statistics & Data Analysis, 50, pp. 2381-2398.
Bakshi, B. (1998), "Multiscale PCA with application to MSPC monitoring," AIChE J., 44, pp. 1596-1610.
See Also
wmulden
| Provide feedback about this page |
![]() | wmaxlev | wmulden | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |