Class: Ai4r::Classifiers::CategoryNode
- Inherits:
-
Object
- Object
- Ai4r::Classifiers::CategoryNode
- Defined in:
- lib/ai4r/classifiers/id3.rb
Overview
:nodoc: all
Instance Method Summary collapse
- #get_rules ⇒ Object
-
#initialize(label, value) ⇒ CategoryNode
constructor
A new instance of CategoryNode.
- #value(data) ⇒ Object
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_rules ⇒ Object
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 |