Skip to content

Commit

Permalink
fixed a typo bug
Browse files Browse the repository at this point in the history
  • Loading branch information
topepo committed Jul 13, 2015
1 parent 58c1fae commit dde4efb
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions RegressionTests/Code/svmLinear2.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ cctrl3 <- trainControl(method = "none",

set.seed(849)
test_class_cv_model <- train(trainX, trainY,
method = modelInfo,
method = "svmLinear2",
trControl = cctrl1,
tuneGrid = data.frame(cost = c(.25, .5, 1)),
preProc = c("center", "scale"))

set.seed(849)
test_class_cv_form <- train(Class ~ ., data = training,
method = modelInfo,
method = "svmLinear2",
trControl = cctrl1,
tuneGrid = data.frame(cost = c(.25, .5, 1)),
preProc = c("center", "scale"))
Expand All @@ -35,14 +35,14 @@ test_class_pred_form <- predict(test_class_cv_form, testing[, -ncol(testing)])

set.seed(849)
test_class_loo_model <- train(trainX, trainY,
method = modelInfo,
method = "svmLinear2",
trControl = cctrl2,
tuneGrid = data.frame(cost = c(.25, .5, 1)),
preProc = c("center", "scale"))

set.seed(849)
test_class_none_model <- train(trainX, trainY,
method = modelInfo,
method = "svmLinear2",
trControl = cctrl3,
tuneGrid = test_class_cv_model$bestTune,
metric = "ROC",
Expand Down Expand Up @@ -85,15 +85,15 @@ rctrl3 <- trainControl(method = "none")

set.seed(849)
test_reg_cv_model <- train(trainX, trainY,
method = modelInfo,
method = "svmLinear2",
trControl = rctrl1,
tuneGrid = data.frame(cost = c(.25, .5, 1)),
preProc = c("center", "scale"))
test_reg_pred <- predict(test_reg_cv_model, testX)

set.seed(849)
test_reg_cv_form <- train(y ~ ., data = training,
method = modelInfo,
method = "svmLinear2",
trControl = rctrl1,
tuneGrid = data.frame(cost = c(.25, .5, 1)),
preProc = c("center", "scale"))
Expand All @@ -102,14 +102,14 @@ test_reg_pred_form <- predict(test_reg_cv_form, testX)

set.seed(849)
test_reg_loo_model <- train(trainX, trainY,
method = modelInfo,
method = "svmLinear2",
trControl = rctrl2,
tuneGrid = data.frame(cost = c(.25, .5, 1)),
preProc = c("center", "scale"))

set.seed(849)
test_reg_none_model <- train(trainX, trainY,
method = modelInfo,
method = "svmLinear2",
trControl = rctrl3,
tuneGrid = test_reg_cv_model$bestTune,
preProc = c("center", "scale"))
Expand Down

0 comments on commit dde4efb

Please sign in to comment.