Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Showing function in leaf nodes when using linear regression #10

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Update ModelTree.py
vildursn authored Mar 23, 2020
commit 7532991cd4cacd8c15e490ad7f37cda77ee12fd4
2 changes: 2 additions & 0 deletions advanced_ML/model_tree/src/ModelTree.py
Original file line number Diff line number Diff line change
@@ -206,6 +206,8 @@ def build_graphviz_recurse(node, parent_node_index=0, parent_depth=0, edge_label
threshold_str += str(round(params[i],2]))
threshold_str += "*X"+str(i)
threshold_str+="\n"
else:
threshold_str=""

else:
threshold_str = "{} <= {:.1f}\\n".format(feature_names[node['j_feature']], node["threshold"])