lib/naivebayes/classifier.rb in naivebayes-0.0.2 vs lib/naivebayes/classifier.rb in naivebayes-0.0.3
- old
+ new
@@ -1,9 +1,11 @@
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
module NaiveBayes
class Classifier
+ attr_accessor :frequency_table, :word_table, :instance_count_of, :total_count, :model
+
def initialize(params = {})
@frequency_table = Hash.new
@word_table = Hash.new
@instance_count_of = Hash.new(0)
@total_count = 0