From fae1ac1f9a878879960722e8b3d72d45a0340b94 Mon Sep 17 00:00:00 2001 From: Cuong Duong Date: Wed, 3 Mar 2021 03:30:23 +1100 Subject: [PATCH] add mdape and smape to performance metrics tests (#1804) --- R/tests/testthat/test_diagnostics.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/tests/testthat/test_diagnostics.R b/R/tests/testthat/test_diagnostics.R index 465a89a..a594296 100644 --- a/R/tests/testthat/test_diagnostics.R +++ b/R/tests/testthat/test_diagnostics.R @@ -140,7 +140,7 @@ test_that("performance_metrics", { df_none <- performance_metrics(df_cv, rolling_window = -1) expect_true(all( sort(colnames(df_none)) - == sort(c('horizon', 'coverage', 'mae', 'mape', 'mse', 'rmse')) + == sort(c('horizon', 'mse', 'rmse', 'mae', 'mape', 'mdape', 'smape', 'coverage')) )) expect_equal(nrow(df_none), 16) # Aggregation level 0 @@ -173,7 +173,7 @@ test_that("performance_metrics", { # List of metrics containing non valid metrics expect_error( performance_metrics(df_cv, metrics = c('mse', 'error_metric')), - 'Valid values for metrics are: mse, rmse, mae, mape, coverage' + 'Valid values for metrics are: mse, rmse, mae, mape, mdape, smape, coverage' ) })