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
76990797
Commit
76990797
authored
Mar 24, 2017
by
Guolin Ke
Browse files
fix the average label for binary classification.
parent
7b4ead1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
src/boosting/gbdt.cpp
src/boosting/gbdt.cpp
+5
-1
No files found.
src/boosting/gbdt.cpp
View file @
76990797
...
...
@@ -301,10 +301,14 @@ bool GBDT::TrainOneIter(const score_t* gradient, const score_t* hessian, bool is
for
(
data_size_t
i
=
0
;
i
<
num_data_
;
++
i
)
{
sum_per_class
[
static_cast
<
int
>
(
label
[
i
])]
+=
1.0
f
;
}
}
else
{
}
else
if
(
sigmoid_
<
0.0
f
)
{
for
(
data_size_t
i
=
0
;
i
<
num_data_
;
++
i
)
{
sum_per_class
[
0
]
+=
label
[
i
];
}
}
else
{
for
(
data_size_t
i
=
0
;
i
<
num_data_
;
++
i
)
{
sum_per_class
[
0
]
+=
label
[
i
]
>
0
;
}
}
std
::
vector
<
double
>
init_scores
(
num_class_
);
for
(
int
i
=
0
;
i
<
num_class_
;
++
i
)
{
...
...
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