@Test public void testLogLikelihood() throws Exception { assertEquals(2.772589, LogLikelihood.logLikelihoodRatio(1, 0, 0, 1), 0.000001); assertEquals(27.72589, LogLikelihood.logLikelihoodRatio(10, 0, 0, 10), 0.00001); assertEquals(39.33052, LogLikelihood.logLikelihoodRatio(5, 1995, 0, 100000), 0.00001); assertEquals(4730.737, LogLikelihood.logLikelihoodRatio(1000, 1995, 1000, 100000), 0.001); assertEquals(5734.343, LogLikelihood.logLikelihoodRatio(1000, 1000, 1000, 100000), 0.001); assertEquals(5714.932, LogLikelihood.logLikelihoodRatio(1000, 1000, 1000, 99000), 0.001); }
private LogLikelihood() { }
LogLikelihood { private LogLikelihood() { } }
LogLikelihood { private LogLikelihood() { } private  LogLikelihood(); }
LogLikelihood { private LogLikelihood() { } private  LogLikelihood(); static double entropy(long... elements); static double logLikelihoodRatio(long k11, long k12, long k21, long k22); static double rootLogLikelihoodRatio(long k11, long k12, long k21, long k22); static List<ScoredItem<T>> compareFrequencies(Multiset<T> a,
                                                           Multiset<T> b,
                                                           int maxReturn,
                                                           double threshold); }
LogLikelihood { private LogLikelihood() { } private  LogLikelihood(); static double entropy(long... elements); static double logLikelihoodRatio(long k11, long k12, long k21, long k22); static double rootLogLikelihoodRatio(long k11, long k12, long k21, long k22); static List<ScoredItem<T>> compareFrequencies(Multiset<T> a,
                                                           Multiset<T> b,
                                                           int maxReturn,
                                                           double threshold);  }