plot_ph function

Constructs the pattern histogram associated with a given category of a categorical time series

Constructs the pattern histogram associated with a given category of a categorical time series

plot_ph constructs the pattern histogram associated with a given category of a categorical time series. UTF-8

plot_ph( series, category, plot = TRUE, title = paste0("Pattern histogram (", category, ")"), ... )

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.
  • category: The selected category.
  • plot: Logical. If plot = TRUE (default), returns the pattern histogram. Otherwise, returns the frequencies of cycle lengths associated with the corresponding category.
  • title: The title of the graph.
  • ...: Additional parameters for the function.

Returns

The pattern histogram.

Details

Constructs the pattern histogram for a specific category of a CTS. This graph represents the frequencies of the cycles for the corresponding category according to their length.

Examples

sequence_1 <- GeneticSequences[which(GeneticSequences$Series==1),] ph <- plot_ph(sequence_1, category = 'a') # Constructing the pattern histogram # for the first CTS in dataset GeneticSequences concerning the category 'a' cycle_lengths <- plot_ph(sequence_1, category = 'a', plot = FALSE) # Obtaining the frequencies of cycle lengths

References

Rdpack::insert_ref(key="weiss2008visual",package="ctsfeatures")

Author(s)

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

  • Maintainer: Angel Lopez-Oriona
  • License: GPL-2
  • Last published: 2024-01-29

Useful links