Class Classifier

    • Constructor Detail

      • Classifier

        public Classifier()
    • Method Detail

      • getClassifier

        public Classifier getClassifier()
        Get the classifier to train
        Returns:
        the classifier to train
      • setClassifier

        @ProgrammaticProperty
        public void setClassifier​(Classifier classifier)
        Set the classifier to train
        Parameters:
        classifier - the classifier to train
      • getLoadClassifierFileName

        public java.io.File getLoadClassifierFileName()
        Get the name of the classifier to load at execution time. This only applies in the case where the only incoming connection is a test set connection (batch mode) or an instance connection (incremental mode).
        Returns:
        the name of the file to load the model from
      • setLoadClassifierFileName

        @OptionMetadata(displayName="Classifier model to load",
                        description="Optional Path to a classifier to load at execution time (only applies when using testSet or instance connections)")
        @FilePropertyMetadata(fileChooserDialogType=0,
                              directoriesOnly=false)
        public void setLoadClassifierFileName​(java.io.File filename)
        Set the name of the classifier to load at execution time. This only applies in the case where the only incoming connection is a test set connection (batch mode) or an instance connection (incremental mode).
        Parameters:
        filename - the name of the file to load the model from
      • getResetIncrementalClassifier

        public boolean getResetIncrementalClassifier()
        Get whether to reset an incremental classifier at the start of an incoming instance stream
        Returns:
        true if the classifier should be reset
      • setResetIncrementalClassifier

        @OptionMetadata(displayName="Reset incremental classifier",
                        description="Reset classifier (if it is incremental) at the start of the incoming instance stream")
        public void setResetIncrementalClassifier​(boolean reset)
        Set whether to reset an incremental classifier at the start of an incoming instance stream
        Parameters:
        reset - true if the classifier should be reset
      • getUpdateIncrementalClassifier

        public boolean getUpdateIncrementalClassifier()
        Get whether to update an incremental classifier on an incoming instance stream
        Returns:
        true if an incremental classifier should be updated
      • setUpdateIncrementalClassifier

        @OptionMetadata(displayName="Update incremental classifier",
                        description=" Update an incremental classifier on incoming instance stream")
        public void setUpdateIncrementalClassifier​(boolean update)
        Set whether to update an incremental classifier on an incoming instance stream
        Parameters:
        update - true if an incremental classifier should be updated
      • processPrimary

        public Classifier processPrimary​(java.lang.Integer setNum,
                                         java.lang.Integer maxSetNum,
                                         Data data,
                                         PairedDataHelper<Classifier> helper)
                                  throws WekaException
        Process a training split (primary data handled by the PairedDataHelper)
        Specified by:
        processPrimary in interface PairedDataHelper.PairedProcessor<Classifier>
        Parameters:
        setNum - the number of this split/fold
        maxSetNum - the maximum number of splits/folds in the group
        data - the actual split/fold data
        helper - the PairedDataHelper managing the paired data
        Returns:
        a Classifier trained on this training split
        Throws:
        WekaException - if a problem occurs
      • processSecondary

        public void processSecondary​(java.lang.Integer setNum,
                                     java.lang.Integer maxSetNum,
                                     Data data,
                                     PairedDataHelper<Classifier> helper)
                              throws WekaException
        Process a test split/fold (secondary data handled by PairedDataHelper)
        Specified by:
        processSecondary in interface PairedDataHelper.PairedProcessor<Classifier>
        Parameters:
        setNum - the set number of this split/fold
        maxSetNum - the maximum number of splits/folds in the group
        data - the actual split/fold data
        helper - the PairedDataHelper managing the paried data
        Throws:
        WekaException - if a problem occurs
      • getIncomingConnectionTypes

        public java.util.List<java.lang.String> getIncomingConnectionTypes()
        Description copied from interface: Step
        Get a list of incoming connection types that this step can accept. Ideally (and if appropriate), this should take into account the state of the step and any existing incoming connections. E.g. a step might be able to accept one (and only one) incoming batch data connection.
        Specified by:
        getIncomingConnectionTypes in interface BaseStepExtender
        Specified by:
        getIncomingConnectionTypes in interface Step
        Returns:
        a list of incoming connections that this step can accept given its current state
      • getOutgoingConnectionTypes

        public java.util.List<java.lang.String> getOutgoingConnectionTypes()
        Description copied from interface: Step
        Get a list of outgoing connection types that this step can produce. Ideally (and if appropriate), this should take into account the state of the step and the incoming connections. E.g. depending on what incoming connection is present, a step might be able to produce a trainingSet output, a testSet output or neither, but not both.
        Specified by:
        getOutgoingConnectionTypes in interface BaseStepExtender
        Specified by:
        getOutgoingConnectionTypes in interface Step
        Returns:
        a list of outgoing connections that this step can produce