mlr-org / mlr3

mlr3: Machine Learning in R - next generation
https://mlr3.mlr-org.com
GNU Lesser General Public License v3.0
914 stars 84 forks source link

Tests / Checks for flipped factors #943

Open sebffischer opened 1 year ago

sebffischer commented 1 year ago

I can imagine that some learner's don't handle factors with flipped levels perfectly. A proposal would be to add an autotest that checks whether predictions are equivalent irrespective of the underlying factor representation. Then, there could be a learner property that indicates whether the learner can deal with flipped factor levels. In the $predict_newdata() and the $predict() method we could then (depending on whether this property is present) throw an error.

sebffischer commented 11 months ago

Decision: We add it as an autotest (whether a learner can handle it) and then check where we have to fix stuff