Comments (16)
weird. does dot
work from command line @jlw365 ? It looks like it can't find dot
.
from dtreeviz.
getting same issue. Although i have the dot.
from dtreeviz.
Try running the code from cmdline then not notebook to see if it works. that will isolate the issue to a path problem in notebook.
from dtreeviz.
Hi Thanks for reverting back. still having same issue. Please find attached file.
from dtreeviz.
Ah. ok, it's finding dot but can't handle the svg stuff. That is a mac? try these updated instructions:
Make sure to have the latest XCode installed and command-line tools installed. You can run xcode-select --install from the command-line to install those if XCode is already installed. You also have to sign the XCode license agreement, which you can do with sudo xcodebuild -license from command-line. The brew install shown next needs to build graphviz, so you need XCode set up properly.
You need the graphviz binary for dot installed with librsvg and pango. Make sure you uninstall graphviz then reinstall or install like this:
brew install graphviz --with-librsvg --with-pango
(The --with-librsvg is absolutely required because we generate output using dot's -Tsvg:cairo option. I have used --with-app successfully also but others have trouble installing with that.)
from dtreeviz.
I struggled the same issue then I could solve them with the information here.
Thank you so much for your helpful information, @parrt.
from dtreeviz.
@motoki0214 glad to hear it. What specifically solved your problem so I can update the doc? Was the uninstall then install? correct brew options?
from dtreeviz.
@parrt
I did what you said things below,
1, type "xcode-select --install" from the command-line
2, then run "sudo xcodebuild -license" from the command-line
3, "uninstall graphviz" from the command-line once
4, then finally run "brew install graphviz --with-librsvg --with-pango" on command-line
5, A sample decision tree was shown on Jupyter notebook with "display(viz)" or "viz"
FYI ;
I am running Python 3.6.4 :: Anaconda, Inc. in the Jupyter notebook.
also already Xcode was installed in my mac.
from dtreeviz.
great. added to doc
from dtreeviz.
@parrt
My pleasure.
This library is very useful for my job, thank you very much too.
from dtreeviz.
I have tried all of the suggestions from all of these threads, everything installs successfully yet I still get:
CalledProcessError: Command '['dot', '-Tsvg:cairo', '-o', .... ] (on mac)
Since I am not too worried about quality, my work around was to go to the trees.py file and change line 89 to:
cmd = ["dot", f"-Tsvg:svg:core", "-o", filename, dotfilename]
Now this doesn't fix viz.view() for me but it does allow me to save .png. Better than nothing!
--
By the way, awesome library @parrt thank you
from dtreeviz.
That is so weird. If you try dot
with svg from the command line and it doesn't work, then that is some kinda weird install issue unrelated to dtreeviz. Nonetheless, glad you found a way around it.
from dtreeviz.
@JosephGatto That -Tsvg:svg:core thing didn't work for me. How did you use that route to get png? Trying to update package. thanks! This seems to work though:
dot -o foo.png -Tpng foo.dot
from dtreeviz.
@JosephGatto That -Tsvg:svg:core thing didn't work for me. How did you use that route to get png? Trying to update package. thanks! This seems to work though:
dot -o foo.png -Tpng foo.dot
@parrt So my reasoning for that was Jupyter warnings stating something telling me to use that package instead. I then just went into the source code and replaced the original call.
It worked for a bit but I have since tried uninstalling / reinstalling dtreeviz as that workflow was painful. My hacky solution stopped working after that and I resulted in giving up on trying to get it to work on my mac and switched to windows. Sorry this response isn't more helpful!
from dtreeviz.
@JosephGatto no problem. I have updated the README to have new instructions but I'm working on a png thing now too :)
from dtreeviz.
@JosephGatto Can you try the new build from source instructions on the homepage? It works for me on to Macs.
from dtreeviz.
Related Issues (20)
- Add support for TensorFlow GradientBoostedTreesModel model
- _regr_leaf_viz calculates the mean for prediction value.
- WARNING:matplotlib.font_manager:findfont: Font family 'Arial' not found. HOT 2
- Decision Tree visualize wrong path HOT 1
- When using dataset that is different from the training for trees models - does not draw HOT 1
- Support for RandomForest HOT 5
- Visualize custom decision tree HOT 1
- how to use dtreeviz in streamlit HOT 2
- VisualisationNotYetSupportedError: get_min_samples_leaf() is not implemented yet for XGBoost. HOT 4
- TypeError: list indices must be integers or slices, not numpy.float64 HOT 5
- Crash when leaf nodes have no samples HOT 1
- Out of memory when calling viz.view() HOT 2
- Integrate AI explanation
- CatBoost need to be supported. HOT 1
- AttributeError: module 'dtreeviz' has no attribute 'model' on Windows platform, works fine on Google colab
- tfdf.keras.CartModel support? HOT 1
- TypeError: 'int' object is not subscriptable HOT 3
- Development requirement in `setup.py` HOT 1
- Adjust Bounding Box of saved svg file
- DTreeViz crashes, if descision tree was built with objects, that are interpretable as numbers.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dtreeviz.