@KFStep(name="SerializedModelSaver", category="DataSinks", toolTipText="A step that saves models to the file system", iconPath="weka/gui/knowledgeflow/icons/SerializedModelSaver.gif") public class SerializedModelSaver extends BaseStep
Data
objects to
the filesystem.Constructor and Description |
---|
SerializedModelSaver() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFilenamePrefix()
Get the text to prepend to the filename
|
boolean |
getIncludeRelationNameInFilename()
Get whether to include the relation name as part of the filename
|
java.util.List<java.lang.String> |
getIncomingConnectionTypes()
Get a list of incoming connection types that this step can accept.
|
int |
getIncrementalSaveSchedule()
Get how frequently to save an incremental model
|
java.util.List<java.lang.String> |
getOutgoingConnectionTypes()
Get a list of outgoing connection types that this step can produce.
|
java.io.File |
getOutputDirectory()
Get the directory to save to
|
void |
processIncoming(Data data)
Process an incoming data payload (if the step accepts incoming connections)
|
void |
setFilenamePrefix(java.lang.String filenamePrefix)
Set the text to prepend to the filename
|
void |
setIncludeRelationNameInFilename(boolean includeRelationName)
Set whether to include the relation name as part of the filename
|
void |
setIncrementalSaveSchedule(int schedule)
Set how frequently to save an incremental model
|
void |
setOutputDirectory(java.io.File directory)
Set the directory to save to
|
void |
stepInit()
Initialize the step
|
environmentSubstitute, getCustomEditorForStep, getDefaultSettings, getInteractiveViewers, getInteractiveViewersImpls, getName, getStepManager, globalInfo, isResourceIntensive, isStopRequested, outputStructureForConnectionType, outputStructureForConnectionType, setName, setStepIsResourceIntensive, setStepManager, setStepMustRunSingleThreaded, start, stepMustRunSingleThreaded, stop
@FilePropertyMetadata(fileChooserDialogType=1, directoriesOnly=true) @OptionMetadata(displayName="Output directory", description="The directory to save models to", displayOrder=0) public void setOutputDirectory(java.io.File directory)
directory
- the directory to save topublic java.io.File getOutputDirectory()
@OptionMetadata(displayName="Filename prefix", description="A prefix to prepend to the filename", displayOrder=1) public void setFilenamePrefix(java.lang.String filenamePrefix)
filenamePrefix
- the prefix to add to the filenamepublic java.lang.String getFilenamePrefix()
@OptionMetadata(displayName="Incremental save schedule", description="How frequently to save incremental classifiers (<= 0 indicates that the save will happen just once, at the end of the stream", displayOrder=4) public void setIncrementalSaveSchedule(int schedule)
schedule
- how often (i.e. every x updates) to save the model. <= 0
indicates that the save will happen just once, at the end of the
stream.public int getIncrementalSaveSchedule()
@OptionMetadata(displayName="Include relation name in file name", description="Whether to include the relation name of the data as part of the file name", displayOrder=2) public void setIncludeRelationNameInFilename(boolean includeRelationName)
includeRelationName
- true to include the relation name as part of the
filenamepublic boolean getIncludeRelationNameInFilename()
public java.util.List<java.lang.String> getIncomingConnectionTypes()
public java.util.List<java.lang.String> getOutgoingConnectionTypes()
public void stepInit()
public void processIncoming(Data data) throws WekaException
processIncoming
in interface BaseStepExtender
processIncoming
in interface Step
processIncoming
in class BaseStep
data
- the data to processWekaException
- if a problem occurs