test_class.file: modules/ml/src/test/java/org/apache/ignite/ml/preprocessing/binarization/BinarizationTrainerTest.java
test_class.identifier: BinarizationTrainerTest
test_class.superclass: extends TrainerTest
test_case.body: @Test
      public void testFit() {
          Map<Integer, Vector> data = new HashMap<>();
          data.put(1, VectorUtils.of(2, 4, 1));
          data.put(2, VectorUtils.of(1, 8, 22));
          data.put(3, VectorUtils.of(4, 10, 100));
          data.put(4, VectorUtils.of(0, 22, 300));
  
          final Vectorizer<Integer, Vector, Integer, Double> vectorizer = new DummyVectorizer<>(0, 1, 2);
  
          DatasetBuilder<Integer, Vector> datasetBuilder = new LocalDatasetBuilder<>(data, parts);
  
          BinarizationTrainer<Integer, Vector> binarizationTrainer = new BinarizationTrainer<Integer, Vector>()
              .withThreshold(10);
  
          assertEquals(10., binarizationTrainer.getThreshold(), 0);
  
          BinarizationPreprocessor<Integer, Vector> preprocessor = binarizationTrainer.fit(
              TestUtils.testEnvBuilder(),
              datasetBuilder,
              vectorizer
          );
  
          assertEquals(binarizationTrainer.getThreshold(), preprocessor.getThreshold(), 0);
  
          assertArrayEquals(new double[] {0, 0, 1}, preprocessor.apply(5, VectorUtils.of(1, 10, 100)).features().asArray(), 1e-8);
      }
test_case.class_method_signature: BinarizationTrainerTest.testFit()
test_case.full_signature: @Test public void testFit()
test_case.identifier: testFit
test_case.invocations: put of put of put of put of withThreshold assertEquals getThreshold fit testEnvBuilder assertEquals getThreshold getThreshold assertArrayEquals asArray features apply of
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFit()
focal_class.declarator: threshold
focal_class.modifier: private
focal_class.original_string: private double threshold;
focal_class.type: double
focal_class.var_name: threshold
focal_class.file: modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/binarization/BinarizationTrainer.java
focal_class.identifier: BinarizationTrainer
focal_class.interfaces: implements PreprocessingTrainer<K, V>
focal_class.class_method_signature: BinarizationTrainer.fit(
          LearningEnvironmentBuilder envBuilder,
          DatasetBuilder<K, V> datasetBuilder,
          Preprocessor<K, V> basePreprocessor)
focal_class.full_signature: @Override public BinarizationPreprocessor<K, V> fit(
          LearningEnvironmentBuilder envBuilder,
          DatasetBuilder<K, V> datasetBuilder,
          Preprocessor<K, V> basePreprocessor)
focal_class.identifier: fit
focal_class.modifiers: @Override public
focal_class.parameters: (
          LearningEnvironmentBuilder envBuilder,
          DatasetBuilder<K, V> datasetBuilder,
          Preprocessor<K, V> basePreprocessor)
focal_class.return: BinarizationPreprocessor<K, V>
focal_class.signature: BinarizationPreprocessor<K, V> fit(
          LearningEnvironmentBuilder envBuilder,
          DatasetBuilder<K, V> datasetBuilder,
          Preprocessor<K, V> basePreprocessor)
focal_class.class_method_signature: BinarizationTrainer.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: BinarizationTrainer.withThreshold(double threshold)
focal_class.full_signature: public BinarizationTrainer<K, V> withThreshold(double threshold)
focal_class.identifier: withThreshold
focal_class.modifiers: public
focal_class.parameters: (double threshold)
focal_class.return: BinarizationTrainer<K, V>
focal_class.signature: BinarizationTrainer<K, V> withThreshold(double threshold)
focal_method.body: @Override public BinarizationPreprocessor<K, V> fit(
          LearningEnvironmentBuilder envBuilder,
          DatasetBuilder<K, V> datasetBuilder,
          Preprocessor<K, V> basePreprocessor) {
          return new BinarizationPreprocessor<>(threshold, basePreprocessor);
      }
focal_method.class_method_signature: BinarizationTrainer.fit(
          LearningEnvironmentBuilder envBuilder,
          DatasetBuilder<K, V> datasetBuilder,
          Preprocessor<K, V> basePreprocessor)
focal_method.full_signature: @Override public BinarizationPreprocessor<K, V> fit(
          LearningEnvironmentBuilder envBuilder,
          DatasetBuilder<K, V> datasetBuilder,
          Preprocessor<K, V> basePreprocessor)
focal_method.identifier: fit
focal_method.modifiers: @Override public
focal_method.parameters: (
          LearningEnvironmentBuilder envBuilder,
          DatasetBuilder<K, V> datasetBuilder,
          Preprocessor<K, V> basePreprocessor)
focal_method.return: BinarizationPreprocessor<K, V>
focal_method.signature: BinarizationPreprocessor<K, V> fit(
          LearningEnvironmentBuilder envBuilder,
          DatasetBuilder<K, V> datasetBuilder,
          Preprocessor<K, V> basePreprocessor)