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
1e53445e
Unverified
Commit
1e53445e
authored
Jul 12, 2018
by
Guolin Ke
Committed by
GitHub
Jul 12, 2018
Browse files
fix #1504
parent
dae75516
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
src/io/config.cpp
src/io/config.cpp
+7
-9
No files found.
src/io/config.cpp
View file @
1e53445e
...
...
@@ -214,15 +214,13 @@ void Config::CheckParamConflict() {
Log
::
Fatal
(
"Number of classes must be 1 for non-multiclass training"
);
}
}
if
(
is_provide_training_metric
||
!
valid
.
empty
())
{
for
(
std
::
string
metric_type
:
metric
)
{
bool
metric_type_multiclass
=
(
CheckMultiClassObjective
(
metric_type
)
||
metric_type
==
std
::
string
(
"multi_logloss"
)
||
metric_type
==
std
::
string
(
"multi_error"
));
if
((
objective_type_multiclass
&&
!
metric_type_multiclass
)
||
(
!
objective_type_multiclass
&&
metric_type_multiclass
))
{
Log
::
Fatal
(
"Objective and metrics don't match"
);
}
Log
::
Fatal
(
"Multiclass qbjective and metrics don't match"
);
}
}
...
...
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