cvwavelet.after.impute: Cross-Validation Wavelet Shrinkage after imputation

Description Usage Arguments Details Value See Also Examples

Description

This function performs level-dependent cross-validation wavelet shrinkage given the cross-validation scheme and imputation values.

Usage

1
2
3
cvwavelet.after.impute(y, ywd, yimpute,
    cv.index, cv.optlevel, cv.tol=0.1^3, cv.maxiter=100,
    filter.number=10, family="DaubLeAsymm", thresh.type="soft", ll=3)

Arguments

y

observation

ywd

DWT object

yimpute

imputed values according to cross-validation scheme

cv.index

test dataset index according to cross-validation scheme

cv.optlevel

thresholding levels

cv.tol

tolerance for cross-validation

cv.maxiter

maximum iteration for cross-validation

filter.number

specifies the smoothness of wavelet in the decomposition (argument of WaveThresh)

family

specifies the family of wavelets “DaubExPhase" or “DaubLeAsymm" (argument of WaveThresh)

thresh.type

specifies the type of thresholding “hard" or “soft" (argument of WaveThresh)

ll

specifies the lowest level to be thresholded

Details

Calculating the threshold values and reconstructing noisy data y, given the index of each testdata, imputed values according to cross-validation scheme and discrete wavelet transform of y.

Value

Reconstruction and thresholding values by level-dependent cross-validation

yc

reconstruction

cvthresh

thresholding values by level-dependent cross-validation

See Also

cvwavelet, cvtype, cvimpute.by.wavelet.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
data(ipd)
y <- as.numeric(ipd); n <- length(y); nlevel <- log2(n)

set.seed(1)
cv.index <- cvtype(n=n, cv.bsize=2, cv.kfold=4, cv.random=TRUE)$cv.index
yimpute <- cvimpute.by.wavelet(y=y, impute.index=cv.index)$yimpute

ywd <- wd(y)

#out <- cvwavelet.after.impute(y=y, ywd=ywd, yimpute=yimpute,
#cv.index=cv.index, cv.optlevel=c(3:(nlevel-1)))

#ts.plot(ts(out$yc, start=1229.98, deltat=0.02, frequency=50),
#   main="Level-dependent Cross Validation", xlab = "Seconds", ylab="")

##### Specifying thresholding structure
# cv.optlevel <- c(3) # Threshold (level 3 to finest level) at the same time.
# cv.optlevel <- c(3, 5) # Threshold two groups of resolution levels,
                         # (level 3, 4) and  (level 5 to finest level).
# cv.optlevel <- c(3,4,5,6,7,8) # Threshold each resolution level 3 to 8.


Search within the CVThresh package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.