Sha256: 851a947f68d3ff2745a01fb9b7372d2599b406493d6750127cbb7c35539ae4b2
Contents?: true
Size: 538 Bytes
Versions: 9
Compression:
Stored size: 538 Bytes
Contents
require File.dirname(__FILE__) + '/../../lib/ai4r/classifiers/naive_bayes' require File.dirname(__FILE__) + '/../../lib/ai4r/data/data_set' require File.dirname(__FILE__) + '/../../lib/ai4r/classifiers/id3' require 'benchmark' include Ai4r::Classifiers include Ai4r::Data data_set = DataSet.new data_set.load_csv_with_labels File.dirname(__FILE__) + "/naive_bayes_data.csv" b = NaiveBayes.new. set_parameters({:m=>3}). build data_set p b.eval(["Red", "SUV", "Domestic"]) p b.get_probability_map(["Red", "SUV", "Domestic"])
Version data entries
9 entries across 9 versions & 3 rubygems