Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segfault in R3.4.3 on Mac #852

Closed
vnijs opened this issue Mar 7, 2018 · 1 comment
Closed

segfault in R3.4.3 on Mac #852

vnijs opened this issue Mar 7, 2018 · 1 comment

Comments

@vnijs
Copy link

vnijs commented Mar 7, 2018

Myself and my students using macOS are not able to use caret with metric = "ROC" as it produces a segfault. Example code shown below. I have been able to reproduce on multiple different datasets and estimation algorithms. The segfault message refers to ModelMetrics_auc. I posted an issue for ModelMetrics but have not had a response yet. Do you have suggestions for a work-around?

See original issue: JackStat/ModelMetrics#23

## loading libraries
library(ranger)
library(caret)

dat <- mtcars
dat$vs <- factor(ifelse(dat$vs == 1, "yes", "no"))
sapply(dat, class)

ranger(
  vs ~ ., 
  data = dat, 
  probability = TRUE, 
  num.trees = 50, 
  mtry = 3
)

set.seed(1234)
grid <- expand.grid(mtry = 3:4, splitrule = "gini", min.node.size = 1)
ctrl <- trainControl(
  method = "cv", 
  number = 5, 
  classProbs = TRUE, 
  summaryFunction = twoClassSummary, 
  verboseIter = TRUE
)

result <- train(
  vs ~ ., 
  data = dat,
  method = "ranger", 
  trControl = ctrl, 
  tuneGrid = grid, 
  metric = "ROC", 
  verbose = FALSE
)
@topepo
Copy link
Owner

topepo commented Mar 8, 2018

Please don't open duplicate issues. I'll take a look at the other one.

@topepo topepo closed this as completed Mar 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants