@KFStep(name="Classifier", category="Classifiers", toolTipText="Weka classifier wrapper", iconPath="", resourceIntensive=true) public class Classifier extends WekaAlgorithmWrapper implements PairedDataHelper.PairedProcessor<Classifier>
| Constructor and Description |
|---|
Classifier() |
| Modifier and Type | Method and Description |
|---|---|
Classifier |
getClassifier()
Get the classifier to train
|
List<String> |
getIncomingConnectionTypes()
Get a list of incoming connection types that this step can accept.
|
File |
getLoadClassifierFileName()
Get the name of the classifier to load at execution time.
|
List<String> |
getOutgoingConnectionTypes()
Get a list of outgoing connection types that this step can produce.
|
boolean |
getResetIncrementalClassifier()
Get whether to reset an incremental classifier at the start of an incoming
instance stream
|
boolean |
getUpdateIncrementalClassifier()
Get whether to update an incremental classifier on an incoming instance
stream
|
Class |
getWrappedAlgorithmClass()
Get the class of the algorithm being wrapped
|
void |
processIncoming(Data data)
Process an incoming data payload (if the step accepts incoming connections)
|
Classifier |
processPrimary(Integer setNum,
Integer maxSetNum,
Data data,
PairedDataHelper<Classifier> helper)
Process a training split (primary data handled by the PairedDataHelper)
|
void |
processSecondary(Integer setNum,
Integer maxSetNum,
Data data,
PairedDataHelper<Classifier> helper)
Process a test split/fold (secondary data handled by PairedDataHelper)
|
void |
setClassifier(Classifier classifier)
Set the classifier to train
|
void |
setLoadClassifierFileName(File filename)
Set the name of the classifier to load at execution time.
|
void |
setResetIncrementalClassifier(boolean reset)
Set whether to reset an incremental classifier at the start of an incoming
instance stream
|
void |
setUpdateIncrementalClassifier(boolean update)
Set whether to update an incremental classifier on an incoming instance
stream
|
void |
setWrappedAlgorithm(Object algo) |
void |
stepInit()
Initialize the step.
|
getDefaultIconPath, getDefaultPackageLevelIconPath, getIconPath, getWrappedAlgorithm, globalInfoenvironmentSubstitute, getCustomEditorForStep, getDefaultSettings, getInteractiveViewers, getInteractiveViewersImpls, getName, getStepManager, isResourceIntensive, isStopRequested, outputStructureForConnectionType, setName, setStepIsResourceIntensive, setStepManager, start, stoppublic Class getWrappedAlgorithmClass()
WekaAlgorithmWrappergetWrappedAlgorithmClass in class WekaAlgorithmWrapperpublic void setWrappedAlgorithm(Object algo)
setWrappedAlgorithm in class WekaAlgorithmWrapperpublic Classifier getClassifier()
@ProgrammaticProperty public void setClassifier(Classifier classifier)
classifier - the classifier to trainpublic void stepInit()
throws WekaException
StepstepInit in interface BaseStepExtenderstepInit in interface StepWekaException - if a problem occurs during initializationpublic File getLoadClassifierFileName()
@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(File filename)
filename - the name of the file to load the model frompublic boolean getResetIncrementalClassifier()
@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)
reset - true if the classifier should be resetpublic boolean getUpdateIncrementalClassifier()
@OptionMetadata(displayName="Update incremental classifier", description=" Update an incremental classifier on incoming instance stream") public void setUpdateIncrementalClassifier(boolean update)
update - true if an incremental classifier should be updatedpublic void processIncoming(Data data) throws WekaException
BaseStepprocessIncoming in interface BaseStepExtenderprocessIncoming in interface StepprocessIncoming in class BaseStepdata - the payload to processWekaException - if a problem occurspublic Classifier processPrimary(Integer setNum, Integer maxSetNum, Data data, PairedDataHelper<Classifier> helper) throws WekaException
processPrimary in interface PairedDataHelper.PairedProcessor<Classifier>setNum - the number of this split/foldmaxSetNum - the maximum number of splits/folds in the groupdata - the actual split/fold datahelper - the PairedDataHelper managing the paired dataWekaException - if a problem occurspublic void processSecondary(Integer setNum, Integer maxSetNum, Data data, PairedDataHelper<Classifier> helper) throws WekaException
processSecondary in interface PairedDataHelper.PairedProcessor<Classifier>setNum - the set number of this split/foldmaxSetNum - the maximum number of splits/folds in the groupdata - the actual split/fold datahelper - the PairedDataHelper managing the paried dataWekaException - if a problem occurspublic List<String> getIncomingConnectionTypes()
StepgetIncomingConnectionTypes in interface BaseStepExtendergetIncomingConnectionTypes in interface Steppublic List<String> getOutgoingConnectionTypes()
StepgetOutgoingConnectionTypes in interface BaseStepExtendergetOutgoingConnectionTypes in interface StepCopyright © 2016 University of Waikato, Hamilton, NZ. All Rights Reserved.