cmsc_tw {GCSM} | R Documentation |
Composite similarity on temporal windows
Description
Compute composite measures, GCSM or CMSC, on temporal windows.
Usage
cmsc_tw(
xxx,
yyy,
rescale = FALSE,
xmin = NA_real_,
xmax = NA_real_,
ymin = NA_real_,
ymax = NA_real_,
comp = "si"
)
cmsc_e1_tw(
xxx,
yyy,
rescale = FALSE,
xmin = NA_real_,
xmax = NA_real_,
ymin = NA_real_,
ymax = NA_real_,
comp = "si"
)
cmsc_e2_tw(
xxx,
yyy,
rescale = FALSE,
xmin = NA_real_,
xmax = NA_real_,
ymin = NA_real_,
ymax = NA_real_,
comp = "si"
)
gcsm_tw(
xxx,
yyy,
rescale = FALSE,
xmin = NA_real_,
xmax = NA_real_,
ymin = NA_real_,
ymax = NA_real_,
comp = "si"
)
Arguments
xxx |
A 3-d array with the 3rd dimension representing time. |
yyy |
The other 3-d array. |
rescale |
Rescale or not before computation. |
xmin , xmax , ymin , ymax |
Normalization parameters. If |
comp |
Variable to return. If |
Details
These functions slide the temporal window over space. Missing values are
omitted. Normalization parameters are used to rescale xxx
and yyy
, and
determine the global minimum (min) and maximum (max). If rescale
is
TRUE
, xxx
and yyy
are rescaled to (xxx-xmin)/(xmax-xmin)
and
(yyy-ymin)/(ymax-ymin)
; and set min=0
, max=1
. If FALSE
,
min=min(xmin,ymin)
, max=max(xmax,ymax)
. OpenMP is used for parallel
computing.
Value
A matrix.
Examples
x = array(runif(81), dim = c(3, 3, 9))
gcsm_tw(x, x + 0.2, xmin = 0, xmax = 1, ymin = 0, ymax = 1)
cmsc_tw(x, x + 0.2, xmin = 0, xmax = 1, ymin = 0, ymax = 1)