Learn R Programming

mrIML (version 2.2.0)

mrPerformancePlot: Plot Model Performance Comparison

Description

Create visualizations to compare the performance of two models based on their performance metrics generated by mrIMLperformance.

Usage

mrPerformancePlot(
  ModelPerf1 = NULL,
  ModelPerf2 = NULL,
  mode = "classification"
)

Value

A list containing:

  • $performance_plot: A box plot of model performance metrics.

  • $performance_diff_plot: A bar plot of the differences in performance metrics.

  • $performance_diff_df: A data frame in wide format containing model performance metrics and their differences.

Arguments

ModelPerf1, ModelPerf2

Two data frames of model performance metrics to compare. The data frames are created by mrIMLperformance, see Examples.

mode

A character string describing the mode of the models. Should be either "regression" or "classification". The default is "classification".

Examples

Run this code
MR_perf_rf <-  mrIML::mrIML_bird_parasites_RF %>%
  mrIMLperformance()
MR_perf_lm <- mrIML::mrIML_bird_parasites_LM%>%
  mrIMLperformance()

perf_comp <- mrPerformancePlot(
  ModelPerf1 = MR_perf_rf,
  ModelPerf2 = MR_perf_lm
)

Run the code above in your browser using DataLab