@Test public void testLogP() { System.out.println("logP"); LogNormalDistribution instance = new LogNormalDistribution(1.0, 1.0); instance.rand(); assertEquals(Math.log(6.006101e-06), instance.logp(0.01), 1E-5); assertEquals(Math.log(0.01707931), instance.logp(0.1), 1E-5); assertEquals(Math.log(0.2419707), instance.logp(1.0), 1E-5); assertEquals(Math.log(0.1902978), instance.logp(2.0), 1E-5); assertEquals(Math.log(0.06626564), instance.logp(5.0), 1E-5); assertEquals(Math.log(0.01707931), instance.logp(10.0), 1E-5); }
@Override public double logp(double x) { return Math.log(p(x)); }
LogNormalDistribution extends AbstractDistribution { @Override public double logp(double x) { return Math.log(p(x)); } }
LogNormalDistribution extends AbstractDistribution { @Override public double logp(double x) { return Math.log(p(x)); } LogNormalDistribution(double mu, double sigma); }
LogNormalDistribution extends AbstractDistribution { @Override public double logp(double x) { return Math.log(p(x)); } LogNormalDistribution(double mu, double sigma); static LogNormalDistribution fit(double[] data); @Override int length(); @Override double mean(); @Override double variance(); @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); }
LogNormalDistribution extends AbstractDistribution { @Override public double logp(double x) { return Math.log(p(x)); } LogNormalDistribution(double mu, double sigma); static LogNormalDistribution fit(double[] data); @Override int length(); @Override double mean(); @Override double variance(); @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 sigma; }