Abeyon
  • About Abeyon
    • Who we are
    • Customers
    • Vehicles
  • Capabilities
    • Secure AI solutions
    • Data Engineering & Analysis
    • IT Modernization & Digital Transformation
    • Application Development
  • AI Studio
  • Case Studies
  • Insights
  • Join
  • Contact
  • Menu Menu
measure an AI models performance using F1 score

How to measure an AI models performance – F1 score explained

November 1, 2019/in AI, Deep Learning, Machine Learning, NLP, Text Analysis/by Mallesh Murugesan

Organizations often ask us, “How well is the AI model is doing?” Or “How do I measure its performance?”, we often respond with “Performance of the AI model is based on what the F1 score of the model is” and we will get a puzzled look on everyones face or asking “what is an F1 score?”  So here I am going to attempt to explain F1 score in an easily understandable way:

Definition of F1 score:

F1 score (also F-score or F-measure) is a measure of a test’s accuracy. It considers both the precision (p) and the recall (r) of the test to compute the score (as per wikipedia)

Accuracy is how most people tend to think about it when it comes to measuring performance (Ex: How accurate is the model predicting etc.?). But accuracy is not a true measure of AI models performance. Accuracy only measures the number of correctly predicted values among the total predicted value. Although it is a good measure of performance it is not complete and does not work when the cost of false negatives is high. Ex: Lets assume we are using an AI model to predict cancer cells, after training, the model is fed with 100 samples that have cancer and the model identifies 90 samples as having cancer. That 90% accuracy, which sounds pretty high. But the cost of not identifying 10 samples is very costly. Therefore accuracy is not always the best measure.

So to explain it further lets consider this table:

 

 

True Positive:

True Positive is an outcome where the model correctly predicts the positive class. Ex: when cancer is present and the model predicts cancer.

False Positive is an outcome where the model incorrectly predicts the positive class. Ex: when cancer is not present and the model predicts cancer.

False Negative is an outcome where the model incorrectly predicts the negative class. Ex: when cancer is present and the model predicts no cancer.

True Negative is an outcome where the model correctly predicts the negative class. Ex: when cancer is not present and the model predicts no cancer.

As explained by the definition, the F1 score is a combination of Precision and Recall.

Precision is the number of True Positives divided by the number of True Positives and False Positives. Precision can be thought of as a measure of exactness. Therefore, low precision will indicate a large number of False Positives.

Recall is the number of True Positives divided by the number of True Positives and the number of False Negatives. Recall can be thought of as a measure of completeness. Therefore, low recall indicates a large number of False Negatives.

Now, F1 score is the harmonic mean of Precision and Recall and gives a much better measure of the model.

F1 Score = 2*((precision*recall)/(precision+recall)).

A good F1 score means that you have low false positives and low false negatives. Accuracy is used when the True Positives and True negatives are more important while F1-score is used when the False Negatives and False Positives are crucial

Interested in more AI insights. Click here and read our other articles.

Tags: artificial Intelligence, machine learning, Transfer Learning
Share this entry
  • Share on Facebook
  • Share on X
  • Share on Pinterest
  • Share on LinkedIn
  • Share on Tumblr
  • Share on Vk
  • Share on Reddit
  • Share by Mail
https://www.chirrp.ai/wp-content/uploads/2019/11/Pencils.png 604 1278 Mallesh Murugesan https://www.abeyon.com/wp-content/uploads/2015/03/logo_abeyon_big-gray-300x85.png Mallesh Murugesan2019-11-01 15:46:172022-05-05 15:28:02How to measure an AI models performance – F1 score explained
You might also like
NLP Abeyon Techflow Team awarded spot on HHS IAAI IDIQ Contract
Create Specific Task LLMs – Part 1 – Prompt Engineering to Fine Tuning
Topic Modeling With document democracy, we go beyond traditional Topic Modeling
Text Classification: Binary to Multi-label Multi-class classification
Named Entity Recognition Bring clarity to unstructured data using Natural Language Processing (NLP) – Part 1
NLP Bring clarity to unstructured data using Natural Language Processing (NLP) – Part 2
Search Search

Categories

  • AI
  • Deep Learning
  • Events
  • In The News
  • Machine Learning
  • NLP
  • Text Analysis

Sign Up For Our Mailing List

Archives

  • February 2025
  • February 2024
  • May 2023
  • April 2022
  • May 2021
  • November 2020
  • November 2019
  • September 2019
  • August 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • November 2018
  • February 2018
  • October 2017
  • September 2017
  • August 2017
  • July 2017
  • November 2016
© Copyright 2018 - Abeyon
  • CY 2024 Greenhouse Gas Emissions
Link to: Bring clarity to unstructured data using Natural Language Processing (NLP) – Part 1 Link to: Bring clarity to unstructured data using Natural Language Processing (NLP) – Part 1 Bring clarity to unstructured data using Natural Language Processing (NLP) –...Named Entity Recognition Link to: Bring clarity to unstructured data using Natural Language Processing (NLP) – Part 2 Link to: Bring clarity to unstructured data using Natural Language Processing (NLP) – Part 2 NLPBring clarity to unstructured data using Natural Language Processing (NLP) –...
Scroll to top Scroll to top Scroll to top