trying to plot the decision tree graph in google colab

9 views
Skip to first unread message

David Diaz

unread,
May 3, 2024, 11:10:30 AMMay 3
to python-weka-wrapper
Hello everyone,

I'm trying to do as mentioned, you can find my code here (I'm preparing lesson for an introductory course of machine learning to business students)


is the last cell which runs but doesnt show the plot

Thanks in advance,

kind regards


Peter Reutemann

unread,
May 4, 2024, 2:46:45 AMMay 4
to python-we...@googlegroups.com
pww3 wasn't designed with jupyter notebooks in mind. That command would pop up a matplotlib window, which probably doesn't work in a notebook.

Have you tried saving the plot to a file instead and then loading/displaying that in a cell?

The plot_dot_graph method has a "filename" parameter for that:

https://fracpete.github.io/python-weka-wrapper3/weka.plot.html#weka.plot.graph.plot_dot_graph

Cheers, Peter
--
Peter Reutemann
Dept. of Computer Science
University of Waikato, Hamilton, NZ
Mobile +64 22 190 2375
https://www.cs.waikato.ac.nz/~fracpete/
http://www.data-mining.co.nz/

4/05/2024 03:10:33 David Diaz <daviddi...@gmail.com>:

--
You received this message because you are subscribed to the Google Groups "python-weka-wrapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-weka-wra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python-weka-wrapper/5795c32a-5888-4728-862d-99f63a942c33n%40googlegroups.com.

David Diaz

unread,
May 7, 2024, 12:36:54 AMMay 7
to python-we...@googlegroups.com
Thanks, that's what I did (saving the file to disk and then plot it from the .png)

kind regards!
__tpx__

Reply all
Reply to author
Forward
0 new messages