Package adams.data.binning.operation
Class Stratify
- java.lang.Object
-
- adams.data.binning.operation.Stratify
-
public class Stratify extends Object
For stratifying binnable data.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Constructor Summary
Constructors Constructor Description Stratify()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> List<Binnable<T>>
stratify(List<Binnable<T>> data, int folds)
Stratifies the list of binnable data, using the value of the items.
-
-
-
Method Detail
-
stratify
public static <T> List<Binnable<T>> stratify(List<Binnable<T>> data, int folds)
Stratifies the list of binnable data, using the value of the items. Creates copy of list, then sorts list items according to their values. Based on Weka's Instances.stratify(int) method.- Type Parameters:
T
- the payload type- Parameters:
data
- the data to stratifyfolds
- the number of folds- Returns:
- the stratified data
-
-