Closed gbiele closed 2 years ago
Finally figured it out following the pattern desribed here.
rr
:
autotuner = rr$learners[[1]]
graphlearner = autotuner$learner
graphlearner
:
xgboostlearner = graphlearner$graph$pipeops$classif.xgboost$learner
xgboostlearner
with the fitted model:
xgboostlearner$state = graphlearner$model$classif.xgboost
xgboostlearner$importance()
Hi, thanks for all the work on the ml3 package eco system!
I am trying to calculate variable importance as described here after fitting an xgboost model along these lines:
This call returns a "ResampleResult" R6 object. But I am unable to figure out how to calculate variables importance as described here or to find the
LearnerClassifXgboost
object in order to use the importance method as described here.I also found this stackoverflow question & answer and based on it unsucessfully tried to calculate variable importance from an autotuner object in the ResampleResult
rr
.So my question is: How can I calculate variable importance given a
ResampleResult
?