@Test public void testPdf() { System.out.println("pdf"); MultivariateGaussianDistribution instance = new MultivariateGaussianDistribution(mu, new Matrix(sigma)); for (int i = 0; i < x.length; i++) { assertEquals(pdf[i], instance.p(x[i]), 1E-4); } }
@Override public double p(double[] x) { return Math.exp(logp(x)); }
MultivariateGaussianDistribution implements MultivariateDistribution, MultivariateExponentialFamily { @Override public double p(double[] x) { return Math.exp(logp(x)); } }
MultivariateGaussianDistribution implements MultivariateDistribution, MultivariateExponentialFamily { @Override public double p(double[] x) { return Math.exp(logp(x)); } MultivariateGaussianDistribution(double[] mean, double variance);  MultivariateGaussianDistribution(double[] mean, double[] variance);  MultivariateGaussianDistribution(double[] mean, Matrix cov); }
MultivariateGaussianDistribution implements MultivariateDistribution, MultivariateExponentialFamily { @Override public double p(double[] x) { return Math.exp(logp(x)); } MultivariateGaussianDistribution(double[] mean, double variance);  MultivariateGaussianDistribution(double[] mean, double[] variance);  MultivariateGaussianDistribution(double[] mean, Matrix cov); static MultivariateGaussianDistribution fit(double[][] data); static MultivariateGaussianDistribution fit(double[][] data, boolean diagonal); @Override int length(); @Override double entropy(); @Override double[] mean(); @Override Matrix cov(); double scatter(); @Override double logp(double[] x); @Override double p(double[] x); @Override double cdf(double[] x); double[] rand(); double[][] rand(int n); @Override MultivariateMixture.Component M(double[][] data, double[] posteriori); @Override String toString(); }
MultivariateGaussianDistribution implements MultivariateDistribution, MultivariateExponentialFamily { @Override public double p(double[] x) { return Math.exp(logp(x)); } MultivariateGaussianDistribution(double[] mean, double variance);  MultivariateGaussianDistribution(double[] mean, double[] variance);  MultivariateGaussianDistribution(double[] mean, Matrix cov); static MultivariateGaussianDistribution fit(double[][] data); static MultivariateGaussianDistribution fit(double[][] data, boolean diagonal); @Override int length(); @Override double entropy(); @Override double[] mean(); @Override Matrix cov(); double scatter(); @Override double logp(double[] x); @Override double p(double[] x); @Override double cdf(double[] x); double[] rand(); double[][] rand(int n); @Override MultivariateMixture.Component M(double[][] data, double[] posteriori); @Override String toString(); final double[] mu; final Matrix sigma; final boolean diagonal; }