-
Notifications
You must be signed in to change notification settings - Fork 332
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
Crash when leaf nodes have no samples #305
Comments
Hi @taltstidl , Thanks for raising this issue. There was some work related to it but it wasn't done completely. ex. #299 I will take a look on it in the next days, it seems to be an issue also when the split nodes don't have samples. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the great library. The visualizations are truly great. However, we're running into a crash when some of the leaf nodes do not have any samples in the
X_train
andy_train
data. What seems to happen is the following:render = viz_model.view()
all necessary legend/node/leaf files are created. However, as some of the leaf nodes have no samples, the check indtreeviz/dtreeviz/trees.py
Line 1261 in a3d02a5
.svg
file is generated for that leaf.render.save('file.svg')
,dot
tries to render the SVG, but fails as the dot code returned byview
still references the SVG files even though they were not created.Two possible solutions to this:
dtreeviz/dtreeviz/trees.py
Line 1240 in a3d02a5
dtreeviz/dtreeviz/trees.py
Line 607 in a3d02a5
_class_leaf_viz
).The text was updated successfully, but these errors were encountered: