lib/ai4r/classifiers/one_r.rb in ai4r-1.4 vs lib/ai4r/classifiers/one_r.rb in ai4r-1.5

- old
+ new

@@ -23,10 +23,11 @@ class OneR < Classifier attr_reader :data_set, :rule # Build a new OneR classifier. You must provide a DataSet instance - # as parameter. + # as parameter. The last attribute of each item is considered as + # the item class. def build(data_set) data_set.check_not_empty @data_set = data_set if (data_set.num_attributes == 1) @zero_r = ZeroR.new.build(data_set)