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
1e2013a3
Unverified
Commit
1e2013a3
authored
Jul 07, 2020
by
Belinda Trotta
Committed by
GitHub
Jul 07, 2020
Browse files
Fix integer overflow in auc_mu. (#3209)
parent
d8bc0fc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/metric/multiclass_metric.hpp
src/metric/multiclass_metric.hpp
+2
-2
No files found.
src/metric/multiclass_metric.hpp
View file @
1e2013a3
...
@@ -286,10 +286,10 @@ class AucMuMetric : public Metric {
...
@@ -286,10 +286,10 @@ class AucMuMetric : public Metric {
double
ans
=
0
;
double
ans
=
0
;
for
(
int
i
=
0
;
i
<
num_class_
;
++
i
)
{
for
(
int
i
=
0
;
i
<
num_class_
;
++
i
)
{
for
(
int
j
=
i
+
1
;
j
<
num_class_
;
++
j
)
{
for
(
int
j
=
i
+
1
;
j
<
num_class_
;
++
j
)
{
ans
+=
S
[
i
][
j
]
/
(
class_sizes
[
i
]
*
class_sizes
[
j
]
)
;
ans
+=
(
S
[
i
][
j
]
/
class_sizes
[
i
]
)
/
class_sizes
[
j
];
}
}
}
}
ans
=
2
*
ans
/
(
num_class_
*
(
num_class_
-
1
)
)
;
ans
=
(
2
*
ans
/
num_class_
)
/
(
num_class_
-
1
);
return
std
::
vector
<
double
>
(
1
,
ans
);
return
std
::
vector
<
double
>
(
1
,
ans
);
}
}
...
...
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