From 24298edf21b85ccc17e7a070f982ab6b5946f282 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 11 Dec 2020 05:51:01 +0000 Subject: [PATCH] clarify warning about small target values with MAPE (#3615) --- src/objective/regression_objective.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/objective/regression_objective.hpp b/src/objective/regression_objective.hpp index d7660a754991..bd25ec4e5029 100644 --- a/src/objective/regression_objective.hpp +++ b/src/objective/regression_objective.hpp @@ -587,7 +587,9 @@ class RegressionMAPELOSS : public RegressionL1loss { RegressionL2loss::Init(metadata, num_data); for (data_size_t i = 0; i < num_data_; ++i) { if (std::fabs(label_[i]) < 1) { - Log::Warning("Met 'abs(label) < 1', will convert them to '1' in MAPE objective and metric"); + Log::Warning( + "Some label values are < 1 in absolute value. MAPE is unstable with such values, " + "so LightGBM rounds them to 1.0 when calculating MAPE."); break; } }