Description Usage Arguments Value Examples
Plot SDM map
1 2 | plot_sdm_map(raster_data, bmr_models, model_id, model_iteration,
map_type = "static")
|
raster_data |
A raster dataset containing the occurrence data. |
bmr_models |
A list of models extracted from the benchmarking bmr object. |
model_id |
A character string indicating the model id of interest. |
model_iteration |
A numeric value indicating the model iteration of interest. |
map_type |
A logical indicating if the map should be static or interactive. |
An interactive leaflet map, showing the species distribution.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ## Not run:
# download benchmarking data
benchmarking_data <- get_benchmarking_data("Lynx lynx",
limit = 1500,
climate_resolution = 10)
# create a list of algorithms to compare
learners <- list(mlr::makeLearner("classif.randomForest",
predict.type = "prob"),
mlr::makeLearner("classif.logreg",
predict.type = "prob"))
# run the model benchmarking process
bmr <- benchmark_sdm(benchmarking_data$df_data,
learners = learners,
dataset_type = "default",
sample = FALSE)
# get best model results
# you should obtain a dataframe containing the highest performing (by AUC)
# algorithm name, iteration and associated AUC
best_results <- get_best_model_results(bmr)
# plot the SDM map of the best performing model
# change the map_type argument if you want a dynamic leaflet map
plot_sdm_map(raster_data = benchmarking_data$raster_data$climate_variables,
bmr_models = bmr$learners,
model_id = best_results$learner.id[1],
model_iteration = best_results$iter[1],
map_type = "static")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.