You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 and y_train data. What seems to happen is the following:
When calling render = viz_model.view() all necessary legend/node/leaf files are created. However, as some of the leaf nodes have no samples, the check in
comes into play and no .svg file is generated for that leaf.
Later when calling render.save('file.svg'), dot tries to render the SVG, but fails as the dot code returned by view still references the SVG files even though they were not created.
workaround:
if you use the Model Training Data to create the dtreeviz.model you should be finde. If you want to draw a sample or Test Data you can get this Messages like
Warning: No such file or directory while opening .../leafXXX_{pid}.svg
Error: No or improper image file=".../leafXXX_{pid}.svg"
in label of node leafXXX
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: