sampling {mAPKL} | R Documentation |
This function takes as input a dataset and splits it into a train and a test set based to a user defined percentage.
sampling(Data,valPercent,classLabels,seed)
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. |
trainData |
The data used for training as an eSet object |
testData |
The data used for validation as an eSet object |
Argiris Sakellariou
library(mAPKLData) data(mAPKLData) breast <- sampling(Data=mAPKLData, valPercent=40, classLabels="type", seed=135)