prepare_explainable_data: Explain SDM models

Description Usage Arguments Value Examples

View source: R/prepare_explainable_data.R

Description

Prepare data for plotting interactive explainable SDM.

Usage

1
2
3
prepare_explainable_data(test_dataset, mlr_model, coordinates_df,
  selected_feature = "none", randomize = FALSE,
  randomize_proportion = 0.1)

Arguments

test_dataset

A DataFrame containing the test data.

mlr_model

A trained MLR model

coordinates_df

A Dataframe containing the coordinates.

selected_feature

A character indicating if a feature should be extracted for plotting.

randomize

Boolean deciding if a sample of the dataset should be taken

randomize_proportion

Float deciding what proportion of the data should be sampled

Value

A list containing data necessary for the interactive map

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## 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)

## End(Not run)

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