Slide 31
Slide 31 text
LIME (R)
• αϯϓϧ
library(caret)
library(lime)
model <- train(iris[-5], iris[[5]], method = 'rf')
explainer <- lime(iris[-5], model)
explanations <- explain(iris[1, -5], explainer, n_labels = 1,
n_features = 2)
explanations
model_type case label label_prob model_r2 model_intercept
1 classification 1 setosa 1 0.3776584 0.2544468
2 classification 1 setosa 1 0.3776584 0.2544468
model_prediction feature feature_value feature_weight feature_desc
1 0.7113922 Sepal.Width 3.5 0.02101138 3.3 < Sepal.Width
2 0.7113922 Petal.Length 1.4 0.43593404 Petal.Length <= 1.60
data prediction
1 5.1, 3.5, 1.4, 0.2 1, 0, 0
2 5.1, 3.5, 1.4, 0.2 1, 0, 0
ֶशثΛ܇࿅
ղऍ༻ͷΫϥεΛ࡞
ղऍΛग़ྗ