Description Usage Arguments Value Author(s)
This function allows to perform a Monte Carlo cross-validation of a Random Forest
1 |
data |
a n x p dataframe used to build the models. The first two columns must represent respectively the sample names and the class labels related to each sample |
nsplits |
the number of random splittings of the original dataset into training and test data sets |
test_prop |
the percentage (expressed as a real number) of the observations of the original dataset to be included in each test set |
opt_params |
a list of optional parameters characterizing both the model to be validated and the input dataset. It may include parameters like the number of trees (ntree), the mtry, or the eventual reference class label (ref_level) of the dataset |
a list of three elements:
a n x p dataframe representing the predictions during the cross-validation process. Its number of lines is equal to the number of observations included in each test set and the number of columns is equal to the number of test sets (defined by the nsplits input parameter).
a n x p dataframe representing the labels associated to the samples of each test set. Its number of lines n is equal to the number observations in each test set while p is the number of test sets defined by the nsplits input parameter
a list of p random forest models tested in the cross-validation process
@examples data(cachexiaData) params <- list(ntrees = 500, ref_level = levels(cachexiaData[,2])[1] ) mccv_obj <- rfMCCV(cachexiaData, nsplits = 5, test_prop = 1/3, opt_params = params)
Piergiorgio Palla
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.