0

I wonder if something is going on with my syntax or with caret here? I'm using the caret package in R Version 4.2.3 to build a boosted tree model using C5.0. I'm consistently getting the same type of warnings: R Screenshot

I originally thought that this was due to something having to do with my data, but I tried using the sample data and code in the vignette with caret and ran into the same warnings.

library(modeldata)
library(caret)
library(C50)
library(tidyverse)

data(credit_data)
vars <- c("Home", "Seniority")
set.seed(2411)
in_train <- sample(1:nrow(credit_data), size = 3000)
train_data <- credit_data[ in_train,] %>%
    filter(!is.na(Seniority)) %>%
    filter(!is.na(Home)) %>%
    filter(!is.na(Status))
 
#Using C50
C5.0(Status ~ Home + Seniority, data = train_data)
#Using Caret
train(Status ~ Home + Seniority, data = train_data, method = "C5.0")

The train function in caret throws the warnings. The C5.0 function from C50 does not. Is there something wrong with caret or my syntax here?

Dan
  • 133
  • 7
  • 1
    It throws warnings but what does it return? – IRTFM Jul 12 '23 at 18:08
  • normal output...so maybe it's a problem with my data? When I run the code with my own data, with specifications for trControl , tuneGrid, and metric = "ROC", I get the same type of warnings. calling the model object in the command line shows that the ROC values all = 0.5 for every trial; all of the Sens values are 0 and all of the Spec values are 1. Not sure what's happening. – Dan Jul 12 '23 at 19:08
  • Yes, I understand that the question has changed and I'll work on a new post with new sample data. I'm familiar with the "rule" and followed it on the original post, so there's no cause to be rude, which is also a rule here. – Dan Jul 13 '23 at 13:55
  • You know some of the conventions. Why not learn the one about not posting with images of code or output? And including MCVE? – IRTFM Jul 16 '23 at 02:49

0 Answers0