public void write(@NonNull MultiNormalizerMinMaxScaler normalizer, @NonNull OutputStream stream)
                    throws IOException {
        try (DataOutputStream dos = new DataOutputStream(stream)) {
            dos.writeBoolean(normalizer.isFitLabel());
            dos.writeInt(normalizer.numInputs());
            dos.writeInt(normalizer.isFitLabel() ? normalizer.numOutputs() : -1);
            dos.writeDouble(normalizer.getTargetMin());
            dos.writeDouble(normalizer.getTargetMax());

            for (int i = 0; i < normalizer.numInputs(); i++) {
                Nd4j.write(normalizer.getMin(i), dos);
                Nd4j.write(normalizer.getMax(i), dos);
            }
            if (normalizer.isFitLabel()) {
                for (int i = 0; i < normalizer.numOutputs(); i++) {
                    Nd4j.write(normalizer.getLabelMin(i), dos);
                    Nd4j.write(normalizer.getLabelMax(i), dos);
                }
            }
            dos.flush();
        }
    }
public void write ( @ NonNull MultiNormalizerMinMaxScaler normalizer , @ NonNull OutputStream stream ) throws IOException { try ( DataOutputStream dos = new DataOutputStream ( stream ) ) { dos . writeBoolean ( normalizer . isFitLabel ( ) ) ; dos . writeInt ( normalizer . numInputs ( ) ) ; dos . writeInt ( normalizer . isFitLabel ( ) ? normalizer . numOutputs ( ) : - 1 ) ; dos . writeDouble ( normalizer . getTargetMin ( ) ) ; dos . writeDouble ( normalizer . getTargetMax ( ) ) ; for ( int i = 0 ; i < normalizer . numInputs ( ) ; i ++ ) { Nd4j . write ( normalizer . getMin ( i ) , dos ) ; Nd4j . write ( normalizer . getMax ( i ) , dos ) ; } if ( normalizer . isFitLabel ( ) ) { for ( int i = 0 ; i < normalizer . numOutputs ( ) ; i ++ ) { Nd4j . write ( normalizer . getLabelMin ( i ) , dos ) ; Nd4j . write ( normalizer . getLabelMax ( i ) , dos ) ; } } dos . flush ( ) ; } }
Serialize a MultiNormalizerMinMaxScaler to a output stream

@param normalizer the normalizer
@param stream     the output stream to write to
@throws IOException