mlr3pipelines
mlr3pipelines copied to clipboard
po("threshold") cannot set 'prob'
I want to tune threshold by classif.auc. But when I run the following codes, it cannot set predict_type = "prob".
gr = lrn("classif.rpart", predict_type = "prob") %>>% po("threshold")
l = as_learner(gr)
l$predict_type
And when I run :
learner$predict_type = 'prob'
it says :
Error in .__PipeOpThreshold__predict_type(self = self, private = private, :
$predict_type for PipeOpThreshold is read-only.