test_class.file: modules/ml/src/test/java/org/apache/ignite/ml/preprocessing/standardscaling/StandardScalerPreprocessorTest.java
test_class.identifier: StandardScalerPreprocessorTest
test_case.body: @Test
      public void testApply() {
          double[][] inputData = new double[][] {
              {0, 2., 4., .1},
              {0, 1., -18., 2.2},
              {1, 4., 10., -.1},
              {1, 0., 22., 1.3}
          };
          double[] means = new double[] {0.5, 1.75, 4.5, 0.875};
          double[] sigmas = new double[] {0.5, 1.47901995, 14.51723114, 0.93374247};
  
          final Vectorizer<Integer, Vector, Integer, Double> vectorizer = new DummyVectorizer<Integer>(0, 1, 2, 3).labeled(0);
  
          StandardScalerPreprocessor<Integer, Vector> preprocessor = new StandardScalerPreprocessor<>(
              means,
              sigmas,
              vectorizer
          );
  
          double[][] expectedData = new double[][] {
              {-1., 0.16903085, -0.03444183, -0.82999331},
              {-1., -0.50709255, -1.54988233, 1.41902081},
              {1., 1.52127766, 0.37886012, -1.04418513},
              {1., -1.18321596, 1.20546403, 0.45515762}
          };
  
          for (int i = 0; i < inputData.length; i++)
              assertArrayEquals(expectedData[i], preprocessor.apply(i, VectorUtils.of(inputData[i])).features().asArray(), 1e-8);
      }
test_case.class_method_signature: StandardScalerPreprocessorTest.testApply()
test_case.full_signature: @Test public void testApply()
test_case.identifier: testApply
test_case.invocations: labeled assertArrayEquals asArray features apply of
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testApply()
focal_class.declarator: serialVersionUID = -5977957318991608203L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = -5977957318991608203L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: means
focal_class.modifier: private final
focal_class.original_string: private final double[] means;
focal_class.type: double[]
focal_class.var_name: means
focal_class.declarator: sigmas
focal_class.modifier: private final
focal_class.original_string: private final double[] sigmas;
focal_class.type: double[]
focal_class.var_name: sigmas
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/standardscaling/StandardScalerPreprocessor.java
focal_class.identifier: StandardScalerPreprocessor
focal_class.interfaces: implements Preprocessor<K, V>, DeployableObject
focal_class.class_method_signature: StandardScalerPreprocessor.StandardScalerPreprocessor(double[] means, double[] sigmas,
                                        Preprocessor<K, V> basePreprocessor)
focal_class.full_signature: public  StandardScalerPreprocessor(double[] means, double[] sigmas,
                                        Preprocessor<K, V> basePreprocessor)
focal_class.identifier: StandardScalerPreprocessor
focal_class.modifiers: public
focal_class.parameters: (double[] means, double[] sigmas,
                                        Preprocessor<K, V> basePreprocessor)
focal_class.signature:  StandardScalerPreprocessor(double[] means, double[] sigmas,
                                        Preprocessor<K, V> basePreprocessor)
focal_class.class_method_signature: StandardScalerPreprocessor.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: StandardScalerPreprocessor.getMeans()
focal_class.full_signature: public double[] getMeans()
focal_class.identifier: getMeans
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: double[]
focal_class.signature: double[] getMeans()
focal_class.class_method_signature: StandardScalerPreprocessor.getSigmas()
focal_class.full_signature: public double[] getSigmas()
focal_class.identifier: getSigmas
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: double[]
focal_class.signature: double[] getSigmas()
focal_class.class_method_signature: StandardScalerPreprocessor.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() == means.length;
  
          for (int i = 0; i < res.size(); i++)
              res.set(i, (res.get(i) - means[i]) / sigmas[i]);
  
          return res;
      }
focal_method.class_method_signature: StandardScalerPreprocessor.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)