Class SerializedModelSaver

  • All Implemented Interfaces:
    java.io.Serializable, BaseStepExtender, Step

    @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
    Step that can save models encapsulated in incoming Data objects to the filesystem.
    Version:
    $Revision: $
    Author:
    Mark Hall (mhall{[at]}pentaho{[dot]}com)
    See Also:
    Serialized Form
    • Constructor Detail

      • SerializedModelSaver

        public SerializedModelSaver()
    • Method Detail

      • getOutputDirectory

        public java.io.File getOutputDirectory()
        Get the directory to save to
        Returns:
        the directory to save to
      • setFilenamePrefix

        @OptionMetadata(displayName="Filename prefix",
                        description="A prefix to prepend to the filename",
                        displayOrder=1)
        public void setFilenamePrefix​(java.lang.String filenamePrefix)
        Set the text to prepend to the filename
        Parameters:
        filenamePrefix - the prefix to add to the filename
      • getFilenamePrefix

        public java.lang.String getFilenamePrefix()
        Get the text to prepend to the filename
        Returns:
        the prefix to add to the filename
      • setIncrementalSaveSchedule

        @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)
        Set how frequently to save an incremental model
        Parameters:
        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.
      • getIncrementalSaveSchedule

        public int getIncrementalSaveSchedule()
        Get how frequently to save an incremental model
        Returns:
        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.
      • setIncludeRelationNameInFilename

        @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)
        Set whether to include the relation name as part of the filename
        Parameters:
        includeRelationName - true to include the relation name as part of the filename
      • getIncludeRelationNameInFilename

        public boolean getIncludeRelationNameInFilename()
        Get whether to include the relation name as part of the filename
        Returns:
        true if the relation name will be included as part of the filename
      • getIncomingConnectionTypes

        public java.util.List<java.lang.String> getIncomingConnectionTypes()
        Get a list of incoming connection types that this step can accept. Ideally (and if appropriate), this should take into account the state of the step and any existing incoming connections. E.g. a step might be able to accept one (and only one) incoming batch data connection.
        Returns:
        a list of incoming connections that this step can accept given its current state
      • getOutgoingConnectionTypes

        public java.util.List<java.lang.String> getOutgoingConnectionTypes()
        Get a list of outgoing connection types that this step can produce. Ideally (and if appropriate), this should take into account the state of the step and the incoming connections. E.g. depending on what incoming connection is present, a step might be able to produce a trainingSet output, a testSet output or neither, but not both.
        Returns:
        a list of outgoing connections that this step can produce
      • stepInit

        public void stepInit()
        Initialize the step