在 multi-class randomforest 中查看每个 class 的 vip?

See vip for each class in multi-class randomforest?

在这个使用randomforest模型的multi-class class化示例中,作者创建了一个vip图表,如下所示。有没有办法查看哪些变量正在影响模型以预测每个响应类别?例如,我希望能够看到“x”变量正在推动某些东西class化为“x”火山类型(响应类别)。

https://juliasilge.com/blog/multinomial-volcano-eruptions/

library(vip)

rf_spec %>%
  set_engine("ranger", importance = "permutation") %>%
  fit(
    volcano_type ~ .,
    data = juice(volcano_prep) %>%
      select(-volcano_number) %>%
      janitor::clean_names()
  ) %>%
  vip(geom = "point")

使用 explain_tidymodels 创建了解释器,然后使用 DALEX vignette

https://www.tmwr.org/explain.html https://modeloriented.github.io/DALEX/articles/multilabel_classification.html