Last chance! 50% off unlimited learning
Sale ends in
# NOT RUN {
library(mlbench)
data(Sonar)
sonar <- Sonar[sample(1:nrow(Sonar), 100), ]
y <- sonar[, 61]
x <- sonar[, 1:10]
# Optimize an SVM using the default fast setting and Hooke-Jeeves
eztune(x, y)
# Optimize an SVM with 3-fold cross validation and Hooke-Jeeves
eztune(x, y, fast = FALSE, cross = 3)
# Optimize GBM using training set of 50 observations and Hooke-Jeeves
# }
# NOT RUN {
eztune(x, y, method = "gbm", fast = 50, loss = "auc")
# }
# NOT RUN {
# Optimize SVM with 25% of the observations as a training dataset
# using a genetic algorithm
# }
# NOT RUN {
eztune(x, y, method = "svm", optimizer = "ga", fast = 0.25)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab