I assume this question has more to do with the back-end operations that I don't understand because this behavior seems odd, at least to me.
When I run a C5.0 model with an (albeit extreme) error matrix of:
error_cost <- matrix(c(0, 1, 15, 0), nrow = 2)
and 10 trials I get 10 iterations.
If I do everything the same and up the trials anywhere between 11 and 100 it stops early at 7 iterations, and the output, while "working", is garbage.
If I change the error matrix to:
error_cost <- matrix(c(0, 1, 4, 0), nrow = 2)
and up the iterations to 100 it iterates 100 times (and the results are really good).
Obviously my problem is in the error cost, but I'm just trying to understand why it causes it to behave this way. And while this is a real problem I'm working on, the error costs and iterations are more an attempt to understand what is happening under the hood.
Thoughts?
Thanks in advance.
Full code:
library(C50)
model_data_train$Donated <- as.factor(model_data_train$Donated)
model_data_test$Donated <- as.factor(model_data_test$Donated)
error_cost <- matrix(c(0, 4, 1, 0), nrow = 2)
dt_model10 <- C5.0(model_data_train[-113], model_data_train$Donated,
trials = 100,
rules = TRUE, costs = error_cost)