Finding the Best Model Using Eight Metrics Values
Overview
In statistical modeling, multiple models need to be compared based on certain criteria. The method described here uses eight metrics from 'AllMetrics' package. ‘input_df’ is the data frame (at least two columns for comparison) containing metrics values in different rows of a column (which denotes a particular model’s performance). First five metrics are expected to be minimum and last three metrics are expected to be maximum for a model to be considered good. Firstly, every metric value (among first five) is searched in every columns and minimum values are denoted as ‘MIN’ and other values are denoted as ‘NA’. Secondly, every metric (among last three) is searched in every columns and maximum values are denoted as ‘MAX’ and other values are denoted as ‘NA’. ‘output_df’ contains the similar number of rows (which is 8) and columns (which is number of models to be compared) as of ‘input_df’. Values in ‘output_df’ are corresponding ‘NA’, ‘MIN’ or ‘MAX’. Finally, the column containing minimum number of ‘NA’ values is denoted as the best column. ‘min_NA_col’ gives the name of the best column (model). ‘min_NA_values’ are the corresponding metrics values. ‘BestColumn_metrics’ is the data frame (dimension: 1*8) containing different metrics of the best column (model). ‘best_column_results’ is the final result (a list) containing all of these output elements. In special case, if two columns having equal 'NA', it will be checked among these two column which one is having least 'NA' in first five rows and will be inferred as the best. More details about 'AllMetrics' can be found in Garai (2023) doi:10.13140/RG.2.2.18688.30723.
Install
Health
ERRORexamplesr-oldrel-macos-x86_64, r-release-macos-x86_64
Running examples in ‘CompareMultipleModels-Ex.R’ failed The error most likely occurred in: > ### Name: best_model_finder > ### Title: Finding the Best Model Using Eight Metrics Values > ### Aliases: best_model_finder > > ### ** Examples > > set.seed(123) # for reproducibility > Y <- rnorm(100, 100, 10) > model_1 <-CEEMDANML::carigaan(Y, ratio = 0.8, n_lag = 4) Error in optim(init[mask], armafn, method = optim.method, hessian = TRUE, : non-finite finite-difference value [1] Calls: <Anonymous> -> arima -> optim Execution halted
- ERROR11 OK, 2 ERRORNow
- ERROR12 OK, 2 ERROR2026-03-10
Documentation
- Help pages
- 1
- Examples that run
- 100%1 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 100%
Downloads
Dependencies
Installing CompareMultipleModels adds 100 packages (55 with compiled code, 71 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, data.table 5.7 MB.
Code & Tests
People & History
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 0.1.0Latest2023-04-12 · current release
- RR 4.2.0 released · 2022-04-22
Package metadata
- First published
- 2023-04-12
- Total releases
- 1 / 3 yrs
- License
- GPL-3 OSI
- Download size
- 3.2 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("CompareMultipleModels")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-26, which the citation names so these numbers can be found later. More on citing and the projects behind them.