sampling: Splits a dataset to a train and a test sets of a user defined...

Description Usage Arguments Value Author(s) Examples

Description

This function takes as input a dataset and splits it into a train and a test set based to a user defined percentage.

Usage

1
    sampling(Data,valPercent,classLabels,seed)

Arguments

Data

The input dataset to be split as an eSet object.

valPercent

The percentage of the input dataset used for validation purposes e.g. 40.

classLabels

The varLabels name in the eSet object where the class labels are stored e.g "type".

seed

Setting the seed number for reproducible sampling. The default value is 1.

Value

trainData

The data used for training as an eSet object

testData

The data used for validation as an eSet object

Author(s)

Argiris Sakellariou

Examples

1
2
3
library(mAPKLData)
data(mAPKLData)
breast <- sampling(Data=mAPKLData, valPercent=40, classLabels="type", seed=135)

asakellariou/git-git.bioconductor.org-packages-mAPKL documentation built on June 5, 2019, 8:49 p.m.