@Test public void testLogP() { System.out.println("logP"); LogisticDistribution instance = new LogisticDistribution(2.0, 1.0); instance.rand(); assertEquals(Math.log(0.1050736), instance.logp(0.001), 1E-5); assertEquals(Math.log(0.1057951), instance.logp(0.01), 1E-5); assertEquals(Math.log(0.1131803), instance.logp(0.1), 1E-5); assertEquals(Math.log(0.1217293), instance.logp(0.2), 1E-5); assertEquals(Math.log(0.1491465), instance.logp(0.5), 1E-5); assertEquals(Math.log(0.1966119), instance.logp(1.0), 1E-5); assertEquals(Math.log(0.25), instance.logp(2.0), 1E-5); assertEquals(Math.log(0.04517666), instance.logp(5.0), 1E-5); assertEquals(Math.log(0.0003352377), instance.logp(10.0), 1E-5); }
@Override public double logp(double x) { return Math.log(p(x)); }
LogisticDistribution extends AbstractDistribution { @Override public double logp(double x) { return Math.log(p(x)); } }
LogisticDistribution extends AbstractDistribution { @Override public double logp(double x) { return Math.log(p(x)); } LogisticDistribution(double mu, double scale); }
LogisticDistribution extends AbstractDistribution { @Override public double logp(double x) { return Math.log(p(x)); } LogisticDistribution(double mu, double scale); @Override int length(); @Override double mean(); @Override double variance(); @Override double sd(); @Override double entropy(); @Override String toString(); @Override double rand(); @Override double p(double x); @Override double logp(double x); @Override double cdf(double x); @Override double quantile(double p); }
LogisticDistribution extends AbstractDistribution { @Override public double logp(double x) { return Math.log(p(x)); } LogisticDistribution(double mu, double scale); @Override int length(); @Override double mean(); @Override double variance(); @Override double sd(); @Override double entropy(); @Override String toString(); @Override double rand(); @Override double p(double x); @Override double logp(double x); @Override double cdf(double x); @Override double quantile(double p); final double mu; final double scale; }