com.twitter.common.stats
Class Entropy<T>

java.lang.Object
  extended by com.twitter.common.stats.Entropy<T>

public class Entropy<T>
extends Object

Calculate the entropy of a discrete distribution of .


Constructor Summary
Entropy(Iterable<T> elements)
           
 
Method Summary
 double entropy()
           
 double perplexity()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Entropy

public Entropy(Iterable<T> elements)
Method Detail

entropy

public double entropy()

perplexity

public double perplexity()