diff --git a/src/program/tree_node.cpp b/src/program/tree_node.cpp index bee16d63..aad1e43e 100644 --- a/src/program/tree_node.cpp +++ b/src/program/tree_node.cpp @@ -39,6 +39,9 @@ string TreeNode::get_tree_model(bool pretty, string offset) const } if (Is(data.node_type)){ + if (data.W == 0.0) // likely it is a boolean (threshold is forced at zero) + return fmt::format("If({})", data.get_feature()) + child_outputs; + return fmt::format("If({}>{:.2f})", data.get_feature(), data.W) + child_outputs; }