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

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

public class EmpiricalEntropy
extends Entropy

The classic empirical entropy estimate of Uniform probability distribution.


Field Summary
 
Fields inherited from interface be.ac.ulb.mlg.utils.Measure
ERROR_VALUE
 
Constructor Summary
EmpiricalEntropy()
          Constructor with no pseudo count
EmpiricalEntropy(double pseudoCount)
          Constructor that use a pseudo count value added to occurrences
 
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

EmpiricalEntropy

public EmpiricalEntropy()
Constructor with no pseudo count


EmpiricalEntropy

public EmpiricalEntropy(double pseudoCount)
Constructor that use a pseudo count value added to occurrences

Parameters:
pseudoCount - The pseudo count value
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))

Specified by:
entropy in class Entropy
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 Entropy
Returns:
True if the measure is also natively implemented