xwf: Compute XWFs

Description Usage Arguments Value Examples

View source: R/xwf.R

Description

Compute extrema-weighted features based on functions, predefined local features, and weighting functions

Usage

1
2
3
4
xwf(xx, t, n.i, psi, w = function(t, i) ifelse(left, min(1, (1 -
  F(xx[[i]](t)))/(1 - b)), min(1, F(xx[[i]](t))/b)), b = 0.5, F = NULL,
  t.min = NULL, t.max = NULL, t.range = NULL, rel.shift = 0.001,
  left = TRUE)

Arguments

xx

List of function for which to compute the XWFs

t

Matrix containing the times at which the functions xx were measured: Element (i,j) contains the time of the j-th measurement of the i-th function.

n.i

Vector containing the number of measurements for each function. The first n.i[i] elements of the i-th row of t should not be NA.

psi

Predefined local feature which is a function of a function (first argument) and a measurement time (second argument)

w

Weighting function. The default is the one used in the original paper.

b

Parameter of the weighting function. See original paper for details. Ignored if weighting function w is not the default.

F

CDF of the values of the functions xx. Ignored if weighting function w is not the default.

t.min

Vector with time of first measurement for each function. Computed from t if omitted but providing it saves computational cost.

t.max

Analogous to t.min but now the time of the last measurement.

t.range

Vector with differences between t.max and t.min. Can be supplied to avoid recomputation.

rel.shift

Optional relative reduction of the integration range to avoid instabilities at the end of the integration ranges. Set to 0 if no such correction is desired.

left

Boolean specifying whether the left (TRUE) or right (FALSE) extrema-weighted features should be computed: Left and right refer to the weighting function. Ignored if weighting function w is not the default.

Value

Vector containing the extrema-weighted features obtained by numerical integration for each of the functions.

Examples

1
2
3
4
5
6
7
8
xwf(
xx = list(function(t) t),
t = (1:10)/10,
n.i = 10,
psi = function(x, t) x(t),
b = .2,
F = function(x) x
)

xwf documentation built on Feb. 20, 2020, 9:07 a.m.

Related to xwf in xwf...