@KFStep(name="CrossValidationFoldMaker", category="Evaluation", toolTipText="A Step that creates stratified cross-validation folds from incoming data", iconPath="weka/gui/knowledgeflow/icons/CrossValidationFoldMaker.gif") public class CrossValidationFoldMaker extends BaseStep
Constructor and Description |
---|
CrossValidationFoldMaker() |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getIncomingConnectionTypes()
Get a list of incoming connection types that this step can accept.
|
java.lang.String |
getNumFolds()
Get the number of folds to create
|
java.util.List<java.lang.String> |
getOutgoingConnectionTypes()
Get a list of outgoing connection types that this step can produce.
|
boolean |
getPreserveOrder()
Get whether to preserve the order of the input instances when creatinbg
the folds
|
java.lang.String |
getSeed()
Get the random seed
|
Instances |
outputStructureForConnectionType(java.lang.String connectionName)
If possible, get the output structure for the named connection type as a
header-only set of instances.
|
void |
processIncoming(Data data)
Process an incoming data payload (if the step accepts incoming connections)
|
void |
setNumFolds(java.lang.String folds)
Set the number of folds to create
|
void |
setPreserveOrder(boolean preserve)
Set whether to preserve the order of the input instances when creatinbg
the folds
|
void |
setSeed(java.lang.String seed)
Set the random seed to use
|
void |
stepInit()
Initialize the step.
|
environmentSubstitute, getCustomEditorForStep, getDefaultSettings, getInteractiveViewers, getInteractiveViewersImpls, getName, getStepManager, globalInfo, isResourceIntensive, isStopRequested, outputStructureForConnectionType, setName, setStepIsResourceIntensive, setStepManager, setStepMustRunSingleThreaded, start, stepMustRunSingleThreaded, stop
@OptionMetadata(displayName="Number of folds", description="THe number of folds to create", displayOrder=0) public void setNumFolds(java.lang.String folds)
folds
- the number of folds to createpublic java.lang.String getNumFolds()
@OptionMetadata(displayName="Preserve instances order", description="Preserve the order of instances rather than randomly shuffling", displayOrder=1) public void setPreserveOrder(boolean preserve)
preserve
- true to preserve the orderpublic boolean getPreserveOrder()
@OptionMetadata(displayName="Random seed", description="The random seed to use for shuffling", displayOrder=3) public void setSeed(java.lang.String seed)
seed
- the random seed to usepublic java.lang.String getSeed()
public void stepInit() throws WekaException
WekaException
- if a problem occurs during initializationpublic void processIncoming(Data data) throws WekaException
processIncoming
in interface BaseStepExtender
processIncoming
in interface Step
processIncoming
in class BaseStep
data
- the payload to processWekaException
- if a problem occurspublic java.util.List<java.lang.String> getIncomingConnectionTypes()
public java.util.List<java.lang.String> getOutgoingConnectionTypes()
public Instances outputStructureForConnectionType(java.lang.String connectionName) throws WekaException
outputStructureForConnectionType
in interface Step
outputStructureForConnectionType
in class BaseStep
connectionName
- the name of the connection type to get the output
structure forWekaException
- if a problem occurs