@Test public void testMean() { System.out.println("mean"); GaussianDistribution instance = new GaussianDistribution(0.0, 1.0); instance.rand(); assertEquals(0.0, instance.mean(), 1E-7); instance = new GaussianDistribution(1.0, 2.0); instance.rand(); assertEquals(1.0, instance.mean(), 1E-7); instance = new GaussianDistribution(2.0, 0.5); instance.rand(); assertEquals(2.0, instance.mean(), 1E-7); instance = new GaussianDistribution(3.0, 3.8); instance.rand(); assertEquals(3.0, instance.mean(), 1E-7); }
@Override public double mean() { return mu; }
GaussianDistribution extends AbstractDistribution implements ExponentialFamily { @Override public double mean() { return mu; } }
GaussianDistribution extends AbstractDistribution implements ExponentialFamily { @Override public double mean() { return mu; } GaussianDistribution(double mu, double sigma); }
GaussianDistribution extends AbstractDistribution implements ExponentialFamily { @Override public double mean() { return mu; } GaussianDistribution(double mu, double sigma); static GaussianDistribution fit(double[] data); static GaussianDistribution getInstance(); @Override int length(); @Override double mean(); @Override double variance(); @Override double sd(); @Override double entropy(); @Override String toString(); @Override double rand(); double randInverseCDF(); @Override double p(double x); @Override double logp(double x); @Override double cdf(double x); @Override double quantile(double p); @Override Mixture.Component M(double[] x, double[] posteriori); }
GaussianDistribution extends AbstractDistribution implements ExponentialFamily { @Override public double mean() { return mu; } GaussianDistribution(double mu, double sigma); static GaussianDistribution fit(double[] data); static GaussianDistribution getInstance(); @Override int length(); @Override double mean(); @Override double variance(); @Override double sd(); @Override double entropy(); @Override String toString(); @Override double rand(); double randInverseCDF(); @Override double p(double x); @Override double logp(double x); @Override double cdf(double x); @Override double quantile(double p); @Override Mixture.Component M(double[] x, double[] posteriori); final double mu; final double sigma; }