public class MutualInformationAccumulator extends Object
Constructor and Description |
---|
MutualInformationAccumulator(int n)
Construct a new accumulator with equal-sized event spaces.
|
MutualInformationAccumulator(int n1,
int n2)
Construct a new accumulator.
|
Modifier and Type | Method and Description |
---|---|
void |
count(int v1,
int v2)
Count an occurrence.
|
int |
getCount()
Get the number of events.
|
double |
getMutualInformation()
Get the mutual information.
|
double |
getV1Entropy()
Get the entropy of the first variable.
|
double |
getV2Entropy()
Get the entropy of the second variable.
|
void |
reset()
Reset to start accumulating again.
|
public MutualInformationAccumulator(int n1, int n2)
n1
- The number of discrete values of the first variable.n2
- The number of discrete values of the second variable.public MutualInformationAccumulator(int n)
n
- The number of discrete values of each variable.public void count(int v1, int v2)
v1
- The value of the first variable.v2
- The value of the second variable.public double getMutualInformation()
public double getV1Entropy()
public double getV2Entropy()
public int getCount()
public void reset()