entropy | R Documentation |
This function computes the entropy of a vector, understood as a discrete distribution over the index.
entropy(x)
x |
vector representing the distribution. Not checked to see whether it is properly normalized. |
sum_i x_i \log x_i, where the log is base 2 and the sum is taken only over non-zero elements of x.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.