Interface Classifier

    • Method Detail

      • getSubClassifiers

        Classifier[] getSubClassifiers()
        Gets the classifiers of this ensemble. Returns null if this learner is a single learner.
        Returns:
        an array of the learners of the ensemble
      • correctlyClassifies

        boolean correctlyClassifies​(Instance inst)
        Gets whether this classifier correctly classifies an instance. Uses getVotesForInstance to obtain the prediction and the instance to obtain its true class.
        Parameters:
        inst - the instance to be classified
        Returns:
        true if the instance is correctly classified
      • trainOnInstance

        void trainOnInstance​(Instance inst)
        Trains this learner incrementally using the given example.
        Parameters:
        inst - the instance to be used for training
      • getVotesForInstance

        double[] getVotesForInstance​(Instance inst)
        Predicts the class memberships for a given instance. If an instance is unclassified, the returned array elements must be all zero.
        Parameters:
        inst - the instance to be classified
        Returns:
        an array containing the estimated membership probabilities of the test instance in each class
      • getPredictionForInstance

        Prediction getPredictionForInstance​(Instance inst)
        Gets the reference to the header of the data stream. The header of the data stream is extended from WEKA Instances. This header is needed to know the number of classes and attributes
        Returns:
        the reference to the data stream header