library(flashlight)
library(ggplot2)
mrIML_rf <- mrIML::mrIML_bird_parasites_RF
fl <- mrFlashlight(
mrIML_rf,
response = "multi",
index = 1
)
# Performance comparison
fl %>%
light_performance(
metrics = list(`ROC AUC` = MetricsWeighted::AUC)
) %>%
plot() +
ylim(0, 1)
# Partial dependence curves
fl %>%
light_profile(data = cbind(mrIML_rf$Data$X, mrIML_rf$Data$Y), "scale.prop.zos") %>%
plot()
# Two-way partial dependence
fl %>%
light_profile2d(c("scale.prop.zos", "Plas")) %>%
plot()
Run the code above in your browser using DataLab