Skip to content

CompareMultipleModels

Finding the Best Model Using Eight Metrics Values

v0.1.0 · Apr 12, 2023 · GPL-3

Description

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>.

Downloads

144

Last 30 days

22064th

282

Last 90 days

282

Last year

Trend: +4.4% (30d vs prior 30d)

CRAN Check Status

2 ERROR
12 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 ERROR
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 ERROR
r-release-windows-x86_64 OK
Check details (14 non-OK)
OK r-devel-linux-x86_64-debian-clang

*


            
OK r-devel-linux-x86_64-debian-gcc

*


            
OK r-devel-linux-x86_64-fedora-clang

*


            
OK r-devel-linux-x86_64-fedora-gcc

*


            
OK r-devel-macos-arm64

*


            
OK r-devel-windows-x86_64

*


            
OK r-oldrel-macos-arm64

*


            
ERROR r-oldrel-macos-x86_64

examples

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
OK r-oldrel-windows-x86_64

*


            
OK r-patched-linux-x86_64

*


            
OK r-release-linux-x86_64

*


            
OK r-release-macos-arm64

*


            
ERROR r-release-macos-x86_64

examples

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
OK r-release-windows-x86_64

*


            

Check History

ERROR 12 OK · 0 NOTE · 0 WARNING · 2 ERROR · 0 FAILURE Mar 9, 2026
ERROR r-release-macos-x86_64

examples

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: <Anonymo
ERROR r-oldrel-macos-x86_64

examples

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: <Anonymo

Dependency Network

Dependencies Reverse dependencies CEEMDANML CompareMultipleModels

Version History

new 0.1.0 Mar 9, 2026