get_best_model_results: Extract best model performances

Description Usage Arguments Value Examples

View source: R/get_best_model_results.r

Description

Extract best model performances

Usage

1

Arguments

bmr

A bmr object, result of the benchmark_sdm function.

Value

A dataframe containing the best model results (learner name, optimal iteration number and associated AUC).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Not run: 
# download benchmarking data
benchmarking_data <- get_benchmarking_data("Lynx lynx",
                                           limit = 1500)

# 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)
best_results

## End(Not run)

boyanangelov/sdmbench documentation built on July 9, 2019, 12:01 p.m.