be.ac.ulb.mlg.utils.measure.entropy
Class ShannonEntropy
java.lang.Object
be.ac.ulb.mlg.utils.measure.Entropy
be.ac.ulb.mlg.utils.measure.entropy.EmpiricalEntropy
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.
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 |
ShannonEntropy
public ShannonEntropy()
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 valuesnumberOfValues
- 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