All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nd4j.linalg.dataset.api.preprocessor.AbstractNormalizer Maven / Gradle / Ivy

There is a newer version: 1.0.0-M2.1
Show newest version
package org.nd4j.linalg.dataset.api.preprocessor;

import java.io.Serializable;

/**
 * Abstract base class for normalizers for both DataSet and MultiDataSet processing
 *
 * @author Ede Meijer
 */
public abstract class AbstractNormalizer implements Serializable {
    protected abstract boolean isFit();

    void assertIsFit() {
        if (!isFit()) {
            throw new RuntimeException(
                            "API_USE_ERROR: Preprocessors have to be explicitly fit before use. Usage: .fit(dataset) or .fit(datasetiterator)");
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy