Commit 8a2b644d authored by run2's avatar run2 Committed by Guolin Ke
Browse files

Fix Invalid decision type error while plotting tree in Python (#810)

* Fix Invalid decision type error while plotting tree in Python

* Fix Invalid decision type error while plotting tree in Python (modified = to ==)
parent 9d3226ee
......@@ -268,9 +268,9 @@ def _to_graphviz(tree_info, show_info, feature_names,
if info in {'split_gain', 'internal_value', 'internal_count'}:
label += '\n' + info + ':' + str(root[info])
graph.node(name, label=label)
if root['decision_type'] == 'no_greater':
if root['decision_type'] == '<=':
l_dec, r_dec = '<=', '>'
elif root['decision_type'] == 'is':
elif root['decision_type'] == '==':
l_dec, r_dec = 'is', "isn't"
else:
raise ValueError('Invalid decision type in tree model.')
......
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