Sha256: e142bf886d117c8c46fa86be95175f08f4881170f03730fee157f3eb4eb23f07
Contents?: true
Size: 848 Bytes
Versions: 8
Compression:
Stored size: 848 Bytes
Contents
require 'helper' class TestQuarry < Test::Unit::TestCase should 'load' do require 'quarry' Quarry end should 'expose ARFF' do Quarry::ARFF end should 'allow creating ARFF objects' do a = Quarry::ARFF.new("/Users/will/dev/classifier/src/categories.arff") end should 'read ARFF objects' do a = Quarry::ARFF.new("/Users/will/Desktop/test_reduced.arff") ds = a.read puts "\nFeatures: #{ds.features.size}, examples: #{ds.examples.size}" classifier = Quarry::Classifier::NaiveBayesClassifier.new(ds) print "Created classifier\n" cm = ds.cross_fold_validation(classifier, 2) print "Cross fold done\n" cm.print_summary #ds.stratify(classifier, 10, 0) #classifier.classify(ds.examples[0]) #cm = ds.classify_fold(classifier, 10, 0) #cm.print_summary end end
Version data entries
8 entries across 8 versions & 1 rubygems