randomForest_CV | R Documentation |
Evaluation of Random Forest Classifier with K-Fold Cross Validation
randomForest_CV(
datasets = list(),
label.col = 1,
positive.class = NULL,
folds.num = 10,
ntree = 1500,
seed = 1,
parallel.cores = 2,
...
)
datasets |
a list containing one or several input datasets. See examples. |
label.col |
an integer. Column number of the label. |
positive.class |
|
folds.num |
an integer. Number of folds. Default |
ntree |
parameter for random forest. Default: 1500. See |
seed |
random seed for data splitting. Integer. |
parallel.cores |
an integer specifying the number of cores for parallel computation. Default: |
... |
other parameters passed to |
This function return the performance of k-fold CV.
randomForest_RFE
, randomForest_tune
, randomForest
# Following codes only show how to use this function
# and cannot reflect the genuine performance of tools or classifiers.
data(demoPositiveSeq)
data(demoNegativeSeq)
dataPositive <- featureFreq(seqRNA = demoPositiveSeq$RNA.positive,
seqPro = demoPositiveSeq$Pro.positive,
label = "Interact", featureMode = "conc",
computePro = "DeNovo", k.Pro = 3, k.RNA = 2,
normalize = "none", parallel.cores = 2)
dataNegative <- featureFreq(seqRNA = demoNegativeSeq$RNA.negative,
seqPro = demoNegativeSeq$Pro.negative,
label = "Non.Interact", featureMode = "conc",
computePro = "DeNovo", k.Pro = 3, k.RNA = 2,
normalize = "none", parallel.cores = 2)
dataset <- rbind(dataPositive, dataNegative)
Perf_CV <- randomForest_CV(datasets = list(dataset), label.col = 1, ntree = 100,
parallel.cores = 2, mtry = 20)
# if you have more than one input dataset,
# use "datasets = list(dataset1, dataset2, dataset3)".
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.