Optimal Thresholding of Classifiers to Maximize F1 Measure

  • Zachary C. Lipton
  • Charles Elkan
  • Balakrishnan Naryanaswamy
Conference paper

DOI: 10.1007/978-3-662-44851-9_15

Part of the Lecture Notes in Computer Science book series (LNCS, volume 8725)
Cite this paper as:
Lipton Z.C., Elkan C., Naryanaswamy B. (2014) Optimal Thresholding of Classifiers to Maximize F1 Measure. In: Calders T., Esposito F., Hüllermeier E., Meo R. (eds) Machine Learning and Knowledge Discovery in Databases. ECML PKDD 2014. Lecture Notes in Computer Science, vol 8725. Springer, Berlin, Heidelberg

Abstract

This paper provides new insight into maximizing F1 measures in the context of binary classification and also in the context of multilabel classification. The harmonic mean of precision and recall, the F1 measure is widely used to evaluate the success of a binary classifier when one class is rare. Micro average, macro average, and per instance average F1 measures are used in multilabel classification. For any classifier that produces a real-valued output, we derive the relationship between the best achievable F1 value and the decision-making threshold that achieves this optimum. As a special case, if the classifier outputs are well-calibrated conditional probabilities, then the optimal threshold is half the optimal F1 value. As another special case, if the classifier is completely uninformative, then the optimal behavior is to classify all examples as positive. When the actual prevalence of positive examples is low, this behavior can be undesirable. As a case study, we discuss the results, which can be surprising, of maximizing F1 when predicting 26,853 labels for Medline documents.

Keywords

supervised learning text classification evaluation methodology F score F1 measure multilabel learning binary classification 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2014

Authors and Affiliations

  • Zachary C. Lipton
    • 1
  • Charles Elkan
    • 1
  • Balakrishnan Naryanaswamy
    • 1
  1. 1.University of CaliforniaSan Diego, La JollaUSA

Personalised recommendations