Description Usage Arguments Value Examples
View source: R/plot_explainable_sdm.R
Create an interactive map, showing the feature explanations for every observation.
1 2 | plot_explainable_sdm(input_data, processed_plots,
use_selected_feature = FALSE)
|
input_data |
A DataFrame containing the lime explanations and data point coordinates. |
processed_plots |
A list of plots processed for leaflet map. |
use_selected_feature |
A logical indicating if a feature is extracted for plotting. |
Leaflet map
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
# build and train a machine learning model
task <- makeClassifTask(id = "model", data = data.train, target = "label")
lrn <- makeLearner("classif.lda", predict.type = "prob")
mod <- train(lrn, task)
# prepare explainable data
explainable_data <- prepare_explainable_data(data.test, mod, coordinates.df)
# process lime plots to make them suitable for leaflet
processed_plots <- process_lime_plots(explainable_data$explanation)
# plot the interactive leaflet map
plot_explainable_sdm(explainable_data$processed_data, processed_plots)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.