@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
|
java.util.List<java.lang.String> |
getIncomingConnectionTypes()
Get a list of incoming connection types that this step can accept.
|
java.io.File |
getLoadClassifierFileName()
Get the name of the classifier to load at execution time.
|
java.util.List<java.lang.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
|
java.lang.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(java.lang.Integer setNum,
java.lang.Integer maxSetNum,
Data data,
PairedDataHelper<Classifier> helper)
Process a training split (primary data handled by the PairedDataHelper)
|
void |
processSecondary(java.lang.Integer setNum,
java.lang.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(java.io.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(java.lang.Object algo)
Set the wrapped algorithm
|
void |
stepInit()
Initialize the step.
|
getDefaultIconPath, getDefaultPackageLevelIconPath, getIconPath, getWrappedAlgorithm, globalInfo
environmentSubstitute, getCustomEditorForStep, getDefaultSettings, getInteractiveViewers, getInteractiveViewersImpls, getName, getStepManager, isResourceIntensive, isStopRequested, outputStructureForConnectionType, outputStructureForConnectionType, setName, setStepIsResourceIntensive, setStepManager, setStepMustRunSingleThreaded, start, stepMustRunSingleThreaded, stop
public java.lang.Class getWrappedAlgorithmClass()
WekaAlgorithmWrapper
getWrappedAlgorithmClass
in class WekaAlgorithmWrapper
public void setWrappedAlgorithm(java.lang.Object algo)
WekaAlgorithmWrapper
setWrappedAlgorithm
in class WekaAlgorithmWrapper
algo
- the algorithm to wraopublic Classifier getClassifier()
@ProgrammaticProperty public void setClassifier(Classifier classifier)
classifier
- the classifier to trainpublic void stepInit() throws WekaException
Step
stepInit
in interface BaseStepExtender
stepInit
in interface Step
WekaException
- if a problem occurs during initializationpublic java.io.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(java.io.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
BaseStep
processIncoming
in interface BaseStepExtender
processIncoming
in interface Step
processIncoming
in class BaseStep
data
- the payload to processWekaException
- if a problem occurspublic Classifier processPrimary(java.lang.Integer setNum, java.lang.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(java.lang.Integer setNum, java.lang.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 java.util.List<java.lang.String> getIncomingConnectionTypes()
Step
getIncomingConnectionTypes
in interface BaseStepExtender
getIncomingConnectionTypes
in interface Step
public java.util.List<java.lang.String> getOutgoingConnectionTypes()
Step
getOutgoingConnectionTypes
in interface BaseStepExtender
getOutgoingConnectionTypes
in interface Step