Skip to content

Commit

Permalink
forgot to remove modelInfo reference
Browse files Browse the repository at this point in the history
  • Loading branch information
topepo committed Jul 13, 2015
1 parent 3c6bd33 commit 669cc7e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions RegressionTests/Code/bartMachine.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ cctrl3 <- trainControl(method = "none",

set.seed(849)
test_class_cv_model <- train(trainX, trainY,
method = modelInfo,
method = "bartMachine",
trControl = cctrl1,
tuneLength = 2,
verbose = FALSE,
Expand All @@ -27,7 +27,7 @@ test_class_cv_model <- train(trainX, trainY,

set.seed(849)
test_class_cv_form <- train(Class ~ ., data = training,
method = modelInfo,
method = "bartMachine",
trControl = cctrl1,
tuneLength = 2,
verbose = FALSE,
Expand All @@ -39,7 +39,7 @@ 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 = "bartMachine",
trControl = cctrl2,
tuneLength = 2,
verbose = FALSE,
Expand All @@ -48,7 +48,7 @@ test_class_loo_model <- train(trainX, trainY,

set.seed(849)
test_class_none_model <- train(trainX, trainY,
method = modelInfo,
method = "bartMachine",
trControl = cctrl3,
tuneGrid = test_class_cv_model$bestTune,
verbose = FALSE,
Expand Down Expand Up @@ -93,7 +93,7 @@ rctrl3 <- trainControl(method = "none")

set.seed(849)
test_reg_cv_model <- train(trainX, trainY,
method = modelInfo,
method = "bartMachine",
trControl = rctrl1,
tuneLength = 2,
verbose = FALSE,
Expand All @@ -103,7 +103,7 @@ test_reg_pred <- predict(test_reg_cv_model, testX)

set.seed(849)
test_reg_cv_form <- train(y ~ ., data = training,
method = modelInfo,
method = "bartMachine",
trControl = rctrl1,
tuneLength = 2,
verbose = FALSE,
Expand All @@ -114,7 +114,7 @@ test_reg_pred_form <- predict(test_reg_cv_form, testX)

set.seed(849)
test_reg_loo_model <- train(trainX, trainY,
method = modelInfo,
method = "bartMachine",
trControl = rctrl2,
tuneLength = 2,
verbose = FALSE,
Expand All @@ -123,7 +123,7 @@ test_reg_loo_model <- train(trainX, trainY,

set.seed(849)
test_reg_none_model <- train(trainX, trainY,
method = modelInfo,
method = "bartMachine",
trControl = rctrl3,
seed = 1,
verbose = FALSE,
Expand Down
16 changes: 8 additions & 8 deletions RegressionTests/Code/rfRules.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ grid <- expand.grid(mtry = c(1, 3), maxdepth = c(3, 7))

set.seed(849)
test_class_cv_model <- train(trainX, trainY,
method = modelInfo,
method = "rfRules",
trControl = cctrl1,
preProc = c("center", "scale"),
tuneGrid = grid,
ntree = 20)

set.seed(849)
test_class_cv_form <- train(Class ~ ., data = training,
method = modelInfo,
method = "rfRules",
trControl = cctrl1,
preProc = c("center", "scale"),
tuneGrid = grid,
Expand All @@ -46,7 +46,7 @@ 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 = "rfRules",
trControl = cctrl2,
preProc = c("center", "scale"),
tuneGrid = grid,
Expand All @@ -57,7 +57,7 @@ if(!all(levels(trainY) %in% test_levels))

set.seed(849)
test_class_none_model <- train(trainX, trainY,
method = modelInfo,
method = "rfRules",
trControl = cctrl4,
preProc = c("center", "scale"),
tuneGrid = grid[2,],
Expand Down Expand Up @@ -95,7 +95,7 @@ rctrl4 <- trainControl(method = "none", seeds = seeds)

set.seed(849)
test_reg_cv_model <- train(trainX, trainY,
method = modelInfo,
method = "rfRules",
trControl = rctrl1,
preProc = c("center", "scale"),
tuneGrid = grid,
Expand All @@ -104,7 +104,7 @@ test_reg_pred <- predict(test_reg_cv_model, testX)

set.seed(849)
test_reg_cv_form <- train(y ~ ., data = training,
method = modelInfo,
method = "rfRules",
trControl = rctrl1,
preProc = c("center", "scale"),
tuneGrid = grid,
Expand All @@ -113,15 +113,15 @@ test_reg_pred_form <- predict(test_reg_cv_form, testX)

set.seed(849)
test_reg_loo_model <- train(trainX, trainY,
method = modelInfo,
method = "rfRules",
trControl = rctrl2,
preProc = c("center", "scale"),
tuneGrid = grid,
ntree = 20)

set.seed(849)
test_reg_none_model <- train(trainX, trainY,
method = modelInfo,
method = "rfRules",
trControl = rctrl4,
preProc = c("center", "scale"),
tuneGrid = grid[2,],
Expand Down

0 comments on commit 669cc7e

Please sign in to comment.