Class: Ai4r::Classifiers::CategoryNode

Inherits:
Object
  • Object
show all
Defined in:
lib/ai4r/classifiers/id3.rb

Overview

:nodoc: all

Instance Method Summary collapse

Constructor Details

#initialize(label, value) ⇒ CategoryNode

Returns a new instance of CategoryNode.



304
305
306
307
# File 'lib/ai4r/classifiers/id3.rb', line 304

def initialize(label, value)
  @label = label
  @value = value
end

Instance Method Details

#get_rulesObject



311
312
313
# File 'lib/ai4r/classifiers/id3.rb', line 311

def get_rules
  return [["#{@label}='#{@value}'"]]
end

#value(data) ⇒ Object



308
309
310
# File 'lib/ai4r/classifiers/id3.rb', line 308

def value(data)
  return @value
end