diff --git a/src/tree/tree_model.cc b/src/tree/tree_model.cc index a8af7c51ec3b..94e3bc97abb2 100644 --- a/src/tree/tree_model.cc +++ b/src/tree/tree_model.cc @@ -315,7 +315,7 @@ class TextGenerator : public TreeGenerator { auto cats = GetSplitCategories(tree, nid); std::string cats_str = PrintCatsAsSet(cats); static std::string const kNodeTemplate = - "{tabs}{nid}:[{fname}={cond}] yes={right},no={left},missing={missing}"; + "{tabs}{nid}:[{fname}:{cond}] yes={right},no={left},missing={missing}"; std::string const result = SplitNodeImpl(tree, nid, kNodeTemplate, cats_str, depth); return result; @@ -662,7 +662,7 @@ class GraphvizGenerator : public TreeGenerator { std::string Categorical(RegTree const& tree, int32_t nid, uint32_t) const override { static std::string const kLabelTemplate = - " {nid} [ label=\"{fname}={cond}\" {params}]\n"; + " {nid} [ label=\"{fname}:{cond}\" {params}]\n"; auto cats = GetSplitCategories(tree, nid); auto cats_str = PrintCatsAsSet(cats); auto split = tree[nid].SplitIndex();