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 testMap() {
          GmmPartitionData data = new GmmPartitionData(
              Arrays.asList(
                  new LabeledVector<>(VectorUtils.of(1, 0), 0.),
                  new LabeledVector<>(VectorUtils.of(0, 1), 0.),
                  new LabeledVector<>(VectorUtils.of(1, 1), 0.)
              ),
  
              new double[][] {
                  new double[] {0.5, 0.1},
                  new double[] {1.0, 0.4},
                  new double[] {0.3, 0.2}
              }
          );
  
          List<MeanWithClusterProbAggregator> res = MeanWithClusterProbAggregator.map(data, 2);
          assertEquals(2, res.size());
  
          MeanWithClusterProbAggregator agg1 = res.get(0);
          assertEquals(0.6, agg1.clusterProb(), 1e-2);
          assertArrayEquals(new double[] {0.44, 0.72}, agg1.mean().asArray(), 1e-2);
  
          MeanWithClusterProbAggregator agg2 = res.get(1);
          assertEquals(0.23, agg2.clusterProb(), 1e-2);
          assertArrayEquals(new double[] {0.42, 0.85}, agg2.mean().asArray(), 1e-2);
      }
test_case.class_method_signature: MeanWithClusterProbAggregatorTest.testMap()
test_case.full_signature: @Test public void testMap()
test_case.identifier: testMap
test_case.invocations: asList of of of map assertEquals size 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 testMap()
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> map(GmmPartitionData data, int countOfComponents) {
          List<MeanWithClusterProbAggregator> aggregators = new ArrayList<>();
          for (int i = 0; i < countOfComponents; i++)
              aggregators.add(new MeanWithClusterProbAggregator());
  
          for (int i = 0; i < data.size(); i++) {
              for (int c = 0; c < countOfComponents; c++)
                  aggregators.get(c).add(data.getX(i), data.pcxi(c, i));
          }
  
          return aggregators;
      }
focal_method.class_method_signature: MeanWithClusterProbAggregator.map(GmmPartitionData data, int countOfComponents)
focal_method.full_signature: static List<MeanWithClusterProbAggregator> map(GmmPartitionData data, int countOfComponents)
focal_method.identifier: map
focal_method.invocations: add size add get getX pcxi
focal_method.modifiers: static
focal_method.parameters: (GmmPartitionData data, int countOfComponents)
focal_method.return: List<MeanWithClusterProbAggregator>
focal_method.signature: List<MeanWithClusterProbAggregator> map(GmmPartitionData data, int countOfComponents)