plot_explainable_sdm: Plot interactive explainable SDM map

Description Usage Arguments Value Examples

View source: R/plot_explainable_sdm.R

Description

Create an interactive map, showing the feature explanations for every observation.

Usage

1
2
plot_explainable_sdm(input_data, processed_plots,
  use_selected_feature = FALSE)

Arguments

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.

Value

Leaflet map

Examples

 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)

boyanangelov/sdmexplain documentation built on Nov. 26, 2019, 2:56 a.m.