SplitIntoTrainTest: Split data into training and testing

Description Usage Arguments Value

View source: R/traintest.R

Description

Split a dataset with unique identifiers into training and testing datasets with a specified probability

Usage

1
SplitIntoTrainTest(RLdata, unique.ids, seed = NULL, prob.of.train = NULL)

Arguments

RLdata

a data frame containing the records to be matched

unique.ids

a vector containing the true unique identifiers of the records in RLdata. It should be of length nrow(RLdata)

seed

an integer specifying the seed to set before randomly dividing RLdata

prob.of.train

a probability between 0 and 1 that a given record is in the training dataset

Value

seed

the seed used

prob.of.train

the probability a record is in the training dataset

train

a vector of TRUE/FALSE values corresponding to whether the record is in the training dataset

test

a vector of TRUE/FALSE values corresponding to whether the record is in the testing dataset

training.data

the training dataset

testing.data

the testing dataset

train.ids

unique ids for the training dataset

test.ids

unique ids for the testing dataset


kaylafrisoli/ActiveRL documentation built on May 20, 2019, 7:53 a.m.