Close Menu
The AI Book
    Facebook X (Twitter) Instagram
    The AI BookThe AI Book
    • Home
    • Categories
      • AI Media Processing
      • AI Language processing (NLP)
      • AI Marketing
      • AI Business Applications
    • Guides
    • Contact
    Subscribe
    Facebook X (Twitter) Instagram
    The AI Book
    AI Language processing (NLP)

    What is precision and recall in machine learning?

    29 May 2023No Comments3 Mins Read

    [ad_1]

    Precision and recall are commonly used metrics to measure the performance of machine learning models or AI solutions in general. This helps us understand how well the models are making predictions.

    Let’s use the example of email SPAM prediction. Say you have a model that looks at an email and decides if it’s spam or not. To see how well it performs, you’ll want to compare it to human-generated labels, which we’ll call Real labels.

    To demonstrate this, the table below shows some actual decals and predicted decals for the car (model). Now we assume that Spam Prediction is positive, not spam prediction is negative.

    Email ID actual label Predicted car tag
    Email 1 spam (positive) Spam (positive and correct)
    Mail 2 spam (positive) No Spam (Negative and Incorrect)
    Email 3 No Spam (Negative) Spam (positive and negative)
    Email 4 spam (positive) No Spam (Negative and Incorrect)
    Email spam predictions with corresponding true predictions.

    What is precision in ML?

    Given this, intuitively, accuracy Measures the proportion of correct positive predictions.

    How is accuracy calculated?

    As you can see from the above table, from 2 Spam (Positive) machine predictions, only 1 is correct. So the accuracy is 0.5 or 50%.

    What is Recall in ML?

    Let’s remember Measures the proportion of true positive labels correctly identified by the model.

    Recall computation in machine learning
    How recall is calculated

    Notice from the table above that we have 3 real labels that are positive and only one of them is captured correctly by the model. So the recall is 0.33 or 33%.

    Overall, in the SPAM prediction example, the precision is 50% and the recall is 33%.

    What message does precision and recall convey?

    What are the exact measurements at a high level? Correctness. What are the recall measures at a high level? coverage. For example, if the accuracy is 98%, it means that when the model says the prediction is positive, the prediction is probably accurate. A model can be overly conservative and make only limited positive predictions, resulting in high accuracy. In other words, it fails to make enough positive predictions. That’s why you also need to consider recall – to ensure you have enough real positives.

    Regarding recall, high recall means that the model is able to capture most of the positive predictions. But if the model says everything is positive, regardless of the underlying reasoning, the recall will be artificially high and close to perfect. Therefore, a balance needs to be struck between precision and recall. You want accurate predictions, but at the same time not at the cost of missing too many positive predictions (false negative predictions). Ideally, you want sufficiently high precision and recall.

    Summary

    in this accuracy measures the proportion of correct positive predictions and recall Measures coverage of actual positive labels. For a model to be considered “good”, the precision and recall must be at an acceptable level. Ultimately, what is acceptable depends on the application.

    Keep learning and succeed with AI

    • Join my AI Integrated Newsletter, which demystifies AI and teaches you how to successfully deploy AI to drive profitability and growth in your business.
    • Read the business case for AI Learn the applications, strategies, and best practices to be successful with AI (select companies using the book: government agencies, automakers like Mercedes Benz, beverage manufacturers, and e-commerce companies like Flipkart).
    • Work directly with me Improve your organization’s understanding of AI, accelerate AI strategy development, and get meaningful results from every AI initiative.

    Recommended reading:

    connected

    [ad_2]

    Source link

    Previous ArticleUse case: Easily create 1 to many campaigns
    Next Article Arm unveils 5th generation GPUs with Immortalis-G720
    The AI Book

    Related Posts

    AI Language processing (NLP)

    The RedPajama Project: An Open Source Initiative to Democratize LLMs

    24 July 2023
    AI Language processing (NLP)

    Mastering Data Science with Microsoft Fabric: A Tutorial for Beginners

    23 July 2023
    AI Language processing (NLP)

    Will AI kill your job?

    22 July 2023
    Add A Comment
    Leave A Reply Cancel Reply

    • Privacy Policy
    • Terms and Conditions
    • About Us
    • Contact Form
    © 2026 The AI Book.

    Type above and press Enter to search. Press Esc to cancel.