com.datumbox.framework.core.machinelearning.modelselection.splitters
Class KFoldSplitter
- java.lang.Object
-
- com.datumbox.framework.core.machinelearning.common.abstracts.modelselection.AbstractSplitter
-
- com.datumbox.framework.core.machinelearning.modelselection.splitters.KFoldSplitter
-
public class KFoldSplitter extends AbstractSplitter
The KFoldSplitter partitions the data in K folds.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.datumbox.framework.core.machinelearning.common.abstracts.modelselection.AbstractSplitter
AbstractSplitter.Split
-
-
Constructor Summary
Constructors Constructor and Description KFoldSplitter(int k)The default constructor which receives the number of folds.KFoldSplitter(int k, java.util.Random random)The auxiliary constructor which receives the number of folds and a random generator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.util.Iterator<AbstractSplitter.Split>split(Dataframe dataset)Produces a series of train/test splits on the provided dataframe.
-
-
-
Constructor Detail
-
KFoldSplitter
public KFoldSplitter(int k)
The default constructor which receives the number of folds.- Parameters:
k-
-
KFoldSplitter
public KFoldSplitter(int k, java.util.Random random)The auxiliary constructor which receives the number of folds and a random generator.- Parameters:
k-random-
-
-
Method Detail
-
split
public java.util.Iterator<AbstractSplitter.Split> split(Dataframe dataset)
Produces a series of train/test splits on the provided dataframe.- Specified by:
splitin classAbstractSplitter- Returns:
-
-
DataMelt 3.0 © DataMelt by jWork.ORG