Skip to content

Commit

Permalink
add accuracy metric and default to prior off, seems to not help anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
awni committed Apr 4, 2017
1 parent 23bd95e commit 15fb3e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion score.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
logger = logging.getLogger("Score")

def print_scores(labels, predictions, classes):
accuracy = skm.accuracy_score(labels, predictions)
report = skm.classification_report(
labels, predictions,
target_names=classes,
Expand All @@ -19,6 +20,7 @@ def print_scores(labels, predictions, classes):
labels,
predictions,
average='macro')
logger.info("Accuracy {:.3f}".format(accuracy))
logger.info("\n"+report)
logger.info("Macro Average F1: {:.3f}".format(macro_scores[2]))

Expand All @@ -36,7 +38,7 @@ def load_model(model_path, is_verbose, batch_size):

evl = evaler.Evaler(model_path, is_verbose,
batch_size=batch_size,
class_counts=ldr.class_counts)
class_counts=None)

return evl, ldr

Expand Down

0 comments on commit 15fb3e1

Please sign in to comment.