Class BinnableInstances


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

      • BinnableInstances

        public BinnableInstances()
    • Method Detail

      • toBinnableUsingClass

        public static List<adams.data.binning.Binnable<weka.core.Instance>> toBinnableUsingClass​(weka.core.Instances data)
                                                                                          throws Exception
        Turns Instances into a list of binnables using the class value.
        Parameters:
        data - the instances to convert
        Returns:
        the generated list
        Throws:
        Exception - if extraction of class value fails
      • toBinnableUsingIndex

        public static List<adams.data.binning.Binnable<weka.core.Instance>> toBinnableUsingIndex​(weka.core.Instances data)
                                                                                          throws Exception
        Turns Instances into a list of binnables using the instance index.
        Parameters:
        data - the instances to convert
        Returns:
        the generated list
        Throws:
        Exception - if extraction of index fails
      • toInstances

        public static weka.core.Instances toInstances​(List<adams.data.binning.Binnable<weka.core.Instance>> list)
        Turns a binnable list back into Instances.
        Parameters:
        list - the list to convert
        Returns:
        the generated instances