Learn R Programming

mikropml (version 1.6.1)

tidy_perf_data: Tidy the performance dataframe

Description

Used by plot_model_performance().

Usage

tidy_perf_data(performance_df)

Value

Tidy dataframe with model performance metrics.

Arguments

performance_df

dataframe of performance results from multiple calls to run_ml()

Author

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

Kelly Sovacool, sovacool@umich.edu

Examples

Run this code
if (FALSE) {
# 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)
}

Run the code above in your browser using DataLab