split a dataset into two. randomly splits a dataset into two datasets
whose sizes are determined by the 'fraction' parameter (the first dataset
will contain that fraction of the examples).
for example: train, test = splitDataset(data, 0.7) will split the data
-- 70% for training and 30% for test
:Parameters:
-
`data` - a dataset object
-
`fraction` - the fraction of the examples to put in the first split
:Keywords:
-
`stratified` - whether to perform stratified splitting, i.e. whether
to keep the class ratio in the two datasets [default: True]
-
`seed` - random number generator seed
-
`indicesOnly` - if this flag is set, the indices of the two splits
are returned instead of the datasets [default: False]
|