Class MultilabelDatasetSplitter
- java.lang.Object
-
- ai.libs.jaicore.ml.weka.dataset.splitter.MultilabelDatasetSplitter
-
public class MultilabelDatasetSplitter extends java.lang.ObjectThis class provides methods to obtain train and test splits for a given data set and split technique.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetSplitTechniqueAndDetailsSeparator()Obtain the token used to separate a split technique and the details about the split.static weka.core.InstancesgetTestSplit(weka.core.Instances data, java.lang.String splitDescription, java.lang.String testFold, java.lang.String seed)Split the Instances object according to the given splitDescription.static weka.core.InstancesgetTrainSplit(weka.core.Instances data, java.lang.String splitDescription, java.lang.String testFold, java.lang.String seed)Split the Instances object according to the given splitDescription.
-
-
-
Method Detail
-
getTestSplit
public static weka.core.Instances getTestSplit(weka.core.Instances data, java.lang.String splitDescription, java.lang.String testFold, java.lang.String seed)Split the Instances object according to the given splitDescription. The splitDescription is composed of the used technique and details about the split for the used technique separated by special token obtainable bygetSplitTechniqueAndDetailsSeparator(). The returned data will only contain the testFold. The seed is given to the technique if it uses a seed.- Parameters:
data- The data to extract a test fold fromsplitDescription- The description of how the split shall be performedtestFold- The number of the fold to be extracted (0...n)seed- The random seed to be used by the technique- Returns:
- The test fold
-
getTrainSplit
public static weka.core.Instances getTrainSplit(weka.core.Instances data, java.lang.String splitDescription, java.lang.String testFold, java.lang.String seed)Split the Instances object according to the given splitDescription. The splitDescription is composed of the used technique and details about the split for the used technique separated by a special token obtainable bygetSplitTechniqueAndDetailsSeparator(). The returned data will not contain the testFold. The seed is given to the technique if it uses a seed.- Parameters:
data- The data to extract a train fold fromsplitDescription- The description of how the split shall be performedtestFold- The number of the fold to be excluded (0..n)seed- The random seed to be used by the technique- Returns:
- The train fold
-
getSplitTechniqueAndDetailsSeparator
public static java.lang.String getSplitTechniqueAndDetailsSeparator()
Obtain the token used to separate a split technique and the details about the split.- Returns:
- The separator token
-
-