create_random_subset {utiml} | R Documentation |
Create a random subset of a dataset
Description
Create a random subset of a dataset
Usage
create_random_subset(
mdata,
instances,
attributes = mdata$measures$num.inputs,
replacement = FALSE
)
Arguments
mdata |
A mldr dataset |
instances |
The number of expected instances |
attributes |
The number of expected attributes. (Default: all attributes) |
replacement |
A boolean value to define sample with replacement or not. (Default: FALSE) |
Value
A new mldr subset
See Also
Other sampling:
create_holdout_partition()
,
create_kfold_partition()
,
create_subset()
Examples
small.toy <- create_random_subset(toyml, 10, 3)
medium.toy <- create_random_subset(toyml, 50, 5)
[Package utiml version 0.1.7 Index]