@KFStep(name="ExampleClassifier", category="Examples", toolTipText="A simple custom classifier processing example", iconPath="weka/gui/knowledgeflow/icons/DefaultClassifier.gif") public class ExampleClassifier extends BaseStep implements PairedDataHelper.PairedProcessor<Classifier>
PairedDataHelper,
PairedDataHelper.PairedProcessor,
Serialized Form| Constructor and Description |
|---|
ExampleClassifier() |
| Modifier and Type | Method and Description |
|---|---|
Classifier |
getClassifier()
Get the classifier to train/eval
|
java.util.List<java.lang.String> |
getIncomingConnectionTypes()
Incoming connections we can accept.
|
java.util.List<java.lang.String> |
getOutgoingConnectionTypes()
Outgoing connections we can produce
|
void |
processIncoming(Data data)
Process some incoming data (either train or test sets)
|
Classifier |
processPrimary(java.lang.Integer setNum,
java.lang.Integer maxSetNum,
Data data,
PairedDataHelper<Classifier> helper)
Process training data
|
void |
processSecondary(java.lang.Integer setNum,
java.lang.Integer maxSetNum,
Data data,
PairedDataHelper<Classifier> helper)
Process test data
|
void |
setClassifier(Classifier classifier)
Set the classifier to train/eval
|
void |
stepInit()
Initialize the step
|
environmentSubstitute, getCustomEditorForStep, getDefaultSettings, getInteractiveViewers, getInteractiveViewersImpls, getName, getStepManager, globalInfo, isResourceIntensive, isStopRequested, outputStructureForConnectionType, setName, setStepIsResourceIntensive, setStepManager, start, stop@OptionMetadata(displayName="The classifier to use", description="The classifier to train") public void setClassifier(Classifier classifier)
classifier - the classifier to usepublic Classifier getClassifier()
public void stepInit()
throws WekaException
stepInit in interface BaseStepExtenderstepInit in interface StepWekaException - if a problem occurspublic java.util.List<java.lang.String> getIncomingConnectionTypes()
getIncomingConnectionTypes in interface BaseStepExtendergetIncomingConnectionTypes in interface Steppublic java.util.List<java.lang.String> getOutgoingConnectionTypes()
getOutgoingConnectionTypes in interface BaseStepExtendergetOutgoingConnectionTypes in interface Steppublic void processIncoming(Data data) throws WekaException
processIncoming in interface BaseStepExtenderprocessIncoming in interface StepprocessIncoming in class BaseStepdata - the data 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 set number of this piece of training datamaxSetNum - the maximum set number in the batchdata - the data object containing the training datahelper - the PairedDataHelper to useWekaException - 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 piece of test datamaxSetNum - the maximum set number in the batchdata - the data object containing the test datahelper - the PairedDataHelper to useWekaException - if a problem occurs