def get_results(ag, label):
  accuracy, false_positives, false_negatives, c_value= find_best(ag, c_values,\
                                                                thresholds)
  print ""
  #print stuff here
  print "Permutation: " + label
  print "Accuracy: " + str(accuracy)
  print "False positives: " + str(false_positives)
  print "False negatives: " + str(false_negatives)
  print "c_value: " + str(c_value)
  print ""
Example #2
0
def get_results(sa, label):
  ag= create_strict_article_group_from_sa(sa, 1000, 20)
  accuracy, false_positives, false_negatives, c_value= find_best(ag, c_values,\
                                                                thresholds)
  print ""
  #print stuff here
  print "Permutation: " + label
  print "Accuracy: " + str(accuracy)
  print "False positives: " + str(false_positives)
  print "False negatives: " + str(false_negatives)
  print "c_value: " + str(c_value)
  print ""
def get_results(ag, label):
    if os.path.exists("positives.ex"):
        os.remove("positives.ex")
        os.remove("negatives.ex")

    train_sets, validation_sets, test_set = subsets(ag.svm_ready_examples, 5)
    for threshold in thresholds:
        accuracy, true_plus, true_minus, false_positives, false_negatives, c_value = find_best(
            c_values, threshold, train_sets, validation_sets, test_set
        )
        print str(threshold) + "\t" + str(false_positives / (true_minus + false_negatives)) + "\t" + str(
            true_plus / (true_plus + false_positives)
        )