Interface scorecard::woebin for partykiy::ctree
Usage
woebin_ctree(
y,
x,
namevar = "variable",
count_distr_limit = 0.05,
control = partykit::ctree_control()
)Examples
if(FALSE){
data(germancredit, package = "scorecard")
y <- germancredit$creditability
x <- germancredit$duration.in.month
woebin_ctree(y, x, "duration", count_distr_limit = 0.05)
woebin_ctree(y, x, "duration", count_distr_limit = 0.2)
woebin_ctree(
y,
x,
"duration",
count_distr_limit = 0.05,
control = partykit::ctree_control(alpha = 0.5)
)
x[sample(c(TRUE, FALSE), size = length(x), prob = c(1, 99), replace = TRUE)] <- NA
woebin_ctree(y, x, "duration")
x <- germancredit$purpose
woebin_ctree(y, x, "purpose")
x[sample(c(TRUE, FALSE), size = length(x), prob = c(1, 99), replace = TRUE)] <- NA
woebin_ctree(y, x, "purpose_with_na")
}