Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
24298edf
Unverified
Commit
24298edf
authored
Dec 11, 2020
by
James Lamb
Committed by
GitHub
Dec 10, 2020
Browse files
clarify warning about small target values with MAPE (#3615)
parent
6320f1df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
src/objective/regression_objective.hpp
src/objective/regression_objective.hpp
+3
-1
No files found.
src/objective/regression_objective.hpp
View file @
24298edf
...
...
@@ -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
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment