2012-01-18 14 views

答えて

0

非常に精巧なものを探しているかどうかは分かりませんが、weka.classifiers.treesを使用すると基本的に決定木が印刷されます。 response of mineにはランダムツリーのイラストがありますが、ここでは虹彩データセットでJ48アルゴリズムを使用して得られるものを示します。

~/weka/data$ weka weka.classifiers.trees.J48 -t iris.arff -i 

J48 pruned tree 
------------------ 

petalwidth <= 0.6: Iris-setosa (50.0) 
petalwidth > 0.6 
| petalwidth <= 1.7 
| | petallength <= 4.9: Iris-versicolor (48.0/1.0) 
| | petallength > 4.9 
| | | petalwidth <= 1.5: Iris-virginica (3.0) 
| | | petalwidth > 1.5: Iris-versicolor (3.0/1.0) 
| petalwidth > 1.7: Iris-virginica (46.0/1.0) 

Number of Leaves :  5 

Size of the tree : 9 


Time taken to build model: 0.08 seconds 
Time taken to test model on training data: 0.01 seconds 
関連する問題