Questions tagged [pydot]

pydot is a Python module to serve as an easy interface to Graphviz's dot language.

For more information, check:

202 questions
1
vote
1 answer

Visualizing RandomForestRegression trees

I have run a RandomForestRegression model in sklearn and saved the output of my decisions trees (n_estimators=50) into 50 .dot files. Now I want to save them so I can view them as actual trees. I am trying this: import…
Stefano Potter
  • 3,467
  • 10
  • 45
  • 82
1
vote
1 answer

Sckit learn with GraphViz exports empty outputs

I would like to export decision tree using sklearn. First I trained a decision tree classifier: self._selected_classifier = tree.DecisionTreeClassifier() self._selected_classifier.fit(train_dataframe, train_class) self._column_names =…
Aviade
  • 2,057
  • 4
  • 27
  • 49
1
vote
0 answers

Generate graph in python with images as edge lables

I want to generate a graph, where there is an image on the edge label instead of text. I am trying to do this on the pydot, but it allows me to add only text as the label. Is there any alternative which will help me to do this?
shivram
  • 469
  • 2
  • 10
  • 26
1
vote
2 answers

Django Model Graph (pydot) Error

I have recently started working on a big Django project with existing complicated model. I needed to visualize that model, so I decided to use django-extensions (namely pygraphviz). But unfortunately, failed to install pygraphviz on windows using…
1
vote
1 answer

Attribute error using Pydot to create a graph

I am using IPython on Windows10 to train and draw out a decision tree. I know the following code worked on linux some time back. I installed pydot and also have graphviz (with the path correctly specified). # Train and draw out a decision…
rahul
  • 341
  • 2
  • 8
1
vote
1 answer

Html Horizontal line error graphviz

I'm needing to create subgraph cluster have a label with line separation from nodes. subgraph cluster_0{ label=< process #1
> node [shape=none] t1 [label="label1"] t2 [label="label2"] t3 [label="label 3"] node…
Mostafa Albana
  • 33
  • 2
  • 10
1
vote
1 answer

Ubuntu 14.04: python can't import module pydot

I wrote a simple example program using pydot: import pydot graph = pydot.Dot(graph_type='graph') for i in range(3): edge = pydot.Edge("king", "lord%d" % i) graph.add_edge(edge) graph.write_png('example_graph.png') I installed pydot via…
Natjo
  • 2,005
  • 29
  • 75
1
vote
1 answer

Pydot - store nodes in list - unhashable type: 'list' error

I'm using pydot to generate a graph from a list of strings graph = pydot.Dot(graph_type='digraph') node_list = [] for i in xrange(0, len(string_list)): node_list.append(pydot.Node(string_list[i])) graph.add_node(node_list[-1]) for j in…
user1403546
  • 1,680
  • 4
  • 22
  • 43
1
vote
1 answer

scikit-learn: Decision tree

I am trying to train a decision tree with iris dataset from scikit-learn. I tried running the following command: from sklearn.datasets import load_iris from sklearn import tree clf = tree.DecisionTreeClassifier() iris = load_iris() clf =…
Priya
  • 65
  • 7
1
vote
2 answers

Wrong version of pydot is being imported

I installed pydot2 successfully using the Ipython notebook. %%bash pip install pydot2 Collecting pydot2 Downloading pydot2-1.0.33.tar.gz Requirement already satisfied (use --upgrade to upgrade): pyparsing in…
1
vote
3 answers

Python Decision Tree GraphViz

I'm attempting to implement a Decision Tree with scikit learn and then visualise the tree with Graphviz which I understand is the standard choice for visualising DT. I'm using PyCharm, anaconda, Python 2.7 and OS X El Capitan. I've installed pydot…
OAK
  • 2,994
  • 9
  • 36
  • 49
1
vote
2 answers

Clickable SVG Images for Website

I'm using pydot to generate SVG graph images. I noticed on this website: http://safemap.sourceforge.net/demo/index-no-refresh.html that they have a clickable SVG. (This website also shows how you can style SVGs with CSS:…
Juicy
  • 11,840
  • 35
  • 123
  • 212
1
vote
2 answers

get all leaf nodes of a directed graph in pydot

I create a directed tree using pydot and visualize it. That is fine but I would also like to retrieve the leaf nodes of the tree. How can I do that? In general the question is how to access the nodes and edges that are stored inside the pydot…
Bikash Gyawali
  • 969
  • 2
  • 15
  • 33
1
vote
2 answers

Error using python pydot

I get error using the theano.printing.pydotprint() function following lines work fine without any error: >>> from theano import * >>> import theano.tensor as T >>> import pydot >>> import numpy Also when I run >>> theano.printing.pydotprint in the…
Abhishek
  • 3,337
  • 4
  • 32
  • 51
1
vote
0 answers

How identify left (True) and right (False) branch

I exported a scikit-learn DecisionTree to a .dot file with export_graphviz. In a different module I want to load the tree from the .dot file and fill a different tree structure. Question: How do I decide if a branch is the left one (take if…
ezdazuzena
  • 6,120
  • 6
  • 41
  • 71