Constructs the binarized time series associated with a given categorical time series
Constructs the binarized time series associated with a given categorical time series
binarization constructs the binarized time series associated with a given categorical time series.
UTF-8
binarization(series)
Arguments
series: An object of type tsibble (see R package tsibble), whose column named Value contains the values of the corresponding CTS. This column must be of class factor and its levels must be determined by the range of the CTS.
Returns
The binarized time series.
Details
Given a CTS of length T with range V={1,2,…,r}, Xt={X1,…,XT}, the function constructs the binarized time series, which is defined as Yt={Y1,…,YT}, with Yk=(Yk,1,…,Yk,r)⊤
such that Yk,i=1 if Xk=i (c("k=1,ldots,T,\n", ",i=1,ldots,r")). The binarized series is constructed in the form of a matrix whose rows represent time observations and whose columns represent the categories in the original series
Examples
sequence_1 <- GeneticSequences[which(GeneticSequences$Series==1),]binarized_series <- binarization(sequence_1)# Constructing the binarized# time series for the first CTS in dataset GeneticSequences