eptdecomp {EPT} | R Documentation |
Decomposition of a signal by Ensemble Patch Transform
Description
This function decomposes a signal into frequency component and residue of ensemble patch transform by sifting process.
Usage
eptdecomp(tindex = NULL, signal, type = "rectangle", tau,
process = c("average", "average"), pquantile = c(0, 1), equantile = c(0, 1),
gamma = 1, boundary = "symmetric", stoprule = "type1",
tol = sd(signal, na.rm = TRUE) * 0.1^2, maxiter = 10, check = FALSE)
Arguments
tindex |
time index at which a signal is observed. When it is |
signal |
a set of data or a signal observed at time |
type |
patch type of |
tau |
a size parameter for ensemble patch transform. |
process |
specifies transform types for patch and ensemble processes:
|
pquantile |
quantiles for lower and upper envelopes of patch transform. When it is |
equantile |
quantiles for lower and upper envelopes of ensemble patch transform. |
gamma |
controls the amount of envelope magnitude. |
boundary |
specifies boundary condition from |
stoprule |
stopping rule of sifting. The |
tol |
tolerance for stopping rule of sifting. |
maxiter |
the maximum number of sifting. |
check |
specifies whether the sifting process is displayed. When |
Details
This function decomposes a signal into frequency component and residue of ensemble patch transform by sifting process for a size parameter.
Value
eptcomp |
matrix of ept (ensemble patch transform) component at each sifting step. |
FC |
frequency component of ensemble patch transform by sifting process. |
residue |
residue of ensemble patch transform by sifting process. |
parameters |
a list of input parameters of |
See Also
Examples
#### example : composite of two components having different frequencies
ndata <- 1000
tindex <- seq(0, 1, length=ndata)
comp1 <- cos(90*pi*tindex)
comp2 <- cos(10*pi*tindex)
f <- comp1 + comp2
op <- par(mfrow=c(3,1), mar=c(2,2,2,1))
plot(tindex, f, main="a signal", xlab="", ylab="", type='l')
abline(h=0, lty=3)
plot(tindex, comp1, main="high-frequency component", xlab="", ylab="", type='l')
abline(h=0, lty=3)
plot(tindex, comp2, main="low-frequency component", xlab="", ylab="", type='l')
abline(h=0, lty=3)
#### Decomposition by Ensemble Patch Transform
outdecom <- eptdecomp(signal=f, tau=21, process=c("envelope", "average"), pquantile=c(0, 1))
#### Decomposition result
plot(tindex, f, main="a signal", xlab="", ylab="", type='l'); abline(h=0, lty=3)
plot(outdecom$FC, type='l', main="", xlab="", ylab=""); abline(h=0, lty=3)
title(paste0("high-frequency component, tau=", 21))
lines(comp1, col="red", lty=2, lwd=0.5)
plot(outdecom$residue, type="l", main="", xlab="", ylab=""); abline(h=0, lty=3)
title(paste0("low-frequency component, tau=", 21))
lines(comp2, col="red", lty=2, lwd=0.5)
par(op)