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
a107c907
"tests/vscode:/vscode.git/clone" did not exist on "7d1276ad49fc8c07dfdf46f3eaf1863fe1cab3b3"
Unverified
Commit
a107c907
authored
May 02, 2022
by
Lipson
Committed by
GitHub
May 01, 2022
Browse files
fix precision lost in tree's ToIfElse (#5187)
parent
0fb09e77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
src/io/tree.cpp
src/io/tree.cpp
+1
-0
No files found.
src/io/tree.cpp
View file @
a107c907
...
...
@@ -524,6 +524,7 @@ std::string Tree::NodeToJSON(int index) const {
std
::
string
Tree
::
NumericalDecisionIfElse
(
int
node
)
const
{
std
::
stringstream
str_buf
;
Common
::
C_stringstream
(
str_buf
);
str_buf
<<
std
::
setprecision
(
std
::
numeric_limits
<
double
>::
digits10
+
2
);
uint8_t
missing_type
=
GetMissingType
(
decision_type_
[
node
]);
bool
default_left
=
GetDecisionType
(
decision_type_
[
node
],
kDefaultLeftMask
);
if
(
missing_type
==
MissingType
::
None
...
...
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