Package adams.data.binning
Class BinnableInstances
- java.lang.Object
-
- adams.data.binning.BinnableInstances
-
public class BinnableInstances extends Object
Helper class for binning instances.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BinnableInstances.ClassValueBinValueExtractor
Uses the class value as bin value.static class
BinnableInstances.GroupedClassValueBinValueExtractor
Uses the class value of the first instance in the group as bin value.static class
BinnableInstances.NumericClassGroupExtractor
Group extractor for numeric class attributes (using string representation of values).static class
BinnableInstances.StringAttributeGroupExtractor
Group extractor for string attributes.
-
Constructor Summary
Constructors Constructor Description BinnableInstances()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<Binnable<weka.core.Instance>>
toBinnableUsingClass(weka.core.Instances data)
Turns Instances into a list of binnables using the class value.static List<Binnable<weka.core.Instance>>
toBinnableUsingIndex(weka.core.Instances data)
Turns Instances into a list of binnables using the instance index.static weka.core.Instances
toInstances(List<Binnable<weka.core.Instance>> list)
Turns a binnable list back into Instances.
-
-
-
Method Detail
-
toBinnableUsingClass
public static List<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<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
-
-