test_class.file: modules/ml/src/test/java/org/apache/ignite/ml/math/stat/MultivariateGaussianDistributionTest.java
test_class.identifier: MultivariateGaussianDistributionTest
test_case.body: @Test
      public void testApply() {
          MultivariateGaussianDistribution distribution = new MultivariateGaussianDistribution(
              VectorUtils.of(1, 2),
              new DenseMatrix(new double[][] {new double[] {1, -0.5}, new double[] {-0.5, 1}})
          );
  
          Assert.assertEquals(0.183, distribution.prob(VectorUtils.of(1, 2)), 0.01);
          Assert.assertEquals(0.094, distribution.prob(VectorUtils.of(0, 2)), 0.01);
      }
test_case.class_method_signature: MultivariateGaussianDistributionTest.testApply()
test_case.full_signature: @Test public void testApply()
test_case.identifier: testApply
test_case.invocations: of assertEquals prob of assertEquals prob of
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testApply()
focal_class.declarator: mean
focal_class.modifier: private
focal_class.original_string: private Vector mean;
focal_class.type: Vector
focal_class.var_name: mean
focal_class.declarator: invCovariance
focal_class.modifier: private
focal_class.original_string: private Matrix invCovariance;
focal_class.type: Matrix
focal_class.var_name: invCovariance
focal_class.declarator: normalizer
focal_class.modifier: private
focal_class.original_string: private double normalizer;
focal_class.type: double
focal_class.var_name: normalizer
focal_class.declarator: covariance
focal_class.modifier: private
focal_class.original_string: private Matrix covariance;
focal_class.type: Matrix
focal_class.var_name: covariance
focal_class.file: modules/ml/src/main/java/org/apache/ignite/ml/math/stat/MultivariateGaussianDistribution.java
focal_class.identifier: MultivariateGaussianDistribution
focal_class.interfaces: implements Distribution
focal_class.class_method_signature: MultivariateGaussianDistribution.MultivariateGaussianDistribution(Vector mean, Matrix covariance)
focal_class.full_signature: public  MultivariateGaussianDistribution(Vector mean, Matrix covariance)
focal_class.identifier: MultivariateGaussianDistribution
focal_class.modifiers: public
focal_class.parameters: (Vector mean, Matrix covariance)
focal_class.signature:  MultivariateGaussianDistribution(Vector mean, Matrix covariance)
focal_class.class_method_signature: MultivariateGaussianDistribution.prob(Vector x)
focal_class.full_signature: @Override public double prob(Vector x)
focal_class.identifier: prob
focal_class.modifiers: @Override public
focal_class.parameters: (Vector x)
focal_class.return: double
focal_class.signature: double prob(Vector x)
focal_class.class_method_signature: MultivariateGaussianDistribution.dimension()
focal_class.full_signature: @Override public int dimension()
focal_class.identifier: dimension
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int dimension()
focal_class.class_method_signature: MultivariateGaussianDistribution.mean()
focal_class.full_signature: public Vector mean()
focal_class.identifier: mean
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Vector
focal_class.signature: Vector mean()
focal_class.class_method_signature: MultivariateGaussianDistribution.covariance()
focal_class.full_signature: public Matrix covariance()
focal_class.identifier: covariance
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Matrix
focal_class.signature: Matrix covariance()
focal_method.body: @Override public double prob(Vector x) {
          Vector delta = x.minus(mean);
          Matrix ePower = delta.toMatrix(true)
              .times(invCovariance)
              .times(delta.toMatrix(false))
              .times(-0.5);
          assert ePower.columnSize() == 1 && ePower.rowSize() == 1;
  
          return Math.pow(Math.E, ePower.get(0, 0)) / normalizer;
      }
focal_method.class_method_signature: MultivariateGaussianDistribution.prob(Vector x)
focal_method.full_signature: @Override public double prob(Vector x)
focal_method.identifier: prob
focal_method.invocations: minus times times times toMatrix toMatrix columnSize rowSize pow get
focal_method.modifiers: @Override public
focal_method.parameters: (Vector x)
focal_method.return: double
focal_method.signature: double prob(Vector x)