plot_model_performance: Plot Model Performance

View source: R/plot_model_performance.R

plot_model_performanceR Documentation

Plot Model Performance

Description

Visualizes model performance metrics produced by compare_models().

Usage

plot_model_performance(comparison)

Arguments

comparison

Output from compare_models().

Details

This plot provides a graphical comparison of competing models using goodness-of-fit statistics.

Typical metrics include:

  • R-squared (R²)

  • Root Mean Squared Error (RMSE)

  • Residual Sum of Squares (RSS)

  • Akaike Information Criterion (AIC)

  • Bayesian Information Criterion (BIC)

The visualization helps identify models that balance goodness of fit and model complexity.

Value

A ggplot2 object.

See Also

compare_models, rank_models, plot_model_rankings

Examples


files <- example_data()

raw_data <- read_ankom(
  files$ankom
)

metadata <- read_metadata(
  files$metadata
)

gp <- process_ankom(
  raw_data,
  metadata,
  headspace_ml = 210,
  temperature_c = 39
)

groot_fit <- fit_groot(
  gp
)

gompertz_fit <- fit_gompertz(
  gp
)

comparison <- compare_models(
  Groot = groot_fit,
  Gompertz = gompertz_fit
)

plot_model_performance(
  comparison
)


rumenGP documentation built on Oct. 2, 2026, 5:09 p.m.