test_class.file: modules/ml/src/test/java/org/apache/ignite/ml/preprocessing/imputing/ImputerPreprocessorTest.java
test_class.identifier: ImputerPreprocessorTest
test_case.body: @Test
      public void testApply() {
          double[][] data = new double[][]{
              {Double.NaN, 20, 3},
              {2, Double.NaN, 8},
              {Double.NaN, Double.NaN, Double.NaN},
          };
  
          Vectorizer<Integer, double[], Integer, Double> vectorizer = new DoubleArrayVectorizer<>(0, 1, 2);
  
          ImputerPreprocessor<Integer, double[]> preprocessor = new ImputerPreprocessor<>(
              VectorUtils.of(1.1, 10.1, 100.1),
              vectorizer
          );
  
          double[][] postProcessedData = new double[][]{
              {1.1, 20, 3},
              {2, 10.1, 8},
              {1.1, 10.1, 100.1},
          };
  
         for (int i = 0; i < data.length; i++)
             assertArrayEquals(postProcessedData[i], preprocessor.apply(i, data[i]).features().asArray(), 1e-8);
      }
test_case.class_method_signature: ImputerPreprocessorTest.testApply()
test_case.full_signature: @Test public void testApply()
test_case.identifier: testApply
test_case.invocations: of assertArrayEquals asArray features apply
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testApply()
focal_class.declarator: serialVersionUID = 6887800576392623469L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 6887800576392623469L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: imputingValues
focal_class.modifier: private final
focal_class.original_string: private final Vector imputingValues;
focal_class.type: Vector
focal_class.var_name: imputingValues
focal_class.declarator: basePreprocessor
focal_class.modifier: private final
focal_class.original_string: private final Preprocessor<K, V> basePreprocessor;
focal_class.type: Preprocessor<K, V>
focal_class.var_name: basePreprocessor
focal_class.file: modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/imputing/ImputerPreprocessor.java
focal_class.identifier: ImputerPreprocessor
focal_class.interfaces: implements Preprocessor<K, V>, DeployableObject
focal_class.class_method_signature: ImputerPreprocessor.ImputerPreprocessor(Vector imputingValues,
                                 Preprocessor<K, V> basePreprocessor)
focal_class.full_signature: public  ImputerPreprocessor(Vector imputingValues,
                                 Preprocessor<K, V> basePreprocessor)
focal_class.identifier: ImputerPreprocessor
focal_class.modifiers: public
focal_class.parameters: (Vector imputingValues,
                                 Preprocessor<K, V> basePreprocessor)
focal_class.signature:  ImputerPreprocessor(Vector imputingValues,
                                 Preprocessor<K, V> basePreprocessor)
focal_class.class_method_signature: ImputerPreprocessor.apply(K k, V v)
focal_class.full_signature: @Override public LabeledVector apply(K k, V v)
focal_class.identifier: apply
focal_class.modifiers: @Override public
focal_class.parameters: (K k, V v)
focal_class.return: LabeledVector
focal_class.signature: LabeledVector apply(K k, V v)
focal_class.class_method_signature: ImputerPreprocessor.getDependencies()
focal_class.full_signature: @Override public List<Object> getDependencies()
focal_class.identifier: getDependencies
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<Object>
focal_class.signature: List<Object> getDependencies()
focal_method.body: @Override public LabeledVector apply(K k, V v) {
          LabeledVector res = basePreprocessor.apply(k, v);
  
          assert res.size() == imputingValues.size();
  
          for (int i = 0; i < res.size(); i++) {
              if (Double.valueOf(res.get(i)).equals(Double.NaN))
                  res.set(i, imputingValues.get(i));
          }
          return res;
      }
focal_method.class_method_signature: ImputerPreprocessor.apply(K k, V v)
focal_method.full_signature: @Override public LabeledVector apply(K k, V v)
focal_method.identifier: apply
focal_method.invocations: apply size size size equals valueOf get set get
focal_method.modifiers: @Override public
focal_method.parameters: (K k, V v)
focal_method.return: LabeledVector
focal_method.signature: LabeledVector apply(K k, V v)