emddenoise {EMD}R Documentation

Denoising by EMD and Cross-Validation

Description

This function performs denoising by empirical mode decomposition and cross-validation.

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", 
    smlevels = c(1), sm = "none", spar = NA, weight = 20, 
    check = FALSE, max.imf = 10, plot.imf = FALSE, interm = NULL)

Arguments

xt observation or signal observed at time tt
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
max.sift the maximum number of sifting
stoprule stopping rule of sifting
boundary specifies boundary condition from ``none", ``wave", ``symmetric", ``periodic" or ``evenodd".
smlevels specifies which level of the IMF is obtained by smoothing other than interpolation.
sm specifies whether envelop is constructed by smoothing spline.
spar specifies user-supplied smoothing parameter of spline.
weight the smoothness of spline is determined by weight times smoothing parameter of GCV.
check specifies whether the sifting process is displayed.
max.imf the maximum number of IMF's
plot.imf specifies whether each IMF is displayed.
interm specifies vector of periods to be excluded from the IMF's.

Details

This function performs denoising by empirical mode decomposition and cross-validation.

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.

See Also

cvtype, emd.

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 
#try10 <- emddenoise(xt, cv.index=cv.index, cv.level=2, by.imf=TRUE)
#try10$optlambda

[Package EMD version 1.2.0 Index]