|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.math.stats.LogLikelihood
public class LogLikelihood
Utility methods for working with log-likelihood
Method Summary | |
---|---|
static double |
entropy(int... elements)
Calculate the Shannon entropy. |
static double |
logLikelihoodRatio(int k11,
int k12,
int k21,
int k22)
Calculate the Raw Log-likelihood ratio for two events, call them A and B. |
static double |
rootLogLikelihoodRatio(int k11,
int k12,
int k21,
int k22)
Calculate the Root Log-likelihood ratio for two events. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static double entropy(int... elements)
elements
- TODO FILL IN HERE
public static double logLikelihoodRatio(int k11, int k12, int k21, int k22)
Event A | Everything but A | |
Event B | A and B together (k_11) | B, but not A (k_12) |
Everything but B | A without B (k_21) | Neither A nor B (k_22) |
k11
- The number of times the two events occurred togetherk12
- The number of times the second event occurred WITHOUT the first eventk21
- The number of times the first event occurred WITHOUT the second eventk22
- The number of times something else occurred (i.e. was neither of these events
public static double rootLogLikelihoodRatio(int k11, int k12, int k21, int k22)
k11
- The number of times the two events occurred togetherk12
- The number of times the second event occurred WITHOUT the first eventk21
- The number of times the first event occurred WITHOUT the second eventk22
- The number of times something else occurred (i.e. was neither of these events
logLikelihoodRatio(int, int, int, int);
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |