emddenoise {EMD} | R Documentation |
Denoising by EMD and Thresholding
Description
This function performs denoising by empirical mode decomposition and thresholding.
Usage
emddenoise(xt, tt = NULL, cv.index, cv.level, cv.tol = 0.1^3,
cv.maxiter = 20, by.imf = FALSE, emd.tol = sd(xt) * 0.1^2,
max.sift = 20, stoprule = "type1", boundary = "periodic",
max.imf = 10)
Arguments
xt |
observation or signal observed at time |
tt |
observation index or time index |
cv.index |
test dataset index according to cross-validation scheme |
cv.level |
levels to be thresholded |
cv.tol |
tolerance for the optimization step of cross-validation |
cv.maxiter |
maximum iteration for the optimization step of cross-validation |
by.imf |
specifies whether shrinkage is performed by each IMS or not. |
emd.tol |
tolerance for stopping rule of sifting. If |
max.sift |
the maximum number of sifting |
stoprule |
stopping rule of sifting. The |
boundary |
specifies boundary condition from “none", “wave", “symmetric", “periodic" or “evenodd". See Zeng and He (2004) for |
max.imf |
the maximum number of IMF's |
Details
This function performs denoising by empirical mode decomposition and cross-validation. See Kim and Oh (2006) for details.
Value
dxt |
denoised signal |
optlambda |
threshold values by cross-validation |
lambdaconv |
sequence of lambda's by cross-validation |
perr |
sequence of prediction error by cross-validation |
demd |
denoised IMF's and residue |
niter |
the number of iteration for optimal threshold value |
References
Huang, N. E., Shen, Z., Long, S. R., Wu, M. L. Shih, H. H., Zheng, Q., Yen, N. C., Tung, C. C. and Liu, H. H. (1998) The empirical mode decomposition and Hilbert spectrum for nonlinear and nonstationary time series analysis. Proceedings of the Royal Society London A, 454, 903–995.
Huang, N. E. and Wu, Z. (2008) A review on Hilbert-Huang Transform: Method and its applications to geophysical studies. Reviews of Geophysics, 46, RG2006.
Kim, D. and Oh, H.-S. (2006) Hierarchical Smoothing Technique by Empirical Mode Decomposition (Korean). The Korean Journal of Applied Statistics, 19, 319–330.
Zeng, K and He, M.-X. (2004) A simple boundary process technique for empirical mode decomposition. Proceedings of 2004 IEEE International Geoscience and Remote Sensing Symposium, 6, 4258–4261.
See Also
Examples
ndata <- 1024
tt <- seq(0, 9, length=ndata)
meanf <- (sin(pi*tt) + sin(2*pi*tt) + sin(6*pi*tt)) * (0.0<tt & tt<=3.0) +
(sin(pi*tt) + sin(6*pi*tt)) * (3.0<tt & tt<=6.0) +
(sin(pi*tt) + sin(6*pi*tt) + sin(12*pi*tt)) * (6.0<tt & tt<=9.0)
snr <- 3.0
sigma <- c(sd(meanf[tt<=3]) / snr, sd(meanf[tt<=6 & tt>3]) / snr,
sd(meanf[tt>6]) / snr)
set.seed(1)
error <- c(rnorm(sum(tt<=3), 0, sigma[1]),
rnorm(sum(tt<=6 & tt>3), 0, sigma[2]), rnorm(sum(tt>6), 0, sigma[3]))
xt <- meanf + error
cv.index <- cvtype(n=ndata, cv.kfold=2, cv.random=FALSE)$cv.index
## Not run:
try10 <- emddenoise(xt, cv.index=cv.index, cv.level=2, by.imf=TRUE)
par(mfrow=c(2, 1), mar=c(2, 1, 2, 1))
plot(xt, type="l", main="noisy signal")
lines(meanf, lty=2)
plot(try10$dxt, type="l", main="denoised signal")
lines(meanf, lty=2)
## End(Not run)