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
0701a32d
Unverified
Commit
0701a32d
authored
Jun 25, 2021
by
Arcs
Committed by
GitHub
Jun 24, 2021
Browse files
sync for init score of binary objective function (#4332)
Co-authored-by:
未闲
<
weixian.lzf@antfin.com
>
parent
113b44d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
src/objective/binary_objective.hpp
src/objective/binary_objective.hpp
+4
-0
No files found.
src/objective/binary_objective.hpp
View file @
0701a32d
...
@@ -152,6 +152,10 @@ class BinaryLogloss: public ObjectiveFunction {
...
@@ -152,6 +152,10 @@ class BinaryLogloss: public ObjectiveFunction {
suml
+=
is_pos_
(
label_
[
i
]);
suml
+=
is_pos_
(
label_
[
i
]);
}
}
}
}
if
(
Network
::
num_machines
()
>
1
)
{
suml
=
Network
::
GlobalSyncUpBySum
(
suml
);
sumw
=
Network
::
GlobalSyncUpBySum
(
sumw
);
}
double
pavg
=
suml
/
sumw
;
double
pavg
=
suml
/
sumw
;
pavg
=
std
::
min
(
pavg
,
1.0
-
kEpsilon
);
pavg
=
std
::
min
(
pavg
,
1.0
-
kEpsilon
);
pavg
=
std
::
max
<
double
>
(
pavg
,
kEpsilon
);
pavg
=
std
::
max
<
double
>
(
pavg
,
kEpsilon
);
...
...
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