K - Type of a key in upstream data.V - Type of a value in upstream data.public class TrainTestDatasetSplitter<K,V> extends Object implements Serializable
| Constructor and Description |
|---|
TrainTestDatasetSplitter()
Constructs a new instance of train test dataset splitter.
|
TrainTestDatasetSplitter(UniformMapper<K,V> mapper)
Constructs a new instance of train test dataset splitter.
|
| Modifier and Type | Method and Description |
|---|---|
TrainTestSplit<K,V> |
split(double trainSize)
Splits dataset into train and test subsets.
|
TrainTestSplit<K,V> |
split(double trainSize,
double testSize)
Splits dataset into train and test subsets.
|
public TrainTestDatasetSplitter()
public TrainTestDatasetSplitter(UniformMapper<K,V> mapper)
mapper - Mapper used to map a key-value pair to a point on the segment (0, 1).public TrainTestSplit<K,V> split(double trainSize)
trainSize - The proportion of the dataset to include in the train split (should be between 0 and 1).public TrainTestSplit<K,V> split(double trainSize, double testSize)
trainSize - The proportion of the dataset to include in the train split (should be between 0 and 1).testSize - The proportion of the dataset to include in the test split (should be a number between 0 and 1).
GridGain In-Memory Computing Platform : ver. 8.9.26 Release Date : October 16 2025