powered by
Create a random subset of a dataset
create_random_subset( mdata, instances, attributes = mdata$measures$num.inputs, replacement = FALSE )
A mldr dataset
The number of expected instances
The number of expected attributes. (Default: all attributes)
A boolean value to define sample with replacement or not. (Default: FALSE)
A new mldr subset
Other sampling: create_holdout_partition(), create_kfold_partition(), create_subset()
create_holdout_partition()
create_kfold_partition()
create_subset()
# NOT RUN { small.toy <- create_random_subset(toyml, 10, 3) medium.toy <- create_random_subset(toyml, 50, 5) # }
Run the code above in your browser using DataLab