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
84a7486f
Commit
84a7486f
authored
Oct 21, 2016
by
Qiwei Ye
Browse files
build passed. adding optional logger #26
parent
b752170b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
src/boosting/gbdt.cpp
src/boosting/gbdt.cpp
+1
-1
src/metric/binary_metric.hpp
src/metric/binary_metric.hpp
+1
-1
No files found.
src/boosting/gbdt.cpp
View file @
84a7486f
...
@@ -208,7 +208,7 @@ void GBDT::Train() {
...
@@ -208,7 +208,7 @@ void GBDT::Train() {
std
::
milli
>
(
end_time
-
start_time
)
*
1e-3
,
iter
+
1
);
std
::
milli
>
(
end_time
-
start_time
)
*
1e-3
,
iter
+
1
);
if
(
is_early_stopping
)
{
if
(
is_early_stopping
)
{
// close file with an early-stopping message
// close file with an early-stopping message
Log
::
Stdout
(
"
e
arly stopping at iteration %d, the best iteration round is %d"
,
iter
+
1
,
iter
+
1
-
early_stopping_round_
);
Log
::
Info
(
"
E
arly stopping at iteration %d, the best iteration round is %d
\d
"
,
iter
+
1
,
iter
+
1
-
early_stopping_round_
);
fclose
(
output_model_file
);
fclose
(
output_model_file
);
return
;
return
;
}
}
...
...
src/metric/binary_metric.hpp
View file @
84a7486f
...
@@ -230,7 +230,7 @@ public:
...
@@ -230,7 +230,7 @@ public:
auc
=
accum
/
(
sum_pos
*
(
sum_weights_
-
sum_pos
));
auc
=
accum
/
(
sum_pos
*
(
sum_weights_
-
sum_pos
));
}
}
if
(
output_freq_
>
0
&&
iter
%
output_freq_
==
0
){
if
(
output_freq_
>
0
&&
iter
%
output_freq_
==
0
){
Log
::
Info
(
"Iteration:%d, %s's %s: %f
\n
"
,
iter
,
name
,
"auc"
,
loss
);
Log
::
Info
(
"Iteration:%d, %s's %s: %f
\n
"
,
iter
,
name
,
"auc"
,
auc
);
}
}
return
auc
;
return
auc
;
}
}
...
...
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