From ecf5dd2dd072663af2afd0cbdbc24d7ee15a11c5 Mon Sep 17 00:00:00 2001 From: jgabry Date: Fri, 1 Sep 2023 10:31:56 -0600 Subject: [PATCH 1/2] improve Pareto k warning message --- src/stan/services/pathfinder/psis.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/stan/services/pathfinder/psis.hpp b/src/stan/services/pathfinder/psis.hpp index cb52c47f78..7288e10233 100644 --- a/src/stan/services/pathfinder/psis.hpp +++ b/src/stan/services/pathfinder/psis.hpp @@ -262,8 +262,9 @@ inline Eigen::Array psis_weights( } if (smoothed.second > 0.7) { logger.warn(std::string("Pareto k value (") + - std::to_string(smoothed.second) + ") is greater than 0.7 which often" - " indicates model" " misspecification."); + std::to_string(smoothed.second) + ") is greater than 0.7 which may" + " indicate a poor approximation of the target distribution" + " or model misspecification."); } } } From d2d1fa606b1060309c4d635ead960e321d67173c Mon Sep 17 00:00:00 2001 From: jgabry Date: Fri, 1 Sep 2023 13:41:23 -0600 Subject: [PATCH 2/2] update message based on feedback --- src/stan/services/pathfinder/psis.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/stan/services/pathfinder/psis.hpp b/src/stan/services/pathfinder/psis.hpp index 7288e10233..7a13a80726 100644 --- a/src/stan/services/pathfinder/psis.hpp +++ b/src/stan/services/pathfinder/psis.hpp @@ -262,9 +262,9 @@ inline Eigen::Array psis_weights( } if (smoothed.second > 0.7) { logger.warn(std::string("Pareto k value (") + - std::to_string(smoothed.second) + ") is greater than 0.7 which may" - " indicate a poor approximation of the target distribution" - " or model misspecification."); + std::to_string(smoothed.second) + ") is greater than 0.7." + " Importance resampling was not able to improve the approximation," + " which may indicate that the approximation itself is poor."); } } }