r - C5.0 number of boosting iterations stops early -
i assume question has more back-end operations don't understand because behavior seems odd, @ least me.
when run c5.0 model (albeit extreme) error matrix of:
error_cost <- matrix(c(0, 1, 15, 0), nrow = 2)
and 10 trials 10 iterations.
if same , trials anywhere between 11 , 100 stops @ 7 iterations, , output, while "working", garbage.
if change error matrix to:
error_cost <- matrix(c(0, 1, 4, 0), nrow = 2)
and iterations 100 iterates 100 times (and results good).
obviously problem in error cost, i'm trying understand why causes behave way. , while real problem i'm working on, error costs , iterations more attempt understand happening under 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)
if read deeper in library documentation there control feature called earlystopping can toggle off:
dt_model10 <- c5.0(model_data_train[-113], model_data_train$donated, trials = 100, rules = true, costs = error_cost, control=c5.0control(earlystopping=false))
as mentioned @kenston choi
Comments
Post a Comment