Method: NBayes::Data#decrement_examples
- Defined in:
- lib/nbayes.rb
#decrement_examples(category) ⇒ Object
Decrement the number of training examples for this category. Delete the category if the examples counter is 0.
96 97 98 99 |
# File 'lib/nbayes.rb', line 96 def decrement_examples(category) cat_data(category)[:examples] -= 1 delete_category(category) if cat_data(category)[:examples] < 1 end |