Entropy {TreeDist} | R Documentation |
Calculate the entropy of a vector of probabilities, in bits. Probabilities should sum to one. Probabilities equalling zero will be ignored.
Entropy(...)
... |
Numerics or numeric vector specifying probabilities of outcomes. |
Entropy()
returns the entropy of the specified probabilities,
in bits.
Martin R. Smith (martin.smith@durham.ac.uk)
Entropy(1/2, 0, 1/2) # = 1
Entropy(rep(1/4, 4)) # = 2