test_class.file: modules/ml/src/test/java/org/apache/ignite/ml/preprocessing/maxabsscaling/MaxAbsScalerPreprocessorTest.java
test_class.identifier: MaxAbsScalerPreprocessorTest
test_case.body: @Test
      public void testApply() {
          double[][] data = new double[][] {
              {2., 4., 1.},
              {1., 8., 22.},
              {-4., 10., 100.},
              {0., 22., 300.}
          };
          double[] maxAbs = new double[] {4, 22, 300};
  
          Vectorizer<Integer, double[], Integer, Double> vectorizer = new DoubleArrayVectorizer<>(0, 1, 2);
  
          MaxAbsScalerPreprocessor<Integer, double[]> preprocessor = new MaxAbsScalerPreprocessor<>(
              maxAbs,
              vectorizer
          );
  
          double[][] expData = new double[][] {
              {.5, 4. / 22, 1. / 300},
              {.25, 8. / 22, 22. / 300},
              {-1., 10. / 22, 100. / 300},
              {0., 22. / 22, 300. / 300}
          };
  
          for (int i = 0; i < data.length; i++)
              assertArrayEquals(expData[i], preprocessor.apply(i, data[i]).features().asArray(), 1e-8);
      }
test_case.class_method_signature: MaxAbsScalerPreprocessorTest.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 = 1L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 1L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: maxAbs
focal_class.modifier: private final
focal_class.original_string: private final double[] maxAbs;
focal_class.type: double[]
focal_class.var_name: maxAbs
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/maxabsscaling/MaxAbsScalerPreprocessor.java
focal_class.identifier: MaxAbsScalerPreprocessor
focal_class.interfaces: implements Preprocessor<K, V>, DeployableObject
focal_class.class_method_signature: MaxAbsScalerPreprocessor.MaxAbsScalerPreprocessor(double[] maxAbs, Preprocessor<K, V> basePreprocessor)
focal_class.full_signature: public  MaxAbsScalerPreprocessor(double[] maxAbs, Preprocessor<K, V> basePreprocessor)
focal_class.identifier: MaxAbsScalerPreprocessor
focal_class.modifiers: public
focal_class.parameters: (double[] maxAbs, Preprocessor<K, V> basePreprocessor)
focal_class.signature:  MaxAbsScalerPreprocessor(double[] maxAbs, Preprocessor<K, V> basePreprocessor)
focal_class.class_method_signature: MaxAbsScalerPreprocessor.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: MaxAbsScalerPreprocessor.getMaxAbs()
focal_class.full_signature: public double[] getMaxAbs()
focal_class.identifier: getMaxAbs
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: double[]
focal_class.signature: double[] getMaxAbs()
focal_class.class_method_signature: MaxAbsScalerPreprocessor.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() == maxAbs.length;
  
          for (int i = 0; i < res.size(); i++)
              res.set(i, res.get(i) / maxAbs[i]);
  
          return res;
      }
focal_method.class_method_signature: MaxAbsScalerPreprocessor.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 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)