test_class.declarator: aggregator1 = new MeanWithClusterProbAggregator()
test_class.modifier: private
test_class.original_string: private MeanWithClusterProbAggregator aggregator1 = new MeanWithClusterProbAggregator();
test_class.type: MeanWithClusterProbAggregator
test_class.var_name: aggregator1
test_class.declarator: aggregator2 = new MeanWithClusterProbAggregator()
test_class.modifier: private
test_class.original_string: private MeanWithClusterProbAggregator aggregator2 = new MeanWithClusterProbAggregator();
test_class.type: MeanWithClusterProbAggregator
test_class.var_name: aggregator2
test_class.file: modules/ml/src/test/java/org/apache/ignite/ml/clustering/gmm/MeanWithClusterProbAggregatorTest.java
test_class.identifier: MeanWithClusterProbAggregatorTest
test_case.body: @Test
      public void testReduce() {
          MeanWithClusterProbAggregator aggregator3 = new MeanWithClusterProbAggregator();
          MeanWithClusterProbAggregator aggregator4 = new MeanWithClusterProbAggregator();
  
          aggregator3.add(VectorUtils.of(1., 1.), 0.5);
          aggregator3.add(VectorUtils.of(0., 1.), 0.25);
          aggregator3.add(VectorUtils.of(1., 0.), 0.25);
          aggregator3.add(VectorUtils.of(0., 0.), 0.5);
  
          aggregator4.add(VectorUtils.of(1., 1.), 1.0);
          aggregator4.add(VectorUtils.of(0., 1.), 1.0);
          aggregator4.add(VectorUtils.of(1., 0.), 1.0);
          aggregator4.add(VectorUtils.of(0., 0.), 1.0);
  
          List<MeanWithClusterProbAggregator> res = MeanWithClusterProbAggregator.reduce(
              Arrays.asList(aggregator1, aggregator3),
              Arrays.asList(aggregator2, aggregator4)
          );
  
          MeanWithClusterProbAggregator res1 = res.get(0);
          assertEquals(0.70, res1.clusterProb(), 1e-2);
          assertArrayEquals(new double[] {0.580, 0.491}, res1.mean().asArray(), 1e-2);
  
          MeanWithClusterProbAggregator res2 = res.get(1);
          assertEquals(0.68, res2.clusterProb(), 1e-2);
          assertArrayEquals(new double[] {0.50, 0.50}, res2.mean().asArray(), 1e-2);
      }
test_case.class_method_signature: MeanWithClusterProbAggregatorTest.testReduce()
test_case.full_signature: @Test public void testReduce()
test_case.identifier: testReduce
test_case.invocations: add of add of add of add of add of add of add of add of reduce asList asList get assertEquals clusterProb assertArrayEquals asArray mean get assertEquals clusterProb assertArrayEquals asArray mean
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testReduce()
focal_class.declarator: serialVersionUID = 2700985110021774629L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 2700985110021774629L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: weightedXsSum
focal_class.modifier: private
focal_class.original_string: private Vector weightedXsSum;
focal_class.type: Vector
focal_class.var_name: weightedXsSum
focal_class.declarator: pcxiSum
focal_class.modifier: private
focal_class.original_string: private double pcxiSum;
focal_class.type: double
focal_class.var_name: pcxiSum
focal_class.declarator: rowCount
focal_class.modifier: private
focal_class.original_string: private int rowCount;
focal_class.type: int
focal_class.var_name: rowCount
focal_class.file: modules/ml/src/main/java/org/apache/ignite/ml/clustering/gmm/MeanWithClusterProbAggregator.java
focal_class.identifier: MeanWithClusterProbAggregator
focal_class.interfaces: implements Serializable
focal_class.class_method_signature: MeanWithClusterProbAggregator.MeanWithClusterProbAggregator()
focal_class.full_signature:   MeanWithClusterProbAggregator()
focal_class.identifier: MeanWithClusterProbAggregator
focal_class.parameters: ()
focal_class.signature:  MeanWithClusterProbAggregator()
focal_class.class_method_signature: MeanWithClusterProbAggregator.MeanWithClusterProbAggregator(Vector weightedXsSum, double pcxiSum, int rowCount)
focal_class.full_signature:   MeanWithClusterProbAggregator(Vector weightedXsSum, double pcxiSum, int rowCount)
focal_class.identifier: MeanWithClusterProbAggregator
focal_class.parameters: (Vector weightedXsSum, double pcxiSum, int rowCount)
focal_class.signature:  MeanWithClusterProbAggregator(Vector weightedXsSum, double pcxiSum, int rowCount)
focal_class.class_method_signature: MeanWithClusterProbAggregator.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: MeanWithClusterProbAggregator.clusterProb()
focal_class.full_signature: public double clusterProb()
focal_class.identifier: clusterProb
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double clusterProb()
focal_class.class_method_signature: MeanWithClusterProbAggregator.aggreateStats(Dataset<EmptyContext, GmmPartitionData> dataset, int countOfComponents)
focal_class.full_signature: public static AggregatedStats aggreateStats(Dataset<EmptyContext, GmmPartitionData> dataset, int countOfComponents)
focal_class.identifier: aggreateStats
focal_class.modifiers: public static
focal_class.parameters: (Dataset<EmptyContext, GmmPartitionData> dataset, int countOfComponents)
focal_class.return: AggregatedStats
focal_class.signature: AggregatedStats aggreateStats(Dataset<EmptyContext, GmmPartitionData> dataset, int countOfComponents)
focal_class.class_method_signature: MeanWithClusterProbAggregator.add(Vector x, double pcxi)
focal_class.full_signature:  void add(Vector x, double pcxi)
focal_class.identifier: add
focal_class.parameters: (Vector x, double pcxi)
focal_class.return: void
focal_class.signature: void add(Vector x, double pcxi)
focal_class.class_method_signature: MeanWithClusterProbAggregator.plus(MeanWithClusterProbAggregator other)
focal_class.full_signature:  MeanWithClusterProbAggregator plus(MeanWithClusterProbAggregator other)
focal_class.identifier: plus
focal_class.parameters: (MeanWithClusterProbAggregator other)
focal_class.return: MeanWithClusterProbAggregator
focal_class.signature: MeanWithClusterProbAggregator plus(MeanWithClusterProbAggregator other)
focal_class.class_method_signature: MeanWithClusterProbAggregator.map(GmmPartitionData data, int countOfComponents)
focal_class.full_signature: static List<MeanWithClusterProbAggregator> map(GmmPartitionData data, int countOfComponents)
focal_class.identifier: map
focal_class.modifiers: static
focal_class.parameters: (GmmPartitionData data, int countOfComponents)
focal_class.return: List<MeanWithClusterProbAggregator>
focal_class.signature: List<MeanWithClusterProbAggregator> map(GmmPartitionData data, int countOfComponents)
focal_class.class_method_signature: MeanWithClusterProbAggregator.reduce(List<MeanWithClusterProbAggregator> l,
          List<MeanWithClusterProbAggregator> r)
focal_class.full_signature: static List<MeanWithClusterProbAggregator> reduce(List<MeanWithClusterProbAggregator> l,
          List<MeanWithClusterProbAggregator> r)
focal_class.identifier: reduce
focal_class.modifiers: static
focal_class.parameters: (List<MeanWithClusterProbAggregator> l,
          List<MeanWithClusterProbAggregator> r)
focal_class.return: List<MeanWithClusterProbAggregator>
focal_class.signature: List<MeanWithClusterProbAggregator> reduce(List<MeanWithClusterProbAggregator> l,
          List<MeanWithClusterProbAggregator> r)
focal_method.body: static List<MeanWithClusterProbAggregator> reduce(List<MeanWithClusterProbAggregator> l,
          List<MeanWithClusterProbAggregator> r) {
          A.ensure(l != null || r != null, "Both partitions cannot equal to null");
  
          if (l == null || l.isEmpty())
              return r;
          if (r == null || r.isEmpty())
              return l;
  
          A.ensure(l.size() == r.size(), "l.size() == r.size()");
          List<MeanWithClusterProbAggregator> res = new ArrayList<>();
          for (int i = 0; i < l.size(); i++)
              res.add(l.get(i).plus(r.get(i)));
  
          return res;
      }
focal_method.class_method_signature: MeanWithClusterProbAggregator.reduce(List<MeanWithClusterProbAggregator> l,
          List<MeanWithClusterProbAggregator> r)
focal_method.full_signature: static List<MeanWithClusterProbAggregator> reduce(List<MeanWithClusterProbAggregator> l,
          List<MeanWithClusterProbAggregator> r)
focal_method.identifier: reduce
focal_method.invocations: ensure isEmpty isEmpty ensure size size size add plus get get
focal_method.modifiers: static
focal_method.parameters: (List<MeanWithClusterProbAggregator> l,
          List<MeanWithClusterProbAggregator> r)
focal_method.return: List<MeanWithClusterProbAggregator>
focal_method.signature: List<MeanWithClusterProbAggregator> reduce(List<MeanWithClusterProbAggregator> l,
          List<MeanWithClusterProbAggregator> r)