Class Autoencoder

    • Field Detail

      • hiddenLayerOption

        public IntOption hiddenLayerOption
      • learningRateOption

        public FloatOption learningRateOption
    • Constructor Detail

      • Autoencoder

        public Autoencoder()
    • Method Detail

      • trainOnInstanceImpl

        public void trainOnInstanceImpl​(Instance inst)
        Uses backpropagation to update the weights in the autoencoder.
        Specified by:
        trainOnInstanceImpl in class AbstractClassifier
        Parameters:
        inst - the instance to be used for training
      • getVotesForInstance

        public double[] getVotesForInstance​(Instance inst)
        Calculates the error between the autoencoder's reconstruction of the input and the argument instances. This error is converted to vote scores.
        Specified by:
        getVotesForInstance in interface Classifier
        Specified by:
        getVotesForInstance in class AbstractClassifier
        Parameters:
        inst - the instance to get votes for
        Returns:
        the votes for the instance's label [normal, outlier]
      • getAnomalyScore

        public double getAnomalyScore​(Instance inst)
        Returns the squared error between the input value and the reconstructed value as the anomaly score for the argument instance.
        Specified by:
        getAnomalyScore in interface OneClassClassifier
        Parameters:
        inst - the instance to score
        Returns:
        the argument instance's anomaly score.
      • isRandomizable

        public boolean isRandomizable()
        Autoencoder is randomizable.
        Specified by:
        isRandomizable in interface Learner<Example<Instance>>
        Returns:
        true if the learner needs a random seed.
      • getModelMeasurementsImpl

        protected Measurement[] getModelMeasurementsImpl()
        Description copied from class: AbstractClassifier
        Gets the current measurements of this classifier.

        The reason for ...Impl methods: ease programmer burden by not requiring them to remember calls to super in overridden methods. Note that this will produce compiler errors if not overridden.
        Specified by:
        getModelMeasurementsImpl in class AbstractClassifier
        Returns:
        an array of measurements to be used in evaluation tasks
      • getModelDescription

        public void getModelDescription​(StringBuilder out,
                                        int indent)
        Description copied from class: AbstractClassifier
        Returns a string representation of the model.
        Specified by:
        getModelDescription in class AbstractClassifier
        Parameters:
        out - the stringbuilder to add the description
        indent - the number of characters to indent
      • initialize

        public void initialize​(Collection<Instance> trainingPoints)
        Initializes the Autoencoder classifier on the argument trainingPoints.
        Specified by:
        initialize in interface OneClassClassifier
        Parameters:
        trainingPoints - the Collection of instances on which to initialize the Autoencoder classifier.