Created
October 7, 2019 18:57
-
-
Save monogenea/4828af010cb4d5342b882b942ae8d104 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compile cross-validation settings | |
set.seed(100) | |
myfolds <- createMultiFolds(arcene$class, k = 5, times = 10) | |
control <- trainControl("repeatedcv", index = myfolds, selectionFunction = "oneSE") | |
# Train PLS model | |
mod1 <- train(class ~ ., data = arcene, | |
method = "pls", | |
metric = "Accuracy", | |
tuneLength = 20, | |
trControl = control, | |
preProc = c("zv","center","scale")) | |
# Check CV profile | |
plot(mod1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment