Open TuSKan opened 5 years ago
The problem here is that the data appears to contain an empty factor level in the personal_status
column, and that makeClassifTask()
removes that empty factor level:
> levels(getTaskData(task)[["personal_status"]])
[1] "male div/sep" "female div/dep/mar" "male single"
[4] "male mar/wid"
> levels(data[["personal_status"]])
[1] "male div/sep" "female div/dep/mar" "male single"
[4] "male mar/wid" "female single"
This should not crash cpoCollapseFact
and is a bug. The workaround until then is to use cpoFixFactors
:
task %<>>% cpoFixFactors() %>>% cpoCollapseFact(0.1)
Any suggestion ?