'Why is the target variable included in the LIME plot?
I tried to prepare LIME plot to interpret my model but I have an error here. When I generate plot there is one bar for target variable and I don't know why. Can somebody help me please? I want only predictors in graph no target variable (Deaths.Caused in picture).
#inpu$targetVar is user choice target variable
#inpu$predVar are user choice predictors
#train_datas_subset is subdataset of train datas
#test_datas_subset is subdataset of test datas
form <- paste(isolate(input$targetVar), '~', paste(isolate(input$predVar), collapse = '+'))
model <- eval(parse(text = sprintf("train(%s, data = train_datas_subset, method = 'C5.0')", form)))
explainer <- lime(train_datas_subset, model)
explanation <- explain(test_datas_subset[1, ], explainer, n_labels = 1, n_features = length(input$predVar)+1)
output$limePlot <- renderPlot({
plot_features(explanation)
})
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

