natstobits | R Documentation |
natstobits
takes a value in nats (a double) as input and returns the value in bits (a double).
natstobits(H)
H |
double denoting a value (in nats), as returned by one of the function of the infotheo package |
Information-theoretic quantities can have different units depending on the base of the logarithm used in their computation. All the function of tha package use a base e, hence the unit is the nat. The value in bit is given by using the base 2, hence the conversion is done by multiplying by log2(e) = 1.442695.
natstobits
returns a double that is the conversion of the nats value into bits.
Patrick E. Meyer
data(USArrests) H <- entropy(discretize(USArrests)) natstobits(H)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.