I have an output tree in weka but can't view it (right click ...). Is there a tool to generate the resulting tree in an understandable way from the copy of the log (figures)?
How visualize j48 tree in weka
637 Views Asked by Andrea D'Aguanno At
2
There are 2 best solutions below
0
Kirt Undercoffer
On
You can run Weka from the command line if you have java installed. On my Windows machine from the Weka-3-9-5 directory:
C:\Weka-3-9-5> java -cp weka.jar weka.classifiers.trees.J48 -C 0.25 -M 2 -t .\data\iris.arff
This gives you the output that you current have with the trees. However:
C:\Weka-3-9-5> java -cp weka.jar weka.classifiers.trees.J48 -C 0.25 -M 2 -t .\data\iris.arff -g
gives you a different format:
digraph J48Tree { N0 [label="petalwidth" ] ... } and you can feed this to GraphViz to get a nice printed tree. I put the digraph output into a tree.txt file and then generated a png image file through GraphViz:
C:\GraphViz> dot -Tpng tree.txt > tree.png
Related Questions in MACHINE-LEARNING
- How to cluster a set of strings?
- Enforcing that inputs sum to 1 and are contained in the unit interval in scikit-learn
- scikit-learn preperation
- Spark MLLib How to ignore features when training a classifier
- Increasing the efficiency of equipment using Amazon Machine Learning
- How to interpret scikit's learn confusion matrix and classification report?
- Amazon Machine Learning for sentiment analysis
- What Machine Learning algorithm would be appropriate?
- LDA generated topics
- Spectral clustering with Similarity matrix constructed by jaccard coefficient
- Speeding up Viterbi execution
- Memory Error with Classifier fit and partial_fit
- How to find algo type(regression,classification) in Caret in R for all algos at once?
- Difference between weka tool's correlation coefficient and scikit learn's coefficient of determination score
- What are the approaches to the Big-Data problems?
Related Questions in TREE
- prolog traverse nonstandard tree left to right
- Why would one use a heap over a self balancing binary search tree?
- recursively editing member variable: All instances have same value
- D3.js collapsable tree - visualise set number of levels
- java - How to generate Tree from two dimensional array
- Haskell, Tree problems
- d3 indented tree close other nodes with child and open only specific node
- Function that return average depth of a binary search tree
- SQL Tree Structure Table
- Java: make prefix tree remember last value that was not null
- C++: no matching function call
- Building SQL tree from random parent updates
- Use significant attributes only, or use full set of attributes to build J48 model after checking information gain?
- Trie Data Structure in Finding an Optimal Solution
- How to store data in a tree structure in R?
Related Questions in CLASSIFICATION
- Feature selection SVM-Recursive Feature elimination (SVM-RFE) with Libsvm, the accuracy result is worse than without feature selection, why?
- How to find algo type(regression,classification) in Caret in R for all algos at once?
- scatter plot for a multiclass dataset with class imbalance and class overlapping
- Gaussian Naive Bayes classification
- Train And Use Classifier Weka In Java
- ROC curve in R using rpart package?
- Matlab example code for deep belief network for classification
- Chained CostSensitiveClassifier
- Difference between segmentation and classification
- How to train a LogisticRegression classifier to read from a second dataset?
- Tagging a phrase to learn a classifier using NLTK in Python
- Which classifiers provide weight vector?
- NaiveBayes Classifier: Do I have to concatenate all files of one class?
- Scikit Learn - Identifying target from loading a CSV
- Deciding output style for ANN classifier
Related Questions in WEKA
- ARFF file extension to csv binary executable
- How to cluster using kMeans in Weka?
- Difference between weka tool's correlation coefficient and scikit learn's coefficient of determination score
- How to export PCA from Weka
- scatter plot for a multiclass dataset with class imbalance and class overlapping
- Use significant attributes only, or use full set of attributes to build J48 model after checking information gain?
- Train And Use Classifier Weka In Java
- weka API import
- Prediction of sets
- Replace numbers with Boolean in r
- Weka instance.setValue arrayIndexOutOfBounsException
- How to run LibSVM Classifier with 10 fold cross validation from Weka from Linux commandline?
- Chained CostSensitiveClassifier
- How do I use custom stopwords and stemmer file in WEKA (Java)?
- Error trying to call .buildClassifier (Weka) in Java AndroidStudio
Related Questions in J48
- Use significant attributes only, or use full set of attributes to build J48 model after checking information gain?
- Graphviz Visualizer in WEKA giving empty Grpahs
- How visualize j48 tree in weka
- Weka improve model TP Rate
- What does the useLaplace parameter do in the WEKA j48 algorithm?
- How to install ant package in java correctly?
- Student Performance using Decision Tree in Weka
- Extracting contents from decision tree J48
- Properties and their values out of J48 tree (RWeka)
- R Weka J48 with snowfall for parallel execution
- RWeka J48 Classification issue in R and MovieLense data sets
- Zero-R model calculation of Sensitivity and Specificity using Confusion Matrix and Statistics with Caret
- weka J48 feature selection
- how to classify using j48 weka with information gain and random attribute selection?
- ArrayIndexOutOfBoundsException in instance classification in java using weka
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?

The above textual representation cannot be converted into other formats, unless you write your own parser.
However, if you use the
-goption on the command-line, the tree will get output on stdout in dot-notation. You can then take this output and convert it into other formats, like PNG or PDF using the GraphViz software.