CenterForPeaceAndSecurityStudies / IntroductiontoMachineLearning

Course Materials for Introduction to Machine Learning, Rex W. Douglass 2018
Other
19 stars 9 forks source link

Errors in Day2 Rmd File #4

Open philliplagoc opened 5 years ago

philliplagoc commented 5 years ago

I get two errors in the Day2 Rmd file.

The first occurs at around line 694 with this line of code: plot_predict_interaction(forest, BreastCancer_train[,-c(10)], "Cell.size", "Cl.thickness") which gives me this error: Error in if (as.character(forest$call$formula)[3] == ".") { : missing value where TRUE/FALSE needed

I also get this same error in the next line of code: explain_forest(forest, interactions = TRUE, data = BreastCancer_train)

@rexdouglass @tlscherer

philliplagoc commented 5 years ago

I'm also getting an error from this code: BreastCancer_imputed <- missForest(BreastCancer %>% select(-y), verbose = TRUE)$ximp which gives this error Error in select(., -y) : unused argument (-y)

SOLVED

Instead of select(-y), use dplyr::select(-y).

philliplagoc commented 5 years ago

I am also getting another error here: `glm_cv <- train(x=BreastCancer_train[,-c(10)], y=as.factor(paste0('Outcome',BreastCancer_train$y)), method = "glm", trControl = cctrl1, metric = "ROC"#,

tuneGrid = expand.grid(alpha = 1,lambda = seq(0.001,0.1,by = 0.001) )

                         )`

which causes this error: Error in { : task 1 failed - "factor Mitoses has new levels 6"