be.ac.ulb.mlg.utils.measure.entropy
Class ShannonEntropy

java.lang.Object
  extended by be.ac.ulb.mlg.utils.measure.Entropy
      extended by be.ac.ulb.mlg.utils.measure.entropy.EmpiricalEntropy
          extended by be.ac.ulb.mlg.utils.measure.entropy.ShannonEntropy
All Implemented Interfaces:
Measure

public class ShannonEntropy
extends EmpiricalEntropy

Shannon entropy estimate (empirical) of Uniform probability distribution.


Field Summary
 
Fields inherited from interface be.ac.ulb.mlg.utils.Measure
ERROR_VALUE
 
Constructor Summary
ShannonEntropy()
           
 
Method Summary
 double entropy(double[] frequencies, int distinctValues, int numberOfValues)
          Compute the entropy of a vector of values (non missing values (NaN))
 boolean hasNativeImplementation()
          Know if the measure owns a native implementation
 
Methods inherited from class be.ac.ulb.mlg.utils.measure.Entropy
entropy, jointEntropy, measure, requireDataTransformation, transform
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShannonEntropy

public ShannonEntropy()
Method Detail

entropy

public double entropy(double[] frequencies,
                      int distinctValues,
                      int numberOfValues)
Description copied from class: Entropy
Compute the entropy of a vector of values (non missing values (NaN))

Overrides:
entropy in class EmpiricalEntropy
Parameters:
frequencies - The occurrences array (of values)
distinctValues - The number of distinct values
numberOfValues - The number of values
Returns:
The pseudo count

hasNativeImplementation

public boolean hasNativeImplementation()
Description copied from interface: Measure
Know if the measure owns a native implementation

Specified by:
hasNativeImplementation in interface Measure
Overrides:
hasNativeImplementation in class EmpiricalEntropy
Returns:
True if the measure is also natively implemented