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
9ef85fd8
Commit
9ef85fd8
authored
Nov 23, 2018
by
Dmitry Khominich
Committed by
Nikita Titov
Nov 23, 2018
Browse files
add average_output & objective fields to JSON format (#1850)
parent
d21a0e39
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
src/boosting/gbdt_model_text.cpp
src/boosting/gbdt_model_text.cpp
+4
-0
No files found.
src/boosting/gbdt_model_text.cpp
View file @
9ef85fd8
...
...
@@ -22,6 +22,10 @@ std::string GBDT::DumpModel(int start_iteration, int num_iteration) const {
str_buf
<<
"
\"
num_tree_per_iteration
\"
:"
<<
num_tree_per_iteration_
<<
","
<<
'\n'
;
str_buf
<<
"
\"
label_index
\"
:"
<<
label_idx_
<<
","
<<
'\n'
;
str_buf
<<
"
\"
max_feature_idx
\"
:"
<<
max_feature_idx_
<<
","
<<
'\n'
;
str_buf
<<
"
\"
average_output
\"
:"
<<
(
average_output_
?
"true"
:
"false"
)
<<
",
\n
"
;
if
(
objective_function_
!=
nullptr
)
{
str_buf
<<
"
\"
objective
\"
:
\"
"
<<
objective_function_
->
ToString
()
<<
"
\"
,
\n
"
;
}
str_buf
<<
"
\"
feature_names
\"
:[
\"
"
<<
Common
::
Join
(
feature_names_
,
"
\"
,
\"
"
)
<<
"
\"
],"
...
...
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