Unverified Commit a107c907 authored by Lipson's avatar Lipson Committed by GitHub
Browse files

fix precision lost in tree's ToIfElse (#5187)

parent 0fb09e77
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment