예제 #1
0
 def testsubmission(self):
     train = get_spam_train_data()
     valid = get_spam_valid_data()
     preds = submission(train, valid)
     acc = accuracy(valid, preds)
     print
     print("Your current accuracy is:", acc)
     self.assertGreater(acc, .75)
예제 #2
0
 def testsubmission(self):
     train = get_spam_train_data()
     valid = get_spam_valid_data()
     preds = submission(train, valid)
     acc = accuracy(valid, preds)
     print
     print "Your current accuracy is:", acc
     self.assertGreater(acc, .75)
예제 #3
0
 def testsubmission(self):
     if 1 < len(sys.argv):
         train = load_model(sys.argv[1])
     else:
         train = get_spam_train_data()
     valid = get_spam_valid_data()
     preds = submission(train, valid)
     acc = accuracy(valid, preds)
     print
     print "Your current accuracy is:", acc
     self.assertGreater(acc, .75)
예제 #4
0
파일: test.py 프로젝트: zkytony/446-hw
 def testsubmission(self):
     train = get_spam_train_data()
     print "training data all loaded"
     valid = get_spam_valid_data()
     print "validation data all loaded"
     preds = submission(train, valid)
     print "predictions all complete"
     acc = accuracy(valid, preds)
     print
     print "Your current accuracy is:", acc
     self.assertGreater(acc, .75)