public static enum EntropyLDiversity.EntropyEstimator extends java.lang.Enum<EntropyLDiversity.EntropyEstimator>
Enum Constant and Description |
---|
GRASSBERGER
The Grassberger estimator
|
SHANNON
The Shannon estimator
|
Modifier and Type | Method and Description |
---|---|
double |
psi(int n)
The logarithm substitute of the current estimator
The difference in estimating the entropy by the naive Shannon or Grassberger
estimator is actually using log or G for \psi in the entropy formula
$H = \psi(N) - 1/N \sum n \psi(n)$
where N is the size of the set and the sum goes over all values of the
sensitive attribute, n is the count of the current sensitive attribute
|
java.lang.String |
toString() |
static EntropyLDiversity.EntropyEstimator |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static EntropyLDiversity.EntropyEstimator[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EntropyLDiversity.EntropyEstimator SHANNON
public static final EntropyLDiversity.EntropyEstimator GRASSBERGER
public static EntropyLDiversity.EntropyEstimator[] values()
for (EntropyLDiversity.EntropyEstimator c : EntropyLDiversity.EntropyEstimator.values()) System.out.println(c);
public static EntropyLDiversity.EntropyEstimator valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic double psi(int n)
n
- public java.lang.String toString()
toString
in class java.lang.Enum<EntropyLDiversity.EntropyEstimator>