Class WekaGetInstancesValue

  • 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 WekaGetInstancesValue
    extends AbstractTransformer
    Retrieves a value from a WEKA Instances object.
    Notes:
    - date and relational values are forwarded as strings
    - missing values are output as '?' (without the single quotes)


    Input/output:
    - accepts:
       weka.core.Instances
    - generates:
       java.lang.Double
       java.lang.String


    -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: WekaGetInstancesValue
     
    -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 get the value from.
        default: first
        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
     
    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.
    • Constructor Detail

      • WekaGetInstancesValue

        public WekaGetInstancesValue()
    • 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.
        Parameters:
        value - the index
      • getColumn

        public WekaAttributeIndex getColumn()
        Returns the column.
        Returns:
        the index
      • 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.
      • 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:
        java.lang.Double.class, java.lang.String.class
      • doExecute

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