test_class.file: modules/ml/src/test/java/org/apache/ignite/ml/preprocessing/normalization/NormalizationTrainerTest.java
test_class.identifier: NormalizationTrainerTest
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));
  
          DatasetBuilder<Integer, Vector> datasetBuilder = new LocalDatasetBuilder<>(data, parts);
  
          final Vectorizer<Integer, Vector, Integer, Double> vectorizer = new DummyVectorizer<>(0, 1, 2);
  
          NormalizationTrainer<Integer, Vector> normalizationTrainer = new NormalizationTrainer<Integer, Vector>()
              .withP(3);
  
          assertEquals(3., normalizationTrainer.p(), 0);
  
          NormalizationPreprocessor<Integer, Vector> preprocessor = normalizationTrainer.fit(
              TestUtils.testEnvBuilder(),
              datasetBuilder,
              vectorizer
          );
  
          assertEquals(normalizationTrainer.p(), preprocessor.p(), 0);
  
          assertArrayEquals(new double[] {0.125, 0.99, 0.125}, preprocessor.apply(5, VectorUtils.of(1., 8., 1.)).features().asArray(), 1e-2);
      }
test_case.class_method_signature: NormalizationTrainerTest.testFit()
test_case.full_signature: @Test public void testFit()
test_case.identifier: testFit
test_case.invocations: put of put of put of put of withP assertEquals p fit testEnvBuilder assertEquals p p 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: p = 2
focal_class.modifier: private
focal_class.original_string: private int p = 2;
focal_class.type: int
focal_class.var_name: p
focal_class.file: modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/normalization/NormalizationTrainer.java
focal_class.identifier: NormalizationTrainer
focal_class.interfaces: implements PreprocessingTrainer<K, V>
focal_class.class_method_signature: NormalizationTrainer.fit(
          LearningEnvironmentBuilder envBuilder,
          DatasetBuilder<K, V> datasetBuilder,
          Preprocessor<K, V> basePreprocessor)
focal_class.full_signature: @Override public NormalizationPreprocessor<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: NormalizationPreprocessor<K, V>
focal_class.signature: NormalizationPreprocessor<K, V> fit(
          LearningEnvironmentBuilder envBuilder,
          DatasetBuilder<K, V> datasetBuilder,
          Preprocessor<K, V> basePreprocessor)
focal_class.class_method_signature: NormalizationTrainer.p()
focal_class.full_signature: public double p()
focal_class.identifier: p
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double p()
focal_class.class_method_signature: NormalizationTrainer.withP(double p)
focal_class.full_signature: public NormalizationTrainer<K, V> withP(double p)
focal_class.identifier: withP
focal_class.modifiers: public
focal_class.parameters: (double p)
focal_class.return: NormalizationTrainer<K, V>
focal_class.signature: NormalizationTrainer<K, V> withP(double p)
focal_method.body: @Override public NormalizationPreprocessor<K, V> fit(
          LearningEnvironmentBuilder envBuilder,
          DatasetBuilder<K, V> datasetBuilder,
          Preprocessor<K, V> basePreprocessor) {
          return new NormalizationPreprocessor<>(p, basePreprocessor);
      }
focal_method.class_method_signature: NormalizationTrainer.fit(
          LearningEnvironmentBuilder envBuilder,
          DatasetBuilder<K, V> datasetBuilder,
          Preprocessor<K, V> basePreprocessor)
focal_method.full_signature: @Override public NormalizationPreprocessor<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: NormalizationPreprocessor<K, V>
focal_method.signature: NormalizationPreprocessor<K, V> fit(
          LearningEnvironmentBuilder envBuilder,
          DatasetBuilder<K, V> datasetBuilder,
          Preprocessor<K, V> basePreprocessor)