- Create a standard normalizer and fit the data:
DataNormalization normalization = new NormalizerStandardize();
normalization.fit(trainIterator);
- Call the setPreprocessor() method to normalize the data on the fly:
trainIterator.setPreProcessor(normalization);
testIterator.setPreProcessor(normalization);