Wavelet multivariate de-noising

```
[X_DEN,NPC,NESTCOV,DEC_DEN,PCA_Params,DEN_Params]
= ...
```

wmulden(X,LEVEL,WNAME,NPC_APP,NPC_FIN,TPTR,SORH)

[...] = wmulden(X,LEVEL,WNAME,'mode',EXTMODE,NPC_APP,...)

[...] = wmulden(DEC,NPC_APP)

[...] = wmulden(X,LEVEL,WNAME,'mode',EXTMODE,NPC_APP)

[DEC,PCA_Params] = wmulden('estimate',DEC,NPC_APP,NPC_FIN)

[X_DEN,NPC,DEC_DEN,PCA_Params] = wmulden('execute',DEC,PC_Params)

```
[X_DEN,NPC,NESTCOV,DEC_DEN,PCA_Params,DEN_Params]
= ...
```

or

wmulden(X,LEVEL,WNAME,NPC_APP,NPC_FIN,TPTR,SORH)

`[...] = wmulden(X,LEVEL,WNAME,'mode',EXTMODE,NPC_APP,...)`

returns a de-noised version `X_DEN`

of the input
matrix `X`

. The strategy combines univariate wavelet
de-noising in the basis where the estimated noise covariance matrix
is diagonal with noncentered Principal Component Analysis (PCA) on
approximations in the wavelet domain or with final PCA.

The input matrix `X`

contains `P`

signals
of length N stored columnwise where `N`

> `P`

.

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

`[...] = wmulden(DEC,NPC_APP)`

instead of

`[...] = wmulden(X,LEVEL,WNAME,'mode',EXTMODE,NPC_APP)`

.

The input selection methods `NPC_APP`

and `NPC_FIN`

define
the way to select principal components for approximations at level `LEVEL`

in
the wavelet domain and for final PCA after wavelet reconstruction,
respectively.

If `NPC_APP`

(or `NPC_FIN`

)
is an integer, it contains the number of retained principal components
for approximations at level `LEVEL`

(or for final
PCA after wavelet reconstruction).

`NPC_XXX`

must be such that 0 <= `NPC_XXX`

<= `P`

`NPC_APP`

or ```
NPC_FIN
= 'kais'
```

or `'heur'`

selects the number
of retained principal components using Kaiser's rule or the heuristic
rule automatically.

Kaiser's rule keeps the components associated with eigenvalues greater than the mean of all eigenvalues.

The heuristic rule keeps the components associated with eigenvalues greater than 0.05 times the sum of all eigenvalues.

`NPC_APP`

or `NPC_FIN`

= `'none'`

is equivalent
to `NPC_APP`

or `NPC_FIN `

= `P`

.

The default values for the de-noising parameters TPTR and SORH are:

`TPTR = 'sqtwolog'`

and ```
SORH
= 's'
```

Valid values for

`TPTR`

are'rigsure', 'heursure', 'sqtwolog', 'minimaxi', 'penalhi', 'penalme', 'penallo'

Valid values for SORH are:

's' (soft) or 'h' (hard)

For additional information, see `wden`

and `wbmpen`

.

`X_DEN`

is a de-noised version of the input
matrix `X`

.

`NPC`

is the vector of selected numbers of
retained principal components.

`NESTCOV`

is the estimated noise covariance
matrix obtained using the minimum covariance determinant (MCD) estimator.

`DEC_DEN`

is the wavelet decomposition of `X_DEN`

.

`PCA_Params`

is a structure such that:

PCA_Params.NEST = {pc_NEST,var_NEST,NESTCOV} PCA_Params.APP = {pc_APP,var_APP,npc_APP} PCA_Params.FIN = {pc_FIN,var_FIN,npc_FIN}

where:

`pc_XXX`

is a`P`

-by-`P`

matrix of principal components.The columns are stored in descending order of the variances.

`var_XXX`

is the principal component variances vector.`NESTCOV`

is the covariance matrix estimate for detail at level 1.

`DEN_Params`

is a structure such that:

`DEN_Params.thrVAL`

is a vector of length`LEVEL`

which contains the threshold values for each level.`DEN_Params.thrMETH`

is a character vector containing the name of the de-noising method (`TPTR`

).`DEN_Params.thrTYPE`

is a character variable containing the type of the thresholding (`SORH`

).

`[DEC,PCA_Params] = wmulden('estimate',DEC,NPC_APP,NPC_FIN) `

returns the wavelet decomposition `DEC`

and the
Principal Components Estimates `PCA_Params`

.

`[X_DEN,NPC,DEC_DEN,PCA_Params] = wmulden(`

uses
the principal components estimates `'execute'`

,`DEC`

,`PC_Params`

)`PCA_Params`

previously
computed.

The input value `DEC`

can be replaced by `X`

, `LEVEL`

,
and `WNAME`

.

% Load a multivariate signal x together with % the original signals (x_orig) and true noise % covariance matrix (covar). load ex4mwden % Set the de-noising method parameters. level = 5; wname = 'sym4'; tptr = 'sqtwolog'; sorh = 's'; % Set the PCA parameters to select the number of % retained principal components automatically by % Kaiser's rule. npc_app = 'kais'; npc_fin = 'kais'; % Perform multivariate de-noising. [x_den, npc, nestco] = wmulden(x, level, wname, npc_app, ... npc_fin, tptr, sorh); % Display the original and de-noised signals. kp = 0; for i = 1:4 subplot(4,3,kp+1), plot(x_orig(:,i)); title(['Original signal ',num2str(i)]) subplot(4,3,kp+2), plot(x(:,i)); title(['Observed signal ',num2str(i)]) subplot(4,3,kp+3), plot(x_den(:,i)); title(['De-noised signal ',num2str(i)]) kp = kp + 3; end

% The results are good: the first function, which is % irregular, is correctly recovered while the second % function, more regular, is well de-noised. % The second output argument gives the numbers % of retained principal components for PCA for % approximations and for final PCA. npc npc = 2 2 % The third output argument contains the estimated % noise covariance matrix using the MCD based % on the matrix of finest details. nestco nestco = 1.0784 0.8333 0.6878 0.8141 0.8333 1.0025 0.5275 0.6814 0.6878 0.5275 1.0501 0.7734 0.8141 0.6814 0.7734 1.0967 % The estimation is satisfactory since the values are close % to the true values given by covar. covar covar = 1.0000 0.8000 0.6000 0.7000 0.8000 1.0000 0.5000 0.6000 0.6000 0.5000 1.0000 0.7000 0.7000 0.6000 0.7000 1.0000

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.

Rousseeuw, P.; Van Driessen, K. (1999), "A fast algorithm
for the minimum covariance determinant estimator," *Technometrics,* 41,
pp. 212–223.

Was this topic helpful?