Skip to content

Instantly share code, notes, and snippets.

@adamcone
Created June 10, 2016 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamcone/a00ea5e7f05560ac890d909bc4349fdd to your computer and use it in GitHub Desktop.
Save adamcone/a00ea5e7f05560ac890d909bc4349fdd to your computer and use it in GitHub Desktop.
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