Learn R Programming

biogram (version 1.0)

prepare_data: Prepare data for further analysis

Description

Creates random stratified subsample of population.

Usage

prepare_data(data_set, pos, neg, train_size, test_size)

Arguments

data_set
data set.
pos
indices of positive data.
neg
indices of negative data.
train_size
a vector of length 2 - size of positive and negative training subsample.
test_size
a vector of length 2 - size of positive and negative test subsample.

Value

  • a list of a length 2 containing cases belonging to respectively train and test sample.

Details

Check it for 0 sample size.

Examples

Run this code
#data(iris)
#prepare_data(iris, 1:20, 101:120, c(5, 5), c(8, 8))

Run the code above in your browser using DataLab