I am using the glmtree
function from the partykit
package in R.
I would like to know how I can evaluate the models and how I can improve them.
I am growing a big tree (alpha = 0.9
) and pruning with AIC as the criterion.
I am using the AUC (pROC
package) and the results are between 0.62 and 0.79.
fit <- glmtree(fD ~ 1 | Age + fGender + Qualification + fOccupation + SizeWorkplc,
data = newdata, family = "binomial",
minsize = 50, maxdepth = 4, alpha = 0.9, prune = "AIC")
prob <- predict(fit, newdata = newdata, type "response")
newdata$prob <- prob
g <- roc(fD ~ prob, data = newdata)
plot(g)
I am really new on this, so I would really appreciate some help.