Class WekaSetInstancesValue

  • All Implemented Interfaces:
    AdditionalInformationHandler, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<Actor>, SizeOfHandler, Stoppable, StoppableWithFeedback, VariablesInspectionHandler, VariableChangeListener, Actor, ErrorHandler, InputConsumer, OutputProducer, Serializable, Comparable

    public class WekaSetInstancesValue
    extends AbstractTransformer
    Sets a value in a WEKA Instances object.
    Notes:
    - relational values cannot be set
    - '?' (without single quotes) is interpreted as missing value

    Input/output:
    - accepts:
       weka.core.Instances
    - generates:
       weka.core.Instances


    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: WekaSetInstancesValue
     
    -annotation <adams.core.base.BaseAnnotation> (property: annotations)
        The annotations to attach to this actor.
        default: 
     
    -skip <boolean> (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded 
        as it is.
        default: false
     
    -stop-flow-on-error <boolean> (property: stopFlowOnError)
        If set to true, the flow gets stopped in case this actor encounters an error;
         useful for critical actors.
        default: false
     
    -row <adams.core.Index> (property: row)
        The 1-based index of the row.
        default: first
        example: An index is a number starting with 1; the following placeholders can be used as well: first, second, third, last_2, last_1, last
     
    -column <adams.data.weka.WekaAttributeIndex> (property: column)
        The column to set the value in.
        default: last
        example: An index is a number starting with 1; apart from attribute names (case-sensitive), the following placeholders can be used as well: first, second, third, last_2, last_1, last
     
    -value <java.lang.String> (property: value)
        The value to set in the dataset.
        default: ?
     
    Version:
    $Revision: 6830 $
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Row

        protected Index m_Row
        the index of the row.
      • m_Value

        protected String m_Value
        the value to set.
    • Constructor Detail

      • WekaSetInstancesValue

        public WekaSetInstancesValue()
    • Method Detail

      • setRow

        public void setRow​(Index value)
        Sets the 1-based index of the row.
        Parameters:
        value - the 1-based index
      • getRow

        public Index getRow()
        Returns the 1-based index of the row.
        Returns:
        the 1-based index
      • rowTipText

        public String rowTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setColumn

        public void setColumn​(WekaAttributeIndex value)
        Sets the column index.
        Parameters:
        value - the index
      • getColumn

        public WekaAttributeIndex getColumn()
        Returns the column index.
        Returns:
        the field
      • columnTipText

        public String columnTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setValue

        public void setValue​(String value)
        Sets the value to set in the report.
        Parameters:
        value - the value to set
      • getValue

        public String getValue()
        Returns the value to set in the report.
        Returns:
        the value to set
      • valueTipText

        public String valueTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • accepts

        public Class[] accepts()
        Returns the class that the consumer accepts.
        Returns:
        weka.core.Instances.class
      • generates

        public Class[] generates()
        Returns the class of objects that it generates.
        Returns:
        weka.core.Instances.class
      • doExecute

        protected String doExecute()
        Executes the flow item.
        Specified by:
        doExecute in class AbstractActor
        Returns:
        null if everything is fine, otherwise error message