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
1a4a7281
Commit
1a4a7281
authored
Apr 17, 2018
by
Guolin Ke
Browse files
fix #1318
parent
90ab5144
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
docs/Parameters.rst
docs/Parameters.rst
+2
-2
src/io/config.cpp
src/io/config.cpp
+1
-1
No files found.
docs/Parameters.rst
View file @
1a4a7281
...
...
@@ -576,9 +576,9 @@ Objective Parameters
Metric Parameters
-----------------
- ``metric``, default=\ ``
None
``, type=multi-enum
- ``metric``, default=\ ``
""
``, type=multi-enum
- if ``
None``
, metric corresponding to specified application will be used
- if ``
""``(empty string or not specific)
, metric corresponding to specified application will be used
- ``l1``, absolute loss, alias=\ ``mean_absolute_error``, ``mae``, ``regression_l1``
...
...
src/io/config.cpp
View file @
1a4a7281
...
...
@@ -91,7 +91,7 @@ void GetMetricType(const std::unordered_map<std::string, std::string>& params, s
metric_types
->
shrink_to_fit
();
}
// add names of objective function if not providing metric
if
(
metric_types
->
empty
())
{
if
(
metric_types
->
empty
()
&&
value
.
size
()
==
0
)
{
if
(
ConfigBase
::
GetString
(
params
,
"objective"
,
&
value
))
{
std
::
transform
(
value
.
begin
(),
value
.
end
(),
value
.
begin
(),
Common
::
tolower
);
metric_types
->
push_back
(
value
);
...
...
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