Created
June 10, 2016 20:52
-
-
Save adamcone/a00ea5e7f05560ac890d909bc4349fdd to your computer and use it in GitHub Desktop.
This file contains 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
cost = seq(-3, 5, length = 3) | |
gamma = seq(-5, 1, length = 3) | |
set.seed(0) | |
M0.index = sample(1:nrow(M0.training), 10000) | |
cv.svm.M0 = tune(svm, | |
Label ~ ., | |
data = M0.training[M0.index, -c(1, ncol(M0.training) - 1)], | |
kernel = "radial", | |
ranges = list(cost = 10^(cost), | |
gamma = 10^(gamma)), | |
tunecontrol = tune.control(sampling = 'cross', cross = 2)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment