mlr-org / mlrCPO

Composable Preprocessing Operators for MLR
Other
37 stars 4 forks source link

lrn2 = cpoImpute(...) %>>% lrn does not have missings property #42

Closed jakob-r closed 6 years ago

jakob-r commented 6 years ago
lrn = makeLearner("classif.randomForest")
lrn2 = cpoImpute(classes = list(numeric = imputeMax(2))) %>>% lrn
getLearnerProperties(lrn2)
# [1] "numerics"      "factors"       "ordered"       "twoclass"      "multiclass"    "prob"          "class.weights" "oobpreds"      "featimp" 
jakob-r commented 6 years ago

Ah okay. I have to use cpoImputeAll. But then cpoImputeMax() should also not add the missing property, which it does.

mb706 commented 6 years ago

The difference between cpoImputeMax and cpoImpute is that cpoImpute does not (generally) impute all columns, while cpoImputeMax does. This behaviour may change when #9 is implemented, when cpoImpute will be able to tell from its parameters whether it imputes all columns or not.

jakob-r commented 6 years ago

Thank's for clearing me up. Makes sense.