test_class.file: modules/ml/src/test/java/org/apache/ignite/ml/preprocessing/binarization/BinarizationPreprocessorTest.java
test_class.identifier: BinarizationPreprocessorTest
test_case.body: @Test
      public void testApply() {
          double[][] data = new double[][]{
              {1, 2, 3},
              {1, 4, 8},
              {1, 8, 16},
          };
  
          Vectorizer<Integer, double[], Integer, Double> vectorizer = new DoubleArrayVectorizer<>(0, 1, 2);
  
          BinarizationPreprocessor<Integer, double[]> preprocessor = new BinarizationPreprocessor<>(
              7,
              vectorizer
          );
  
          double[][] postProcessedData = new double[][]{
              {0, 0, 0},
              {0, 0, 1},
              {0, 1, 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: BinarizationPreprocessorTest.testApply()
test_case.full_signature: @Test public void testApply()
test_case.identifier: testApply
test_case.invocations: 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 = 6877811577892621239L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 6877811577892621239L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: threshold
focal_class.modifier: private final
focal_class.original_string: private final double threshold;
focal_class.type: double
focal_class.var_name: threshold
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/binarization/BinarizationPreprocessor.java
focal_class.identifier: BinarizationPreprocessor
focal_class.interfaces: implements Preprocessor<K, V>, DeployableObject
focal_class.class_method_signature: BinarizationPreprocessor.BinarizationPreprocessor(double threshold, Preprocessor<K, V> basePreprocessor)
focal_class.full_signature: public  BinarizationPreprocessor(double threshold, Preprocessor<K, V> basePreprocessor)
focal_class.identifier: BinarizationPreprocessor
focal_class.modifiers: public
focal_class.parameters: (double threshold, Preprocessor<K, V> basePreprocessor)
focal_class.signature:  BinarizationPreprocessor(double threshold, Preprocessor<K, V> basePreprocessor)
focal_class.class_method_signature: BinarizationPreprocessor.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: BinarizationPreprocessor.getThreshold()
focal_class.full_signature: public double getThreshold()
focal_class.identifier: getThreshold
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double getThreshold()
focal_class.class_method_signature: BinarizationPreprocessor.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);
  
          for (int i = 0; i < res.size(); i++) {
              if (res.get(i) > threshold) res.set(i, 1.0);
              else res.set(i, 0.0);
          }
  
          return res;
      }
focal_method.class_method_signature: BinarizationPreprocessor.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 get set set
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)