#' Cross validated RF for analysis, not used for tutorial.
#'
#' @param
#' @return
#'
#'
#'
#' @examples
#'
#'
tutRFcv <- function(inputFile, ntree = 100, folds = 5){
ctrl <- trainControl(method = "cv", number = folds)
rfFit <- train(form = Class ~ .-SeqID,
data = inputFile,
method = "rf",
metric = "Accuracy",
trControl = ctrl,
tuneGrid = expand.grid(mtry = c(ntree)))
print(rfFit)
return(rfFit)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.