c_binarization {otsfeatures}R Documentation

Constructs the cumulative binarized time series associated with a given ordinal time series

Description

c_binarization constructs the cumulative binarized time series associated with a given ordinal time series.

Usage

c_binarization(series, states)

Arguments

series

An OTS (numerical vector with integers).

states

A numeric vector containing the corresponding states.

Details

Given an OTS of length TT with range S={s0,s1,s2,,sn}\mathcal{S}=\{s_0, s_1, s_2, \ldots, s_n\} (s0<s1<s2<<sns_0 < s_1 < s_2 < \ldots < s_n), Xt={X1,,XT}\overline{X}_t=\{\overline{X}_1,\ldots, \overline{X}_T\}, the function constructs the cumulative binarized time series, which is defined as Yt={Y1,,YT}\overline{\boldsymbol Y}_t=\{\overline{\boldsymbol Y}_1, \ldots, \overline{\boldsymbol Y}_T\}, with Yk=(Yk,0,Yk,1,,Yk,n1)\overline{\boldsymbol Y}_k=(\overline{Y}_{k,0}, \overline{Y}_{k,1},\ldots, \overline{Y}_{k,n-1})^\top such that Yk,i=1\overline{Y}_{k,i}=1 if Xksi\overline{X}_k \le s_i (k=1,,T,,i=0,,n1k=1,\ldots,T, , i=0,\ldots,n-1). The cumulative binarized series is constructed in the form of a matrix whose rows represent time observations and whose columns represent the states in the original series.

Value

The binarized time series.

Author(s)

Ángel López-Oriona, José A. Vilar

References

Weiß CH (2018). An introduction to discrete-valued time series. John Wiley and Sons.

López-Oriona Á, Vilar JA, D’Urso P (2023). “Hard and soft clustering of categorical time series based on two novel distances with an application to biological sequences.” Information Sciences, 624, 467–492.

Examples

c_binarized_series <- c_binarization(AustrianWages$data[[100]],
states = 0 : 5) # Constructing the cumulative binarized
# time series for one OTS in dataset AustrianWages

[Package otsfeatures version 1.0.0 Index]