From da25259a7a6e49275fc3580a9d8279cae45d95c7 Mon Sep 17 00:00:00 2001 From: Chris Nelson Date: Sun, 28 Oct 2012 12:41:26 -0400 Subject: [PATCH] Broke graphing tree with continuous attributes --- lib/decisiontree/id3_tree.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/decisiontree/id3_tree.rb b/lib/decisiontree/id3_tree.rb index dc3558a..39e2b70 100755 --- a/lib/decisiontree/id3_tree.rb +++ b/lib/decisiontree/id3_tree.rb @@ -186,7 +186,7 @@ module DecisionTree child = attr[1][key] child_text = "#{child}\n(#{child.to_s.clone.object_id})" end - label_text = "#{key} #{@type == :continuous ? attr[0].threshold : ""}" + label_text = "#{key} #{type(attr[0].attribute) == :continuous ? attr[0].threshold : ""}" [parent_text, child_text, label_text] end