convert labels to string - closes #13

This commit is contained in:
Ilya Grigorik
2013-09-14 11:01:27 -07:00
parent e70f29817b
commit 4da9dcf68e
2 changed files with 17 additions and 0 deletions

View File

@@ -42,6 +42,7 @@ module DecisionTree
end
def train(data=@data, attributes=@attributes, default=@default)
attributes = attributes.map {|e| e.to_s}
initialize(attributes, data, default, @type)
# Remove samples with same attributes leaving most common classification