Class WekaAttributeIndex

    • Constructor Detail

      • WekaAttributeIndex

        public WekaAttributeIndex()
        Initializes with no index.
      • WekaAttributeIndex

        public WekaAttributeIndex​(String index)
        Initializes with the given index, but no maximum.
        Parameters:
        index - the index to use
      • WekaAttributeIndex

        public WekaAttributeIndex​(String index,
                                  int max)
        Initializes with the given index and maximum.
        Parameters:
        index - the index to use
        max - the maximum of the 1-based index (e.g., use "10" to allow "1-10" or -1 for uninitialized)
    • Method Detail

      • getNumNames

        protected int getNumNames​(weka.core.Instances data)
        Returns the number of columns the dataset has.
        Specified by:
        getNumNames in class AbstractDataBackedIndex<weka.core.Instances>
        Parameters:
        data - the dataset to retrieve the number of columns
      • getName

        protected String getName​(weka.core.Instances data,
                                 int colIndex)
        Returns the column name at the specified index.
        Specified by:
        getName in class AbstractDataBackedIndex<weka.core.Instances>
        Parameters:
        data - the dataset to use
        colIndex - the column index
        Returns:
        the column name