View source: R/calculate_motifs.R
calculate_motifs | R Documentation |
calculate_motifs
computes the motifs of a categorical time series
calculate_motifs(series, motif_length)
series |
An object of type |
motif_length |
The length of the motif. |
Given a CTS of length T
with range \mathcal{V}=\{1, 2, \ldots, r\}
,
\overline{X}_t=\{\overline{X}_1,\ldots, \overline{X}_T\}
, and a motif length L
,
the function returns an array of r^L
elements, with the element
in the position (i_1, i_2, \ldots, i_r)
being the relative frequency
of the motif “i_1i_2 \cdots i_r
” in the corresponding time series.
Returns an array with the relative frequency of motifs in a categorical time series.
Ángel López-Oriona, José A. Vilar
lonardi2002findingctsfeatures
sequence_1 <- GeneticSequences[which(GeneticSequences$Series==1),]
calculate_motifs(sequence_1, motif_length = 3)
# Computing the relative frequencies of motifs of length 3 for the first
# series in dataset GeneticSequences
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.