meptransf: Multiscale Ensemble Patch Transforms of a Signal

Description Usage Arguments Details Value See Also Examples

View source: R/EPT1d.R

Description

This function performs multiscale ensemble patch transforms of a signal for a sequence of size parameters.

Usage

1
2
3
meptransf(tindex = NULL, signal, type = "rectangle", taus, 
    process = c("average", "average"), pquantile = c(0, 1), equantile = c(0, 1), 
    gamma = 1, boundary = "symmetric") 

Arguments

tindex

time index at which a signal is observed. When it is NULL, the signal is supposed to be equally spaced.

signal

a set of data or a signal observed at time tindex.

type

patch type of "rectangle" or "oval".

taus

a sequence of size parameters for ensemble patch transform.

process

specifies transform types for patch and ensemble processes: process[1] for patch process and process[2] for ensemble process. Each process has options of "average", "median", or "envelope". Note that when process[1] is "average" or "median", process[2] must be "average" or "median". When process[1] is "envelope", lower and upper envelopes are obtained by \code{pquantile[1]} \times 100 \%-quantile and \code{pquantile[2]} \times 100 \%-quantile of patches, respectively. When process[2] is "envelope", ensemble lower and upper envelopes are obtained as \code{equantile[1]} \times 100 \%-quantile and \code{equantile[2]} \times 100 \%-quantile of lower and upper envelopes of shifted patches, respectively.

pquantile

quantiles for lower and upper envelopes of patch transform. When it is c(0, 1), minimum and maximum of a patch are used for lower and upper envelopes, respectively.

equantile

quantiles for lower and upper envelopes of ensemble patch transform.

gamma

controls the amount of envelope magnitude.

boundary

specifies boundary condition from "symmetric", "periodic" or "none".

Details

This function performs multiscale ensemble patch transforms of a signal for a sequence of size parameters taus, and produces statistics and envelopes for ensemble patch transform. When process[1] is "average" or "median", outputs related to envelopes are defined as NULL. When process[2] is "envelope", outputs, pstat and Epstat, are defined as NULL.

Value

tindex

time index at which a signal is observed.

signal

a set of data or a signal observed at time tindex.

pstat

matrix of centrality of patch transform for a sequence of size parameters taus.

Epstat

matrix of centrality of ensemble patch transform for a sequence of size parameters taus.

psd

matrix of standard deviation of patch transform for a sequence of size parameters taus.

Epsd

matrix of standard deviation of ensemble patch transform for a sequence of size parameters taus.

pL

matrix of lower envelope of patch transform for a sequence of size parameters taus.

pU

matrix of upper envelope of patch transform for a sequence of size parameters taus.

pM

matrix of mean envelope, (pL + pU) / 2, of patch transform for a sequence of size parameters taus.

pR

matrix of distance between lower and upper envelopes, (pU - pL), of patch transform for a sequence of size parameters taus.

EpL

matrix of lower envelope of ensemble patch transform for a sequence of size parameters taus.

EpU

matrix of upper envelope of ensemble patch transform for a sequence of size parameters taus.

EpM

matrix of mean envelope, (EpL + EpU) / 2, of ensemble patch transform for a sequence of size parameters taus.

EpR

matrix of distance between lower and upper envelopes, (EpU - EpL), of ensemble patch transform for a sequence of size parameters taus.

rho

vector of correlations between (signal - ept) component and ept component for a sequence of size parameters taus. The ept component is component obtained by ensemble patch transform.

parameters

a list of input parameters of type, taus, process, pquantile, equantile, gamma, and boundary.

nlevel

the number of size parameters taus.

See Also

eptransf, eptdecomp.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#### example : composite of two components having different frequencies
ndata <- 1000 
tindex <- seq(0, 1, length=ndata)
comp1 <- cos(45*pi*tindex)
comp2 <- cos(6*pi*tindex)
f <- comp1 + comp2 

op <- par(mfcol=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)


#### Multiscale Ensemble Patch Transform according to tau's 
taus1 <- seq(20, 60, by=2)
outmulti <- meptransf(signal=f, taus=taus1, process=c("envelope", "average"),
    pquantile=c(0, 1)) 

#### To continue, click the plot in case of "locator(1)".
par(mfrow=c(2,2), mar=c(2,2,2,1))
for (i in 1:length(taus1)) {
  plot(f - outmulti$EpM[,i], type='l', main="", xlab="", ylab=""); abline(h=0, lty=3)
  title(paste0("Remaining component for tau=", taus1[i]))
  lines(comp1, col="red", lty=2, lwd=0.5)
  plot(outmulti$EpM[,i], type="l", main=, xlab="", ylab=""); abline(h=0, lty=3)
  title(paste0("Mean envelope of ensemble patch transform for tau=", taus1[i]))
  lines(comp2, col="red", lty=2, lwd=0.5); locator(1)  
}

par(op)

EPT documentation built on Jan. 5, 2022, 9:06 a.m.

Related to meptransf in EPT...