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
091b4139
Commit
091b4139
authored
Mar 24, 2017
by
Guolin Ke
Browse files
don't use "ConvertToRawScore" for self-defined objective function.
parent
76990797
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
src/boosting/gbdt.cpp
src/boosting/gbdt.cpp
+3
-1
No files found.
src/boosting/gbdt.cpp
View file @
091b4139
...
...
@@ -314,7 +314,9 @@ bool GBDT::TrainOneIter(const score_t* gradient, const score_t* hessian, bool is
for
(
int
i
=
0
;
i
<
num_class_
;
++
i
)
{
init_scores
[
i
]
=
sum_per_class
[
i
]
/
num_data_
;
}
init_scores
=
object_function_
->
ConvertToRawScore
(
init_scores
);
if
(
object_function_
!=
nullptr
)
{
init_scores
=
object_function_
->
ConvertToRawScore
(
init_scores
);
}
for
(
int
curr_class
=
0
;
curr_class
<
num_class_
;
++
curr_class
)
{
std
::
unique_ptr
<
Tree
>
new_tree
(
new
Tree
(
2
));
new_tree
->
Split
(
0
,
0
,
BinType
::
NumericalBin
,
0
,
0
,
0
,
init_scores
[
curr_class
],
init_scores
[
curr_class
],
0
,
num_data_
,
1
);
...
...
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