Class OrdinalToNumeric

    • Constructor Detail

      • OrdinalToNumeric

        public OrdinalToNumeric()
    • Method Detail

      • globalInfo

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

        public 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 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:
        Exception - if the input format can't be set successfully
      • input

        public boolean input​(Instance inst)
                      throws 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:
        IllegalStateException - if no input format has been defined.
        NullPointerException - if the input format has not been defined.
        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​(String[] args)
        Main method for testing this class.
        Parameters:
        args - should contain arguments to the filter: use -h for help