View source: R/transition_entropy.R
transition_entropy | R Documentation |
This function calculates the transition entropy for sequences using n-grams. It performs bootstrapping to compute entropy and expected entropy over multiple iterations.
transition_entropy(sequences, ngram = 2, iterations = 20)
sequences |
A list of sequences (character vectors) to analyze. |
ngram |
The size of the n-gram (default is 2). |
iterations |
The number of bootstrap iterations (default is 20). |
A data frame with calculated entropies, expected entropies, and entropy ratios for each iteration.
sequences <- unlist(list("A B C", "B C A", "C A B"))
transition_entropy(sequences, ngram = 2, iterations = 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.