model_win_frequency: Model Win Frequency

View source: R/model_win_frequency.R

model_win_frequencyR Documentation

Model Win Frequency

Description

Summarizes how often each model is the best-performing model across treatments.

Usage

model_win_frequency(best_models)

Arguments

best_models

Output from best_model_by_treatment().

Details

Win frequency is calculated from the output of best_model_by_treatment() and reports the number of treatments for which each model achieved the highest overall ranking.

This summary is useful for identifying models that consistently perform well across multiple treatments.

Models with higher win frequencies generally demonstrate greater robustness across a dataset, although treatment-specific performance should also be considered.

Value

A data frame summarizing the number and proportion of treatment-level wins for each model.

See Also

compare_models_by_treatment, rank_models_by_treatment, best_model_by_treatment, compare_models

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_by_treatment(
  Groot = groot_fit,
  Gompertz = gompertz_fit
)

ranking <- rank_models_by_treatment(
  comparison
)

best_models <- best_model_by_treatment(
  ranking
)

model_win_frequency(
  best_models
)


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