{"id":107303,"date":"2025-05-08T23:16:00","date_gmt":"2025-05-08T17:46:00","guid":{"rendered":"https:\/\/www.mygreatlearning.com\/blog\/f1-score-in-machine-learning\/"},"modified":"2025-05-09T01:29:44","modified_gmt":"2025-05-08T19:59:44","slug":"f1-score-in-machine-learning","status":"publish","type":"post","link":"https:\/\/www.mygreatlearning.com\/blog\/f1-score-in-machine-learning\/","title":{"rendered":"F1 Score in Machine Learning: Formula, Precision and Recall"},"content":{"rendered":"\n<p>In <a href=\"https:\/\/www.mygreatlearning.com\/blog\/what-is-machine-learning\/\">machine learning<\/a>, it is not always true that high accuracy is the ultimate goal, especially when dealing with imbalanced data sets.&nbsp;<\/p>\n\n\n\n<p>For example, let there be a medical test, which is 95% accurate in identifying healthy patients but fails to identify most actual disease cases. Its high accuracy, however, conceals a significant weakness. It is here that the F1 Score proves helpful.&nbsp;<\/p>\n\n\n\n<p>That is why the F1 Score gives equal importance to precision (the percentage of selected items that are relevant) and recall (the percentage of relevant chosen items) to make the models perform stably even in the case of data bias.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-the-f1-score-in-machine-learning\">What is the F1 Score in Machine Learning?<\/h2>\n\n\n\n<p>F1 Score is a popular performance measure used more often in machine learning and measures the trace of precision and recall together. It is beneficial for classification tasks with imbalanced data because accuracy can be misleading.&nbsp;<\/p>\n\n\n\n<p>The F1 Score gives an accurate measure of the performance of a model, which does not favor false negatives or false positives exclusively, as it works by averaging precision and recall; both the incorrectly rejected positives and the incorrectly accepted negatives have been considered.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"understanding-the-basics-accuracy-precision-and-recall\"><strong>Understanding the Basics: Accuracy, Precision, and Recall&nbsp;<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1-accuracy\">1. Accuracy<\/h3>\n\n\n\n<p><strong>Definition: <\/strong>Accuracy measures the overall correctness of a model by calculating the ratio of correctly predicted observations (both true positives and true negatives) to the total number of observations.<\/p>\n\n\n\n<p><strong>Formula:<\/strong><\/p>\n\n\n\n<p><strong>Accuracy<\/strong> = (TP + TN) \/ (TP + TN + FP + FN)<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>TP: True Positives<\/li>\n\n\n\n<li>TN: True Negatives<\/li>\n\n\n\n<li>FP: False Positives<\/li>\n\n\n\n<li>FN: False Negatives<\/li>\n<\/ul>\n\n\n\n<p><strong>When Accuracy Is Useful:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ideal when the dataset is balanced and false positives and negatives have similar consequences.<\/li>\n\n\n\n<li>Common in general-purpose classification problems where the data is evenly distributed among classes.<\/li>\n<\/ul>\n\n\n\n<p><strong>Limitations:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>It can be misleading in imbalanced datasets.<br>Example: In a dataset where 95% of samples belong to one class, predicting all samples as that class gives 95% accuracy, but the model learns nothing helpful.<\/li>\n\n\n\n<li>Doesn\u2019t differentiate between the types of errors (false positives vs. false negatives).<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-precision\">2. Precision<\/h3>\n\n\n\n<p><strong>Definition:<\/strong> Precision is the proportion of correctly predicted positive observations to the total predicted positives. It tells us how many of the predicted positive cases were positive.<\/p>\n\n\n\n<p><strong>Formula:<\/strong><\/p>\n\n\n\n<p><strong>Precision<\/strong> = TP \/ (TP + FP)<\/p>\n\n\n\n<p><strong>Intuitive Explanation:<\/strong><\/p>\n\n\n\n<p>Of all instances that the model classified as positive, how many are truly positive? High precision means fewer false positives.<\/p>\n\n\n\n<p><strong>When Precision Matters:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>When the cost of a false positive is high.<\/li>\n\n\n\n<li>Examples:\n<ul class=\"wp-block-list\">\n<li>Email spam detection: We don\u2019t want essential emails (non-spam) to be marked as spam.<\/li>\n\n\n\n<li>Fraud detection: Avoid flagging too many legitimate transactions.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p><strong>3. Recall (Sensitivity or True Positive Rate)<\/strong><\/p>\n\n\n\n<p><strong>Definition: <\/strong>Recall is the proportion of actual positive cases that the model correctly identified.<\/p>\n\n\n\n<p><strong>Formula:<\/strong><\/p>\n\n\n\n<p><strong>Recall<\/strong> = TP \/ (TP + FN)<\/p>\n\n\n\n<p><strong>Intuitive Explanation:<\/strong><\/p>\n\n\n\n<p>Out of all real positive cases, how many did the model successfully detect? High recall means fewer false negatives.<\/p>\n\n\n\n<p><strong>When Recall Is Critical:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>When a positive case has serious consequences.<\/li>\n\n\n\n<li>Examples:\n<ul class=\"wp-block-list\">\n<li>Medical diagnosis: Missing a disease (fapredictive analyticslse negative) can be fatal.<\/li>\n\n\n\n<li>Security systems: Failing to detect an intruder or threat.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>Precision and recall provide a deeper understanding of a model\u2019s performance, especially when accuracy alone isn\u2019t enough. Their trade-off is often handled using the F1 Score, which we\u2019ll explore next.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"the-confusion-matrix-foundation-for-metrics\"><strong>The Confusion Matrix: Foundation for Metrics<\/strong><\/h2>\n\n\n<figure class=\"wp-block-image aligncenter size-large zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/confusion-matrix-1.webp\"><img decoding=\"async\" width=\"1024\" height=\"683\" src=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/confusion-matrix-1-1024x683.webp\" alt=\"Confusion Matrix\" class=\"wp-image-107305\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/confusion-matrix-1-1024x683.webp 1024w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/confusion-matrix-1-300x200.webp 300w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/confusion-matrix-1-768x512.webp 768w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/confusion-matrix-1-150x100.webp 150w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/confusion-matrix-1.webp 1536w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>A <a href=\"https:\/\/www.mygreatlearning.com\/blog\/confusion-matrix-an-overview-with-python-and-r\/\"><strong>confusion matrix<\/strong><\/a> is a fundamental tool in machine learning that visualizes the performance of a classification model by comparing predicted labels against actual labels. It categorizes predictions into four distinct outcomes.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><\/td><td><strong>Predicted Positive<\/strong><\/td><td><strong>Predicted Negative<\/strong><\/td><\/tr><tr><td><strong>Actual Positive<\/strong><\/td><td>True Positive (TP)<\/td><td>False Negative (FN)<\/td><\/tr><tr><td><strong>Actual Negative<\/strong><\/td><td>False Positive (FP)<\/td><td>True Negative (TN)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"understanding-the-components\"><strong>Understanding the Components<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>True Positive (TP)<\/strong>: Correctly predicted positive instances.<\/li>\n\n\n\n<li><strong>True Negative (TN)<\/strong>: Correctly predicted negative instances.<\/li>\n\n\n\n<li><strong>False Positive (FP)<\/strong>: Incorrectly predicted as positive when negative.<\/li>\n\n\n\n<li><strong>False Negative (FN)<\/strong>: Incorrectly predicted as negative when positive.<\/li>\n<\/ul>\n\n\n\n<p>These components are essential for calculating various performance metrics:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"calculating-key-metrics\"><strong>Calculating Key Metrics<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Accuracy<\/strong>: Measures the overall correctness of the model.<br><strong>Formula<\/strong>: Accuracy = (TP + TN) \/ (TP + TN + FP + FN)<\/li>\n\n\n\n<li><strong>Precision<\/strong>: Indicates the accuracy of optimistic predictions.<br><strong>Formula<\/strong>: Precision = TP \/ (TP + FP)<\/li>\n\n\n\n<li><strong>Recall (Sensitivity)<\/strong>: Measures the model's ability to identify all positive instances.<br><strong>Formula<\/strong>: Recall = TP \/ (TP + FN)<\/li>\n\n\n\n<li><strong>F1 Score<\/strong>: Harmonic mean of precision and recall, balancing the two.<br><strong>Formula<\/strong>: F1 Score = 2 * (Precision * Recall) \/ (Precision + Recall)<\/li>\n<\/ul>\n\n\n\n<p>These calculated metrics of the confusion matrix enable the performance of various classification models to be evaluated and optimized with respect to the goal at hand.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"f1-score-the-harmonic-mean-of-precision-and-recall\"><strong>F1 Score: The Harmonic Mean of Precision and Recall<\/strong><\/h2>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"definition-and-formula\"><strong>Definition and Formula:<\/strong><\/h4>\n\n\n\n<p>The F1 Score is the mean F1 score of Precision and Recall. It gives a single value of how good (or bad) a model is since it considers both the false positives and negatives.<\/p>\n\n\n<figure class=\"wp-block-image aligncenter size-large zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/pre-reca-harm.webp\"><img decoding=\"async\" width=\"1024\" height=\"683\" src=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/pre-reca-harm-1024x683.webp\" alt=\"Harmonic Mean of Precision and Recall\" class=\"wp-image-107306\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/pre-reca-harm-1024x683.webp 1024w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/pre-reca-harm-300x200.webp 300w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/pre-reca-harm-768x512.webp 768w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/pre-reca-harm-150x100.webp 150w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/pre-reca-harm.webp 1536w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"why-the-harmonic-mean-is-used\"><strong>Why the Harmonic Mean is Used:<\/strong><\/h4>\n\n\n\n<p>The harmonic mean is used instead of the arithmetic mean because the approximate value assigns a higher weight to the smaller of the two (Precision or Recall). This ensures that if one of them is low, the F1 score will be significantly affected, emphasizing the relatively equal importance of the two measures.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"range-of-f1-score\"><strong>Range of F1 Score:<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>0 to 1<\/strong>: The F1 score ranges from 0 (worst) to 1 (best).\n<ul class=\"wp-block-list\">\n<li><strong>1<\/strong>: Perfect precision and recall.<\/li>\n\n\n\n<li><strong>0<\/strong>: Either precision or recall is 0, indicating poor performance.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"example-calculation\"><strong>Example Calculation:<\/strong><\/h4>\n\n\n\n<p>Given a confusion matrix with:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>TP = 50<\/strong>, <strong>FP = 10<\/strong>, <strong>FN = 5<\/strong><\/li>\n\n\n\n<li><strong>Precision<\/strong> = 5050+10=0.833\\frac{50}{50 + 10} = 0.83350+1050\u200b=0.833<\/li>\n\n\n\n<li><strong>Recall<\/strong> = 5050+5=0.909\\frac{50}{50 + 5} = 0.90950+550\u200b=0.909<\/li>\n<\/ul>\n\n\n\n<p>Therefore, when calculating the F1 Score according to the above formula, the F1 Score will be 0.869. It is at a reasonable level because it has a brilliant balance between precision and recall.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"comparing-metrics-when-to-use-f1-score-over-accuracy\">Comparing Metrics: When to Use F1 Score Over Accuracy<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"when-to-use-f1-score\">When to Use F1 Score?<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Imbalanced Datasets:<\/strong><\/li>\n<\/ol>\n\n\n\n<p>It is more appropriate to use the F1 score when the classes are imbalanced in the dataset (Fraud detection, Disease diagnosis). In such situations, accuracy is quite deceptive, as a model that may have high accuracy due to correctly classifying most of the majority class data may have low accuracy on the minority class data.<\/p>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Reducing Both the Number of True Positives and True Negatives<\/strong><\/li>\n<\/ol>\n\n\n\n<p>F1 score is most suitable when both the empirical risks of false positives, also called Type I errors, and false negatives, also known as Type II errors, are costly. For example, whether false positive or false negative cases happen is nearly equally crucial in medical testing or spam detection.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"how-f1-score-balances-precision-and-recall\">How F1 Score Balances Precision and Recall:<\/h3>\n\n\n\n<p>The F1 Score is the \u2018right\u2019 measure, combining precision (how many of these cases were correctly identified) and recall (how many were accurately predicted as positive cases).<\/p>\n\n\n\n<p>This is because when one of the measurements is low, the F1 score reduces this value, so the model retains a good average.&nbsp;<\/p>\n\n\n\n<p>This is especially the case in those problems where it is unadvisable to have a shallow performance in both objectives, and this can be seen in many necessary fields.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"use-cases-where-f1-score-is-preferred\">Use Cases Where F1 Score is Preferred:<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"1-medical-diagnosis\">1. Medical Diagnosis<\/h4>\n\n\n\n<p>For something like cancer, we want a test that is unlikely to miss the cancer patient but will not misidentify a healthy individual as positive either. To some extent, the F1 score helps maintain both types of errors when used.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"2-fraud-detection\">2. Fraud Detection<\/h4>\n\n\n\n<p>In financial transaction processing, fraud detection models must detect or identify fraudulent transactions (High recall) while simultaneously identifying and labeling an excessive number of genuine transactions as fraudulent (High precision). The F1 score ensures this balance.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"when-is-accuracy-sufficient\">When Is Accuracy Sufficient?<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Balanced Datasets<\/strong><\/li>\n<\/ol>\n\n\n\n<p>Specifically, when the classes in the data set are balanced, accuracy is usually a reasonable rate to measure the model's performance since a good model is expected to bring out reasonable predictions for both classes.<\/p>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Low Impact of False Positives\/Negatives<\/strong><\/li>\n<\/ol>\n\n\n\n<p>High levels of false positives and negatives may not be a considerable issue in some cases, making accuracy a good measure for the model.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"key-takeaway\">Key Takeaway<\/h3>\n\n\n\n<p>F1 Score should be used when the data is imbalanced, false positive and false negative detection are equally important, and in high-risk areas such as medical diagnosis, fraud detection, etc.<\/p>\n\n\n\n<p>Use accuracy when the classes are balanced, and false negatives and positives are not a big issue with the test outcome.<\/p>\n\n\n\n<p>As the F1 Score considers both precision and recall, it can be convenient in tasks where the cost of mistakes can be significant.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"interpreting-the-f1-score-in-practice\">Interpreting the F1 Score in Practice<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"what-constitutes-a-good-f1-score\">What Constitutes a \"Good\" F1 Score?<\/h3>\n\n\n\n<p>The values of the F1 score vary according to the context and category in a particular application.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>High F1 Score (0.8\u20131.0): <\/strong>Signifies good model conditions concerning the precision and recall value of the model.<\/li>\n\n\n\n<li><strong>Moderate F1 Score (0.6\u20130.8):<\/strong> Assertively and positively recommends better performance, but provides recommendations showing ample space that needs to be covered.<\/li>\n\n\n\n<li><strong>Low F1 Score (&lt;0.6): <\/strong>Weak signal that shows that there is a lot to improve in the model.<\/li>\n<\/ul>\n\n\n\n<p>Sometimes, like in diagnostics or handling fraud cases, even an F1 metrics score can be too high or moderate, and higher scores are preferable.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"using-f1-score-for-model-selection-and-tuning\">Using F1 Score for Model Selection and Tuning<\/h3>\n\n\n\n<p>The F1 score is instrumental in:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Comparing Models: <\/strong>It offers an objective and fair measure for evaluation, especially when compared to cases of class imbalance.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Hyperparameter Tuning:<\/strong> This can be accomplished by changing the default values of a single parameter to increase the F1 measure of the model.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Threshold Adjustment: <\/strong>Adjustable thresholds for different CPU decisions can be used to control the precision and size of the relevant information set and, therefore, increase the F1 score.<\/li>\n<\/ul>\n\n\n\n<p>For example, we can apply cross-validation to fine-tune the hyperparameters to obtain the highest F1 score, or use the random or grid search techniques.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"macro-micro-and-weighted-f1-scores-for-multi-class-problems\"><strong>Macro, Micro, and Weighted F1 Scores for Multi-Class Problems<\/strong><\/h4>\n\n\n\n<p>In multi-class classification, averaging methods are used to compute the F1 score across multiple classes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Macro F1 Score:<\/strong> It first measures the F1 score for each class and then takes the average of the scores. Since it destroys all classes irrespective of how often they occur, this treats them equally.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Micro F1 Score: <\/strong>Combines the results obtained in all classes to obtain the F1 average score. This certainly positions the frequent classes on a higher scale than other classes with lower student attendance.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Weighted F1 Score: <\/strong>The average of the F1 score of each class is calculated using the formula F1 = 2 (precision x recall) \/ (precision + recall) for each class, with an additional weighting for several true positives. This addresses class imbalance by assigning extra weights to more populated classes in the dataset.<\/li>\n<\/ul>\n\n\n\n<p>The selection of the averaging method is based on the standards of the specific application and the nature of the data used.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>The <strong>F1 Score<\/strong> is a crucial metric in machine learning, especially when dealing with imbalanced datasets or when false positives and negatives carry significant consequences. Its ability to balance precision and recall makes it indispensable in medical diagnostics and fraud detection.<\/p>\n\n\n\n<p>The<a href=\"https:\/\/idss-gl.mit.edu\/mit-idss-data-science-machine-learning-online-program\"> MIT IDSS Data Science and Machine Learning<\/a> program offers comprehensive training for professionals to deepen their understanding of such metrics and their applications.\u00a0<\/p>\n\n\n\n<p>This 12-week online course, developed by MIT faculty, covers essential topics including <a href=\"https:\/\/www.mygreatlearning.com\/blog\/guide-to-predictive-analytics-definition-core-concepts-tools-and-use-cases\/\">predictive analytics<\/a>, model evaluation, and real-world case studies, equipping participants with the skills to make informed, data-driven decisions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will discuss the F1 Score, how it is obtained through its formula, the balance between its two metrics, precision and recall, and how the F1 Score relates to the accuracy measure.<\/p>\n","protected":false},"author":41,"featured_media":107304,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[2],"tags":[36799],"content_type":[],"class_list":["post-107303","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-artificial-intelligence","tag-machine-learning"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>F1 Score in Machine Learning: Formula, Precision and Recall<\/title>\n<meta name=\"description\" content=\"Understand the F1 Score in machine learning! Learn its formula, relationship to precision and recall, and how it differs from accuracy for evaluating model performance.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mygreatlearning.com\/blog\/f1-score-in-machine-learning\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"F1 Score in Machine Learning: Formula, Precision and Recall\" \/>\n<meta property=\"og:description\" content=\"Understand the F1 Score in machine learning! Learn its formula, relationship to precision and recall, and how it differs from accuracy for evaluating model performance.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mygreatlearning.com\/blog\/f1-score-in-machine-learning\/\" \/>\n<meta property=\"og:site_name\" content=\"Great Learning Blog: Free Resources what Matters to shape your Career!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GreatLearningOfficial\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-08T17:46:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-08T19:59:44+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/f1-score.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Great Learning Editorial Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/Great_Learning\" \/>\n<meta name=\"twitter:site\" content=\"@Great_Learning\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Great Learning Editorial Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/f1-score-in-machine-learning\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/f1-score-in-machine-learning\\\/\"},\"author\":{\"name\":\"Great Learning Editorial Team\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\"},\"headline\":\"F1 Score in Machine Learning: Formula, Precision and Recall\",\"datePublished\":\"2025-05-08T17:46:00+00:00\",\"dateModified\":\"2025-05-08T19:59:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/f1-score-in-machine-learning\\\/\"},\"wordCount\":1834,\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/f1-score-in-machine-learning\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/f1-score.jpg\",\"keywords\":[\"Machine Learning\"],\"articleSection\":[\"AI and Machine Learning\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/f1-score-in-machine-learning\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/f1-score-in-machine-learning\\\/\",\"name\":\"F1 Score in Machine Learning: Formula, Precision and Recall\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/f1-score-in-machine-learning\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/f1-score-in-machine-learning\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/f1-score.jpg\",\"datePublished\":\"2025-05-08T17:46:00+00:00\",\"dateModified\":\"2025-05-08T19:59:44+00:00\",\"description\":\"Understand the F1 Score in machine learning! Learn its formula, relationship to precision and recall, and how it differs from accuracy for evaluating model performance.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/f1-score-in-machine-learning\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/f1-score-in-machine-learning\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/f1-score-in-machine-learning\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/f1-score.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/f1-score.jpg\",\"width\":1200,\"height\":628,\"caption\":\"F1 Score\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/f1-score-in-machine-learning\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI and Machine Learning\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/artificial-intelligence\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"F1 Score in Machine Learning: Formula, Precision and Recall\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"name\":\"Great Learning Blog\",\"description\":\"Learn, Upskill &amp; Career Development Guide and Resources\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"alternateName\":\"Great Learning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\",\"name\":\"Great Learning\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"width\":900,\"height\":900,\"caption\":\"Great Learning\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/GreatLearningOfficial\\\/\",\"https:\\\/\\\/x.com\\\/Great_Learning\",\"https:\\\/\\\/www.instagram.com\\\/greatlearningofficial\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/in.pinterest.com\\\/greatlearning12\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/beaconelearning\\\/\"],\"description\":\"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.\",\"email\":\"info@mygreatlearning.com\",\"legalName\":\"Great Learning Education Services Pvt. Ltd\",\"foundingDate\":\"2013-11-29\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"1001\",\"maxValue\":\"5000\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\",\"name\":\"Great Learning Editorial Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"caption\":\"Great Learning Editorial Team\"},\"description\":\"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.\",\"sameAs\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/\",\"https:\\\/\\\/in.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/Great_Learning\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCObs0kLIrDjX2LLSybqNaEA\"],\"award\":[\"Best EdTech Company of the Year 2024\",\"Education Economictimes Outstanding Education\\\/Edtech Solution Provider of the Year 2024\",\"Leading E-learning Platform 2024\"],\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/author\\\/greatlearning\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"F1 Score in Machine Learning: Formula, Precision and Recall","description":"Understand the F1 Score in machine learning! Learn its formula, relationship to precision and recall, and how it differs from accuracy for evaluating model performance.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mygreatlearning.com\/blog\/f1-score-in-machine-learning\/","og_locale":"en_US","og_type":"article","og_title":"F1 Score in Machine Learning: Formula, Precision and Recall","og_description":"Understand the F1 Score in machine learning! Learn its formula, relationship to precision and recall, and how it differs from accuracy for evaluating model performance.","og_url":"https:\/\/www.mygreatlearning.com\/blog\/f1-score-in-machine-learning\/","og_site_name":"Great Learning Blog: Free Resources what Matters to shape your Career!","article_publisher":"https:\/\/www.facebook.com\/GreatLearningOfficial\/","article_published_time":"2025-05-08T17:46:00+00:00","article_modified_time":"2025-05-08T19:59:44+00:00","og_image":[{"width":1200,"height":628,"url":"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/f1-score.jpg","type":"image\/jpeg"}],"author":"Great Learning Editorial Team","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/Great_Learning","twitter_site":"@Great_Learning","twitter_misc":{"Written by":"Great Learning Editorial Team","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mygreatlearning.com\/blog\/f1-score-in-machine-learning\/#article","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/f1-score-in-machine-learning\/"},"author":{"name":"Great Learning Editorial Team","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad"},"headline":"F1 Score in Machine Learning: Formula, Precision and Recall","datePublished":"2025-05-08T17:46:00+00:00","dateModified":"2025-05-08T19:59:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/f1-score-in-machine-learning\/"},"wordCount":1834,"publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/f1-score-in-machine-learning\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/f1-score.jpg","keywords":["Machine Learning"],"articleSection":["AI and Machine Learning"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.mygreatlearning.com\/blog\/f1-score-in-machine-learning\/","url":"https:\/\/www.mygreatlearning.com\/blog\/f1-score-in-machine-learning\/","name":"F1 Score in Machine Learning: Formula, Precision and Recall","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/f1-score-in-machine-learning\/#primaryimage"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/f1-score-in-machine-learning\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/f1-score.jpg","datePublished":"2025-05-08T17:46:00+00:00","dateModified":"2025-05-08T19:59:44+00:00","description":"Understand the F1 Score in machine learning! Learn its formula, relationship to precision and recall, and how it differs from accuracy for evaluating model performance.","breadcrumb":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/f1-score-in-machine-learning\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mygreatlearning.com\/blog\/f1-score-in-machine-learning\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/f1-score-in-machine-learning\/#primaryimage","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/f1-score.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/f1-score.jpg","width":1200,"height":628,"caption":"F1 Score"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mygreatlearning.com\/blog\/f1-score-in-machine-learning\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/www.mygreatlearning.com\/blog\/"},{"@type":"ListItem","position":2,"name":"AI and Machine Learning","item":"https:\/\/www.mygreatlearning.com\/blog\/artificial-intelligence\/"},{"@type":"ListItem","position":3,"name":"F1 Score in Machine Learning: Formula, Precision and Recall"}]},{"@type":"WebSite","@id":"https:\/\/www.mygreatlearning.com\/blog\/#website","url":"https:\/\/www.mygreatlearning.com\/blog\/","name":"Great Learning Blog","description":"Learn, Upskill &amp; Career Development Guide and Resources","publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"alternateName":"Great Learning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mygreatlearning.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization","name":"Great Learning","url":"https:\/\/www.mygreatlearning.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","width":900,"height":900,"caption":"Great Learning"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/GreatLearningOfficial\/","https:\/\/x.com\/Great_Learning","https:\/\/www.instagram.com\/greatlearningofficial\/","https:\/\/www.linkedin.com\/school\/great-learning\/","https:\/\/in.pinterest.com\/greatlearning12\/","https:\/\/www.youtube.com\/user\/beaconelearning\/"],"description":"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.","email":"info@mygreatlearning.com","legalName":"Great Learning Education Services Pvt. Ltd","foundingDate":"2013-11-29","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"1001","maxValue":"5000"}},{"@type":"Person","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad","name":"Great Learning Editorial Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","caption":"Great Learning Editorial Team"},"description":"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.","sameAs":["https:\/\/www.mygreatlearning.com\/","https:\/\/in.linkedin.com\/school\/great-learning\/","https:\/\/x.com\/https:\/\/twitter.com\/Great_Learning","https:\/\/www.youtube.com\/channel\/UCObs0kLIrDjX2LLSybqNaEA"],"award":["Best EdTech Company of the Year 2024","Education Economictimes Outstanding Education\/Edtech Solution Provider of the Year 2024","Leading E-learning Platform 2024"],"url":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"}]}},"uagb_featured_image_src":{"full":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/f1-score.jpg",1200,628,false],"thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/f1-score-150x150.jpg",150,150,true],"medium":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/f1-score-300x157.jpg",300,157,true],"medium_large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/f1-score-768x402.jpg",768,402,true],"large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/f1-score-1024x536.jpg",1024,536,true],"1536x1536":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/f1-score.jpg",1200,628,false],"2048x2048":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/f1-score.jpg",1200,628,false],"web-stories-poster-portrait":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/f1-score-640x628.jpg",640,628,true],"web-stories-publisher-logo":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/f1-score-96x96.jpg",96,96,true],"web-stories-thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/05\/f1-score-150x79.jpg",150,79,true]},"uagb_author_info":{"display_name":"Great Learning Editorial Team","author_link":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"},"uagb_comment_info":0,"uagb_excerpt":"In this article, we will discuss the F1 Score, how it is obtained through its formula, the balance between its two metrics, precision and recall, and how the F1 Score relates to the accuracy measure.","_links":{"self":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/107303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/comments?post=107303"}],"version-history":[{"count":2,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/107303\/revisions"}],"predecessor-version":[{"id":107309,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/107303\/revisions\/107309"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media\/107304"}],"wp:attachment":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media?parent=107303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/categories?post=107303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/tags?post=107303"},{"taxonomy":"content_type","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/content_type?post=107303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}