test_class.declarator: data
test_class.modifier: private
test_class.original_string: private GmmPartitionData data;
test_class.type: GmmPartitionData
test_class.var_name: data
test_class.file: modules/ml/src/test/java/org/apache/ignite/ml/clustering/gmm/GmmPartitionDataTest.java
test_class.identifier: GmmPartitionDataTest
test_case.body: @Test
      public void testEstimateLikelihoodClusters() {
          GmmPartitionData.estimateLikelihoodClusters(data, new Vector[] {
              VectorUtils.of(1.0, 0.5),
              VectorUtils.of(0.0, 0.5)
          });
  
          assertEquals(1.0, data.pcxi(0, 0), 1e-4);
          assertEquals(0.0, data.pcxi(1, 0), 1e-4);
  
          assertEquals(0.0, data.pcxi(0, 1), 1e-4);
          assertEquals(1.0, data.pcxi(1, 1), 1e-4);
  
          assertEquals(1.0, data.pcxi(0, 2), 1e-4);
          assertEquals(0.0, data.pcxi(1, 2), 1e-4);
      }
test_case.class_method_signature: GmmPartitionDataTest.testEstimateLikelihoodClusters()
test_case.full_signature: @Test public void testEstimateLikelihoodClusters()
test_case.identifier: testEstimateLikelihoodClusters
test_case.invocations: estimateLikelihoodClusters of of assertEquals pcxi assertEquals pcxi assertEquals pcxi assertEquals pcxi assertEquals pcxi assertEquals pcxi
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEstimateLikelihoodClusters()
focal_class.declarator: xs
focal_class.modifier: private
focal_class.original_string: private List<LabeledVector<Double>> xs;
focal_class.type: List<LabeledVector<Double>>
focal_class.var_name: xs
focal_class.declarator: pcxi
focal_class.modifier: private
focal_class.original_string: private double[][] pcxi;
focal_class.type: double[][]
focal_class.var_name: pcxi
focal_class.file: modules/ml/src/main/java/org/apache/ignite/ml/clustering/gmm/GmmPartitionData.java
focal_class.identifier: GmmPartitionData
focal_class.interfaces: implements AutoCloseable
focal_class.class_method_signature: GmmPartitionData.GmmPartitionData(List<LabeledVector<Double>> xs, double[][] pcxi)
focal_class.full_signature:   GmmPartitionData(List<LabeledVector<Double>> xs, double[][] pcxi)
focal_class.identifier: GmmPartitionData
focal_class.parameters: (List<LabeledVector<Double>> xs, double[][] pcxi)
focal_class.signature:  GmmPartitionData(List<LabeledVector<Double>> xs, double[][] pcxi)
focal_class.class_method_signature: GmmPartitionData.getX(int i)
focal_class.full_signature: public Vector getX(int i)
focal_class.identifier: getX
focal_class.modifiers: public
focal_class.parameters: (int i)
focal_class.return: Vector
focal_class.signature: Vector getX(int i)
focal_class.class_method_signature: GmmPartitionData.updatePcxiAndComputeLikelihood(Dataset<EmptyContext, GmmPartitionData> dataset, Vector clusterProbs,
          List<MultivariateGaussianDistribution> components)
focal_class.full_signature: static double updatePcxiAndComputeLikelihood(Dataset<EmptyContext, GmmPartitionData> dataset, Vector clusterProbs,
          List<MultivariateGaussianDistribution> components)
focal_class.identifier: updatePcxiAndComputeLikelihood
focal_class.modifiers: static
focal_class.parameters: (Dataset<EmptyContext, GmmPartitionData> dataset, Vector clusterProbs,
          List<MultivariateGaussianDistribution> components)
focal_class.return: double
focal_class.signature: double updatePcxiAndComputeLikelihood(Dataset<EmptyContext, GmmPartitionData> dataset, Vector clusterProbs,
          List<MultivariateGaussianDistribution> components)
focal_class.class_method_signature: GmmPartitionData.pcxi(int cluster, int i)
focal_class.full_signature: public double pcxi(int cluster, int i)
focal_class.identifier: pcxi
focal_class.modifiers: public
focal_class.parameters: (int cluster, int i)
focal_class.return: double
focal_class.signature: double pcxi(int cluster, int i)
focal_class.class_method_signature: GmmPartitionData.setPcxi(int cluster, int i, double value)
focal_class.full_signature: public void setPcxi(int cluster, int i, double value)
focal_class.identifier: setPcxi
focal_class.modifiers: public
focal_class.parameters: (int cluster, int i, double value)
focal_class.return: void
focal_class.signature: void setPcxi(int cluster, int i, double value)
focal_class.class_method_signature: GmmPartitionData.getAllXs()
focal_class.full_signature: public List<LabeledVector<Double>> getAllXs()
focal_class.identifier: getAllXs
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<LabeledVector<Double>>
focal_class.signature: List<LabeledVector<Double>> getAllXs()
focal_class.class_method_signature: GmmPartitionData.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: GmmPartitionData.estimateLikelihoodClusters(GmmPartitionData data, Vector[] initMeans)
focal_class.full_signature: static void estimateLikelihoodClusters(GmmPartitionData data, Vector[] initMeans)
focal_class.identifier: estimateLikelihoodClusters
focal_class.modifiers: static
focal_class.parameters: (GmmPartitionData data, Vector[] initMeans)
focal_class.return: void
focal_class.signature: void estimateLikelihoodClusters(GmmPartitionData data, Vector[] initMeans)
focal_class.class_method_signature: GmmPartitionData.size()
focal_class.full_signature: public int size()
focal_class.identifier: size
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int size()
focal_class.class_method_signature: GmmPartitionData.updatePcxi(GmmPartitionData data, Vector clusterProbs,
          List<MultivariateGaussianDistribution> components)
focal_class.full_signature: static double updatePcxi(GmmPartitionData data, Vector clusterProbs,
          List<MultivariateGaussianDistribution> components)
focal_class.identifier: updatePcxi
focal_class.modifiers: static
focal_class.parameters: (GmmPartitionData data, Vector clusterProbs,
          List<MultivariateGaussianDistribution> components)
focal_class.return: double
focal_class.signature: double updatePcxi(GmmPartitionData data, Vector clusterProbs,
          List<MultivariateGaussianDistribution> components)
focal_class.class_method_signature: GmmPartitionData.asPrimitive(Double val)
focal_class.full_signature: private static double asPrimitive(Double val)
focal_class.identifier: asPrimitive
focal_class.modifiers: private static
focal_class.parameters: (Double val)
focal_class.return: double
focal_class.signature: double asPrimitive(Double val)
focal_method.body: static void estimateLikelihoodClusters(GmmPartitionData data, Vector[] initMeans) {
          for (int i = 0; i < data.size(); i++) {
              int closestClusterId = -1;
              double minSquaredDist = Double.MAX_VALUE;
  
              Vector x = data.getX(i);
              for (int c = 0; c < initMeans.length; c++) {
                  data.setPcxi(c, i, 0.0);
                  double distance = initMeans[c].getDistanceSquared(x);
                  if (distance < minSquaredDist) {
                      closestClusterId = c;
                      minSquaredDist = distance;
                  }
              }
  
              data.setPcxi(closestClusterId, i, 1.);
          }
      }
focal_method.class_method_signature: GmmPartitionData.estimateLikelihoodClusters(GmmPartitionData data, Vector[] initMeans)
focal_method.full_signature: static void estimateLikelihoodClusters(GmmPartitionData data, Vector[] initMeans)
focal_method.identifier: estimateLikelihoodClusters
focal_method.invocations: size getX setPcxi getDistanceSquared setPcxi
focal_method.modifiers: static
focal_method.parameters: (GmmPartitionData data, Vector[] initMeans)
focal_method.return: void
focal_method.signature: void estimateLikelihoodClusters(GmmPartitionData data, Vector[] initMeans)