Learn R Programming

iDOS (version 1.0.1)

create.training.validation.split: create.training.validation.split

Description

Utility function to create random partitions of a dataset into training and validation sets. If samples are < 200, 66:34; otherwise 50:50 partitions are generated between training and validation sets respectively

Usage

create.training.validation.split(
  exp.data = NULL, ann.data = NULL, seed.number = 51214
  )

Value

A list of four matrices expression and two associated clinical matrices (exp.T, ann.T, exp.V and ann.V). One set for training and one for validation

Arguments

exp.data

Feature by sample mRNA abundance matrix

ann.data

Sample by clinical attribute matrix

seed.number

Random seed for sampling

Author

Syed Haider

Examples

Run this code

# load test data
x <- get.test.data(data.types = c("mRNA.T", "ann"));

# create training and validation sets
partitioned.datasets <- create.training.validation.split(
  exp.data = x$mRNA.T$BLCA, 
  ann.data = x$ann$BLCA, 
  seed.number = 51214
  );

Run the code above in your browser using DataLab