mlr3pipelines icon indicating copy to clipboard operation
mlr3pipelines copied to clipboard

po("threshold") cannot set 'prob'

Open loveyu3317 opened this issue 3 years ago • 2 comments

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 

loveyu3317 avatar Feb 12 '22 17:02 loveyu3317

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.

loveyu3317 avatar Feb 12 '22 17:02 loveyu3317