From 41a9f310116e88fb544e035d6c1e3e6dec694328 Mon Sep 17 00:00:00 2001 From: Carlos Delgado Date: Fri, 26 Feb 2021 17:37:25 +0100 Subject: [PATCH 1/2] fixed bug with the dimensions when method==rpc-based, apply_to==sign, cross_validation==TRUE and the correlation is not significant --- R/CST_Calibration.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/CST_Calibration.R b/R/CST_Calibration.R index 58ef7207..b9e9f034 100644 --- a/R/CST_Calibration.R +++ b/R/CST_Calibration.R @@ -72,7 +72,7 @@ CST_Calibration <- function(exp, obs, cal.method = "mse_min", #' #'@author VerĂ³nica Torralba, \email{veronica.torralba@bsc.es} #'@author Bert Van Schaeybroeck, \email{bertvs@meteo.be} -#'@description Four types of member-by-member bias correction can be performed. The \code{"bias"} method corrects the bias only, the \code{"evmos"} method applies a variance inflation technique to ensure the correction of the bias and the correspondence of variance between forecast and observation (Van Schaeybroeck and Vannitsem, 2011). The ensemble calibration methods \code{"mse_min"} and \code{"crps_min"} correct the bias, the overall forecast variance and the ensemble spread as described in Doblas-Reyes et al. (2005) and Van Schaeybroeck and Vannitsem (2015), respectively. While the \code{"mse_min"} method minimizes a constrained mean-squared error using three parameters, the \code{"crps_min"} method features four parameters and minimizes the Continuous Ranked Probability Score (CRPS). The \code{"rpc-based"} method adjusts the forecast variance ensuring that the ratio of predictable components (RPC) is equal to one, as in Eade et al. (2014). +#'@description Five types of member-by-member bias correction can be performed. The \code{"bias"} method corrects the bias only, the \code{"evmos"} method applies a variance inflation technique to ensure the correction of the bias and the correspondence of variance between forecast and observation (Van Schaeybroeck and Vannitsem, 2011). The ensemble calibration methods \code{"mse_min"} and \code{"crps_min"} correct the bias, the overall forecast variance and the ensemble spread as described in Doblas-Reyes et al. (2005) and Van Schaeybroeck and Vannitsem (2015), respectively. While the \code{"mse_min"} method minimizes a constrained mean-squared error using three parameters, the \code{"crps_min"} method features four parameters and minimizes the Continuous Ranked Probability Score (CRPS). The \code{"rpc-based"} method adjusts the forecast variance ensuring that the ratio of predictable components (RPC) is equal to one, as in Eade et al. (2014). #'@description Both in-sample or our out-of-sample (leave-one-out cross validation) calibration are possible. #'@references Doblas-Reyes F.J, Hagedorn R, Palmer T.N. The rationale behind the success of multi-model ensembles in seasonal forecasting-II calibration and combination. Tellus A. 2005;57:234-252. doi:10.1111/j.1600-0870.2005.00104.x #'@references Eade, R., Smith, D., Scaife, A., Wallace, E., Dunstone, N., Hermanson, L., & Robinson, N. (2014). Do seasonal-to-decadal climate predictions underestimate the predictability of the read world? Geophysical Research Letters, 41(15), 5620-5628. doi: 10.1002/2014GL061146 @@ -314,7 +314,7 @@ Calibration <- function(exp, obs, cal.method = "mse_min", order = names(dims.fc)) dim(var.cor.fc) <- dims.fc } else { ## no significant -> replacing with observed climatology - var.cor.fc[ , eval.dexes] <- array(data = mean(obs.tr, na.rm = na.rm), dim = dim(fc.tr)) + var.cor.fc[ , eval.dexes] <- array(data = mean(obs.tr, na.rm = na.rm), dim = dim(fc.ev)) } } else { stop("unknown calibration method: ",cal.method) -- GitLab From 2aefaba8eebd22cf982eed2a1957674f7ecdd265 Mon Sep 17 00:00:00 2001 From: nperez Date: Tue, 25 May 2021 17:42:29 +0200 Subject: [PATCH 2/2] Update NEWS --- NEWS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index 6dbf7005..60d119cf 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,8 @@ - Fixes: + Calibration retains correlation absolute value + + Calibration fixed when cal.methodi == rpc-based, apply_to == sign, + eval.method == 'leave-one-out' and the correlation is not significant ### CSTools 4.0.0 **Submission date to CRAN: XX-12-2020** -- GitLab