Class OrdinalToNumeric

    • Constructor Detail

      • OrdinalToNumeric

        public OrdinalToNumeric()
    • Method Detail

      • globalInfo

        public java.lang.String globalInfo()
        Returns a string describing this filter
        Returns:
        a description of the filter suitable for displaying in the explorer/experimenter gui
      • setOptions

        public void setOptions​(java.lang.String[] options)
                        throws java.lang.Exception
        Parses a list of options for this object.
        Specified by:
        setOptions in interface OptionHandler
        Overrides:
        setOptions in class PotentialClassIgnorer
        Parameters:
        options - the list of options as an array of strings
        Throws:
        java.lang.Exception - if an option is not supported
      • setAttributesToOperateOn

        @OptionMetadata(displayName="Attributes to operate on",
                        description="Attributes to operate on. Can be a 1-based index range of indices or a comma-separated list of names",
                        commandLineParamName="R",
                        commandLineParamSynopsis="-R <range or list of names>",
                        displayOrder=1)
        public void setAttributesToOperateOn​(java.lang.String atts)
        Set the attributes to operate on
        Parameters:
        atts - a range of 1-based indexes or a comma-separated list of attribute names
      • getAttributesToOperateOn

        public java.lang.String getAttributesToOperateOn()
        Get the attributes to operate on
        Returns:
        a range of 1-based indexes or a comma-separated list of attribute names
      • setInputFormat

        public boolean setInputFormat​(Instances instancesInfo)
                               throws java.lang.Exception
        Sets the format of the input instances.
        Overrides:
        setInputFormat in class PotentialClassIgnorer
        Parameters:
        instancesInfo - an Instances object containing the input instance structure (any instances contained in the object are ignored - only the structure is required).
        Returns:
        true if the outputFormat may be collected immediately
        Throws:
        java.lang.Exception - if the input format can't be set successfully
      • input

        public boolean input​(Instance inst)
                      throws java.lang.Exception
        Input an instance for filtering. Ordinarily the instance is processed and made available for output immediately. Some filters require all instances be read before producing output.
        Overrides:
        input in class Filter
        Parameters:
        inst - the input instance
        Returns:
        true if the filtered instance may now be collected with output().
        Throws:
        java.lang.IllegalStateException - if no input format has been defined.
        java.lang.NullPointerException - if the input format has not been defined.
        java.lang.Exception - if the input instance was not of the correct format or if there was a problem with the filtering.
      • main

        public static void main​(java.lang.String[] args)
        Main method for testing this class.
        Parameters:
        args - should contain arguments to the filter: use -h for help