Permalink
Browse files

Merge pull request #6 from superchris/master

Fix graphing continuous attribute
  • Loading branch information...
2 parents c70362d + da25259 commit a714dcecf701ce196f360278f9e842fd5112d1a4 @igrigorik committed Oct 28, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/decisiontree/id3_tree.rb
@@ -186,7 +186,7 @@ def build_tree(tree = @tree)
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

0 comments on commit a714dce

Please sign in to comment.