I like to use the DALEX package in mlr3 and I tried to work with an example similar to chapter 9.2.4 in the mlr3 book (https://mlr3book.mlr-org.com/interpretation.html).
So my code looks like this
# the "learner_analyzed" is a classification forest
learner_analyzed$train(taskdata$task)
learner_exp = explain_mlr3(learner_analyzed,
label = "Ranger CF",
colorize = FALSE)
I do not specify data and y as the help function in R studio tells me that this is not necessary for a fitted learner.
It seems though, that I cannot get the explanation to work and that it does not recognize I have a classification instead of a regression task. I get the following message with warnings:
Preparation of a new explainer is initiated -> model label : Ranger CF -> no data avaliable! ( WARNING ) -> target variable : not specified! ( WARNING ) -> predict function : yhat.GraphLearner will be used ( default ) -> predicted values : No value for predict function target column. ( default ) -> model_info : package mlr3 , ver. 0.13.0 , task classification ( default ) -> model_info : Model info detected classification task but 'y' is a NULL . ( WARNING ) -> model_info : By deafult classification tasks supports only numercical 'y' parameter. -> model_info : Consider changing to numerical vector with 0 and 1 values. -> model_info : Otherwise I will not be able to calculate residuals or loss function. -> residual function : difference between y and yhat ( default ) A new explainer has been created!
What can I do here? I did not find a hint neither in the book not in the help function.