Description Usage Arguments Value Examples
View source: R/prepare_explainable_data.R
Prepare data for plotting interactive explainable SDM.
1 2 3 | prepare_explainable_data(test_dataset, mlr_model, coordinates_df,
selected_feature = "none", randomize = FALSE,
randomize_proportion = 0.1)
|
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 |
A list containing data necessary for the interactive map
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.