Description Usage Arguments Examples
Note: this package is deprecated. Please use languageEntropy::entropy
instead. Given a vector of discrete probabilities, this function will output the Shannon Entropy (a measure of uncertainty)
1 |
x |
A vector of discrete probabilities |
base |
Base of the logarithm. Shannon Entropy uses base 2. Other common bases are e (natural) and 10 (hartley). |
1 2 | prob_table <- data.frame(event=c("A","B"), prob=c(.25,.75))
entropy(prob_table$prob)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.