Interface IterativeClassifier

    • Method Detail

      • initializeClassifier

        void initializeClassifier​(Instances instances)
                           throws java.lang.Exception
        Initializes an iterative classifier.
        Parameters:
        instances - the instances to be used in induction
        Throws:
        java.lang.Exception - if the model cannot be initialized
      • setResume

        void setResume​(boolean resume)
                throws java.lang.Exception
        If called with argument true then the classifier will be able to be trained further (with more iterations) at a later date. Note that this can potentially make serialized model structures larger, because certain data and data structures might need to be retained to facilitate continued training. When set to false, and done() is called, then the classifier will be cleaned up, resulting in (potentially) a more compact serialized model.
        Parameters:
        resume - true to enable training to continue at a later point after the initial model is built.
        Throws:
        java.lang.Exception - if finalization cannot be set
      • getResume

        boolean getResume()
        Returns true if the classifier will be able to be trained further (with more iterations) at a later date. Note that this can potentially make serialized model structures larger, because certain data and data structures might need to be retained to facilitate continued training. When set to false, and done() is called, then the classifier will be cleaned up, resulting in (potentially) a more compact serialized model.
        Returns:
        true to enable training to continue at a later point after the initial model is built.
        Throws:
        java.lang.Exception - if finalization cannot be set
      • next

        boolean next()
              throws java.lang.Exception
        Performs one iteration.
        Returns:
        false if no further iterations could be performed, true otherwise
        Throws:
        java.lang.Exception - if this iteration fails for unexpected reasons
      • done

        void done()
           throws java.lang.Exception
        Signal end of iterating, for either the time being or permanently if setFinalized(true) has been called. Useful for any house-keeping/cleanup.
        Throws:
        java.lang.Exception - if cleanup fails