given this example :

# Example of Stacking algorithms
# create submodels
control <- trainControl(method="repeatedcv", number=10, repeats=3, savePredictions=TRUE, classProbs=TRUE)
algorithmList <- c('lda', 'rpart', 'glm', 'knn', 'svmRadial')
models <- caretList(Class~., data=dataset, trControl=control, methodList=algorithmList)
results <- resamples(models)

should we always give the entire data set to the train function and it will automate the splitting of test and train and evaluate on the test set or should i give it the train set and evaluate by my self on the test data set ?



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.