- Create a dataset iterator from the data. Refer to the following demonstration for RecordReaderDataSetIterator:
DataSetIterator iterator = new RecordReaderDataSetIterator(recordReader,batchSize);
- Apply the normalization to the dataset by calling the fit() method of the normalizer implementation. Refer to the following demonstration for the NormalizerStandardize preprocessor:
DataNormalization dataNormalization = new NormalizerStandardize();dataNormalization.fit(iterator);
- Call setPreprocessor() to set the preprocessor for the dataset:
iterator.setPreProcessor(dataNormalization);