Class BinnableDataset


  • public class BinnableDataset
    extends Object
    Helper class for binning Datasets.
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    • Constructor Detail

      • BinnableDataset

        public BinnableDataset()
    • Method Detail

      • toBinnableUsingClass

        public static List<Binnable<DataRow>> toBinnableUsingClass​(SpreadSheet data,
                                                                   int index)
                                                            throws Exception
        Turns Rows into a list of binnables using the class value.
        Parameters:
        data - the data rows to convert
        index - the index of the column to act as class
        Returns:
        the generated list
        Throws:
        Exception - if extraction of class value fails
      • toBinnableUsingIndex

        public static List<Binnable<DataRow>> toBinnableUsingIndex​(SpreadSheet data)
                                                            throws Exception
        Turns Rows into a list of binnables using the data row index.
        Parameters:
        data - the data rows to convert
        Returns:
        the generated list
        Throws:
        Exception - if extraction of index fails
      • toDataset

        public static Dataset toDataset​(List<Binnable<DataRow>> list)
        Turns a binnable list back into Rows.
        Parameters:
        list - the list to convert
        Returns:
        the generated data rows
      • toSpreadSheet

        public static SpreadSheet toSpreadSheet​(List<Binnable<DataRow>> list)
        Turns a binnable list back into Rows.
        Parameters:
        list - the list to convert
        Returns:
        the generated data rows