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
8fd7e185
Commit
8fd7e185
authored
Apr 27, 2017
by
wxchan
Committed by
Guolin Ke
Apr 27, 2017
Browse files
fix dump tree (#465)
parent
567f63ec
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
src/io/tree.cpp
src/io/tree.cpp
+5
-1
No files found.
src/io/tree.cpp
View file @
8fd7e185
...
...
@@ -329,7 +329,11 @@ std::string Tree::ToJSON() {
str_buf
<<
"
\"
num_leaves
\"
:"
<<
num_leaves_
<<
","
<<
std
::
endl
;
str_buf
<<
"
\"
shrinkage
\"
:"
<<
shrinkage_
<<
","
<<
std
::
endl
;
str_buf
<<
"
\"
has_categorical
\"
:"
<<
(
has_categorical_
?
1
:
0
)
<<
","
<<
std
::
endl
;
if
(
num_leaves_
==
1
)
{
str_buf
<<
"
\"
tree_structure
\"
:"
<<
NodeToJSON
(
-
1
)
<<
std
::
endl
;
}
else
{
str_buf
<<
"
\"
tree_structure
\"
:"
<<
NodeToJSON
(
0
)
<<
std
::
endl
;
}
return
str_buf
.
str
();
}
...
...
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