tidy_perf_data: Tidy the performance dataframe

Description Usage Arguments Value Author(s) Examples

View source: R/plot.R

Description

Used by plot_model_performance().

Usage

1
tidy_perf_data(performance_df)

Arguments

performance_df

dataframe of performance results from multiple calls to run_ml()

Value

Tidy dataframe with model performance metrics.

Author(s)

Begüm Topçuoglu, topcuoglu.begum@gmail.com

Kelly Sovacool, sovacool@umich.edu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
# call `run_ml()` multiple times with different seeds
results_lst <- lapply(seq(100, 104), function(seed) {
  run_ml(otu_small, "glmnet", seed = seed)
})
# extract and combine the performance results
perf_df <- lapply(results_lst, function(result) {
  result[["performance"]]
}) %>%
  dplyr::bind_rows()
# make it pretty!
tidy_perf_data(perf_df)

## End(Not run)

SchlossLab/mikropml documentation built on Nov. 25, 2021, 1:13 p.m.