Learn R Programming

utiml (version 0.1.4)

create_random_subset: 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

Run this code
# 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