{"id":1532,"date":"2019-09-29T02:51:23","date_gmt":"2019-09-29T02:51:23","guid":{"rendered":"https:\/\/mribeirodantas.xyz\/blog\/?p=1532"},"modified":"2019-10-09T19:17:05","modified_gmt":"2019-10-09T19:17:05","slug":"how-can-i-evaluate-my-model-part-i","status":"publish","type":"post","link":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/","title":{"rendered":"How can I evaluate my model? Part I."},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\"><b>Reading time: <\/span> <span class=\"rt-time\"> 8<\/span> <span class=\"rt-label rt-postfix\">minutes<\/b><\/span><\/span>\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"1120\" data-attachment-id=\"1811\" data-permalink=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/rbsl\/\" data-orig-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/10\/rbsl.png?fit=1920%2C1120&amp;ssl=1\" data-orig-size=\"1920,1120\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"rbsl\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/10\/rbsl.png?fit=300%2C175&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/10\/rbsl.png?fit=640%2C373&amp;ssl=1\" src=\"https:\/\/i1.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/10\/rbsl.png?fit=1024%2C597&amp;ssl=1\" alt=\"\" class=\"wp-image-1811\" srcset=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/10\/rbsl.png?w=1920&amp;ssl=1 1920w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/10\/rbsl.png?resize=300%2C175&amp;ssl=1 300w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/10\/rbsl.png?resize=768%2C448&amp;ssl=1 768w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/10\/rbsl.png?resize=1024%2C597&amp;ssl=1 1024w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/10\/rbsl.png?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption>Source of image: <a href=\"https:\/\/fr.unesco.org\/youth\/toptips\/planner\/monitoring\">here<\/a>.<\/figcaption><\/figure>\n\n\n\n<p>One way to evaluate your model is in terms of error types. Let&#8217;s consider a scenario where you live in a city where it rains every once in a while. If you guessed that it would rain this morning, but it did not, your guess was a false positive, sometimes abbreviated as FP. If you said it would not rain, but it did, then you had a false negative (FN). Raining when you do not have an umbrella may be annoying, but life is not always that bad. You could have predicted that it would rain and it did (true positive, TP) or predicted that it would not rain and it did not (true negative, TN). In this example, it&#8217;s easy to see that in some contexts one error may be worse than the other and this will vary according to the problem. Bringing an umbrella with you in a day with no rain is not as bad as not bringing an umbrella on a rainy day, right?<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>It doesn&#8217;t really make sense to say that a true negative or a true positive is an error. That&#8217;s why we only have <a href=\"https:\/\/en.wikipedia.org\/wiki\/Type_I_and_type_II_errors\">two error types<\/a>. Error Type I occurs when you predicted that an event would occur but it did not (false positive, FP) and Error Type II occurs when you predicted that one event would not occur but it did occur (false negative, FN).<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"3105\" height=\"540\" data-attachment-id=\"1548\" data-permalink=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/table1\/\" data-orig-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/table1.png?fit=3105%2C540&amp;ssl=1\" data-orig-size=\"3105,540\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"table1\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/table1.png?fit=300%2C52&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/table1.png?fit=640%2C111&amp;ssl=1\" src=\"https:\/\/i1.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/table1.png?fit=1024%2C178&amp;ssl=1\" alt=\"\" class=\"wp-image-1548\" srcset=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/table1.png?w=3105&amp;ssl=1 3105w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/table1.png?resize=300%2C52&amp;ssl=1 300w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/table1.png?resize=768%2C134&amp;ssl=1 768w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/table1.png?resize=1024%2C178&amp;ssl=1 1024w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/table1.png?w=1280&amp;ssl=1 1280w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/table1.png?w=1920&amp;ssl=1 1920w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption>Possible outcomes organized as a true positive, a false negative, a false positive and a true negative outcome. Error types I and II are highlighted in red.<\/figcaption><\/figure><\/div>\n\n\n\n<p>It may be that one of your goals, when you are creating a model, is to lower the error type I or error type II, depending on what you&#8217;re trying to do. If this is the case, you will probably analyze your predictions in terms of recall, precision and other equations that make use of these two. Before telling you what recall and precision are, I will show you how they&#8217;re defined (equation images generated with <a href=\"https:\/\/www.codecogs.com\/latex\/eqneditor.php?lang=pt-br\">codecogs equation editor<\/a>):<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"188\" height=\"107\" data-attachment-id=\"1550\" data-permalink=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/codecogseqn-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/CodeCogsEqn-1.gif?fit=188%2C107&amp;ssl=1\" data-orig-size=\"188,107\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"CodeCogsEqn\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/CodeCogsEqn-1.gif?fit=188%2C107&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/CodeCogsEqn-1.gif?fit=188%2C107&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/CodeCogsEqn-1.gif?resize=188%2C107&#038;ssl=1\" alt=\"\" class=\"wp-image-1550\"\/><\/figure><\/div>\n\n\n\n<p>Since I work with <a href=\"http:\/\/kinefold.curie.fr\/isambertlab\/research_network_reconstruction.htm\">network discovery<\/a>, and I think it&#8217;s easier to teach this by thinking on networks, from now on the examples will be illustrated by networks. The basic terminology in graph theory, having in mind what will be discussed here, is comprised of: nodes (represented here with a circle and an identifier inside it, meaning a property of your model) and edges (lines that represent an association of some kind between two nodes). One example of a network can be seen below:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"480\" height=\"480\" data-attachment-id=\"1559\" data-permalink=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/alarm\/\" data-orig-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/alarm.png?fit=480%2C480&amp;ssl=1\" data-orig-size=\"480,480\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"alarm\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/alarm.png?fit=300%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/alarm.png?fit=480%2C480&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/alarm.png?resize=480%2C480&#038;ssl=1\" alt=\"\" class=\"wp-image-1559\" srcset=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/alarm.png?w=480&amp;ssl=1 480w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/alarm.png?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/alarm.png?resize=300%2C300&amp;ssl=1 300w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><figcaption>The alarm dataset (A Logical Alarm Reduction Mechanism) is designed to provide an alarm message system for patient monitoring and contains 37 variables. The network image and meta information were retrieved from <a href=\"http:\/\/www.bnlearn.com\/bnrepository\/discrete-medium.html#alarm\">here<\/a> and <a href=\"http:\/\/www.bnlearn.com\/documentation\/man\/alarm.html\">here<\/a>.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Recall<\/h2>\n\n\n\n<p>Recall, also known as <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/Sensitivity_and_specificity\" target=\"_blank\">sensitivity<\/a>, is the measure of how many positive results (TP) your model was able to recover, not worrying about false positives (FP). Here, it&#8217;s better to bring an edge (even if it does not exist) than to not bring one a tall. If you have correctly inferred one edge, as long as you do not make a false negative mistake (saying there is no edge where in reality there is one) you will obtain the maximum recall, which is 1. As you can see here, recall is penalized by false negative results. If error type II is worse than error type I for your problem, recall may be what you&#8217;re looking for.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1337\" height=\"753\" data-attachment-id=\"1554\" data-permalink=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/recall_network\/\" data-orig-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/recall_network.png?fit=1337%2C753&amp;ssl=1\" data-orig-size=\"1337,753\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"recall_network\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/recall_network.png?fit=300%2C169&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/recall_network.png?fit=640%2C361&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/recall_network.png?fit=1024%2C577&amp;ssl=1\" alt=\"\" class=\"wp-image-1554\" srcset=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/recall_network.png?w=1337&amp;ssl=1 1337w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/recall_network.png?resize=300%2C169&amp;ssl=1 300w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/recall_network.png?resize=768%2C433&amp;ssl=1 768w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/recall_network.png?resize=1024%2C577&amp;ssl=1 1024w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/recall_network.png?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"343\" height=\"23\" data-attachment-id=\"1556\" data-permalink=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/recnetwork_eq\/\" data-orig-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/recnetwork_eq-e1567008803427.gif?fit=343%2C23&amp;ssl=1\" data-orig-size=\"343,23\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"recnetwork_eq\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/recnetwork_eq-e1567008803427.gif?fit=300%2C20&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/recnetwork_eq-e1567008803427.gif?fit=343%2C23&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/recnetwork_eq-e1567008803427.gif?resize=343%2C23&#038;ssl=1\" alt=\"\" class=\"wp-image-1556\"\/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Precision<\/h2>\n\n\n\n<p>Precision, also known as the <a rel=\"noreferrer noopener\" aria-label=\"positive predictive value (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/Positive_and_negative_predictive_values\" target=\"_blank\">positive predictive value<\/a> (PPV), is the measure of how many positive results (TP) your model was able to recover, with an effort to <strong>not<\/strong> bring false positives. Here, it&#8217;s better to not bring an edge (even if it exists) than to bring an edge at all. If you have correctly inferred one edge, as long as you do not have any false positive mistake (saying there is an edge where in reality there is none) you will obtain the maximum precision, which is 1. As you can also see here, precision is penalized by false positive results. If error type I is worse than error type II for your problem, precision may be what you&#8217;re looking for.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1354\" height=\"731\" data-attachment-id=\"1555\" data-permalink=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/precision_network\/\" data-orig-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/precision_network.png?fit=1354%2C731&amp;ssl=1\" data-orig-size=\"1354,731\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"precision_network\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/precision_network.png?fit=300%2C162&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/precision_network.png?fit=640%2C346&amp;ssl=1\" src=\"https:\/\/i1.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/precision_network.png?fit=1024%2C553&amp;ssl=1\" alt=\"\" class=\"wp-image-1555\" srcset=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/precision_network.png?w=1354&amp;ssl=1 1354w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/precision_network.png?resize=300%2C162&amp;ssl=1 300w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/precision_network.png?resize=768%2C415&amp;ssl=1 768w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/precision_network.png?resize=1024%2C553&amp;ssl=1 1024w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/precision_network.png?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"348\" height=\"24\" data-attachment-id=\"1557\" data-permalink=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/precnetwork_eq\/\" data-orig-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/precnetwork_eq-e1567009088745.gif?fit=348%2C24&amp;ssl=1\" data-orig-size=\"348,24\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"precnetwork_eq\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/precnetwork_eq-e1567009088745.gif?fit=300%2C21&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/precnetwork_eq-e1567009088745.gif?fit=348%2C24&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/precnetwork_eq-e1567009088745.gif?resize=348%2C24&#038;ssl=1\" alt=\"\" class=\"wp-image-1557\"\/><\/figure><\/div>\n\n\n\n<p>You may have noticed that in both descriptions I mentioned the same idea: <em>as long as you have inferred at least one correct edge<\/em>. If this is not clear for you, have a look at the definitions of recall and precision again. There, you have the true positive, TP, in both the numerator and denominator. So if FN or FP is 0, as long as TP=1 you have 1\/1 = 1, either for recall or precision.<\/p>\n\n\n\n<p>If you do not have any true positive and you did not draw an edge that should be there (FN=1, for example), then you have:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"344\" height=\"20\" data-attachment-id=\"1551\" data-permalink=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/recall0\/\" data-orig-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/recall0.gif?fit=344%2C20&amp;ssl=1\" data-orig-size=\"344,20\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"recall0\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/recall0.gif?fit=300%2C17&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/recall0.gif?fit=344%2C20&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/recall0.gif?resize=344%2C20&#038;ssl=1\" alt=\"\" class=\"wp-image-1551\"\/><\/figure><\/div>\n\n\n\n<p>If you do not have any true positive and you drew an edge that should not be there (FP=1, for example), then you have:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"349\" height=\"19\" data-attachment-id=\"1552\" data-permalink=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/prec0\/\" data-orig-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/prec0.gif?fit=349%2C19&amp;ssl=1\" data-orig-size=\"349,19\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"prec0\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/prec0.gif?fit=300%2C16&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/prec0.gif?fit=349%2C19&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/prec0.gif?resize=349%2C19&#038;ssl=1\" alt=\"\" class=\"wp-image-1552\"\/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Specificity<\/h2>\n\n\n\n<p>Specificity is also known as the true negative rate (TNR). It measures the proportion of actual negatives that are correctly identified as such (e.g., the percentage of edges that are missing and indeed should not be in our model). If the last thing you want is to <strong>not<\/strong> bring edges that are not real to your model, you should keep your eyes open for specificity.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ROC Curve<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>The <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/Receiver_operating_characteristic\" target=\"_blank\">receiver operating characteristic curve<\/a>, or ROC curve, is a&nbsp;<a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/Graph_of_a_function\" target=\"_blank\">graphical plot<\/a>&nbsp;that illustrates the diagnostic ability of a&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Binary_classifier\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">binary classifier<\/a>&nbsp;system as its discrimination threshold is varied.<\/p><cite>Wikipedia<\/cite><\/blockquote>\n\n\n\n<p>In order to work with ROC curves, I must introduce you to the false positive rate and the true positive rate.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"245\" height=\"117\" data-attachment-id=\"1563\" data-permalink=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/tpr_fpr-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/TPR_FPR-1.gif?fit=245%2C117&amp;ssl=1\" data-orig-size=\"245,117\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"TPR_FPR\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/TPR_FPR-1.gif?fit=245%2C117&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/TPR_FPR-1.gif?fit=245%2C117&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/TPR_FPR-1.gif?resize=245%2C117&#038;ssl=1\" alt=\"\" class=\"wp-image-1563\"\/><\/figure><\/div>\n\n\n\n<p>The true positive rate is the probability of detection, while the false positive rate is the probability of false alarm. Your classifier (or classifiers, as there are three in the figure below, for example) will obtain different TPR\/FPR values by changing some parameter or the data you&#8217;re trying to classify. By doing this change and obtaining different TPR\/FPR values, you will be able to obtain the ROC curve. The AUC mentioned in the image is the <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/Receiver_operating_characteristic#Area_under_the_curve\" target=\"_blank\">area under the curve<\/a>. A perfect classifier has always a maximum true positive rate. I don&#8217;t have to tell you what it means if your ROC curve goes below (is worse) the dashed line (classification due to chance), right? I will anyway :-). Points above the diagonal are considered to be good classifications (better than random), while points below the diagonal are considered to be bad classifications (worse than random).<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"434\" height=\"438\" data-attachment-id=\"1561\" data-permalink=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/roc-curve\/\" data-orig-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/ROC-curve.jpg?fit=434%2C438&amp;ssl=1\" data-orig-size=\"434,438\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"ROC-curve\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/ROC-curve.jpg?fit=297%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/ROC-curve.jpg?fit=434%2C438&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/ROC-curve.jpg?resize=434%2C438&#038;ssl=1\" alt=\"\" class=\"wp-image-1561\" srcset=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/ROC-curve.jpg?w=434&amp;ssl=1 434w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/ROC-curve.jpg?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/ROC-curve.jpg?resize=297%2C300&amp;ssl=1 297w\" sizes=\"auto, (max-width: 434px) 100vw, 434px\" \/><figcaption>Example of ROC curve. Source: <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.sciencedirect.com\/topics\/nursing-and-health-professions\/receiver-operating-characteristic\" target=\"_blank\">ScienceDirect<\/a>.<\/figcaption><\/figure><\/div>\n\n\n\n<p>Remember ROC curves are used to diagnose binary classifiers? Since it&#8217;s a binary classifier (TRUE or FALSE, for example), in case you have a terrible classifier, you can simply invert the output and obtain an awesome classifier!<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/media.giphy.com\/media\/GkHJKqIa14mB2\/source.gif?w=640&#038;ssl=1\" alt=\"\"\/><\/figure><\/div>\n\n\n\n<p><em>Wait, Marcel! I do not want to change criteria or my dataset. I just want to run four classifiers in my dataset and see which one is better in terms of TPR and FPR.<\/em><\/p>\n\n\n\n<p>Ok, let&#8217;s say you have four classifiers, A, B, C, and D. You will run each one of them once to your dataset and, thus, you will have 4 points in the ROC plot, instead of four curves. Look at one example below:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1093\" height=\"1094\" data-attachment-id=\"1572\" data-permalink=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/roc_points\/\" data-orig-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/ROC_points.png?fit=1093%2C1094&amp;ssl=1\" data-orig-size=\"1093,1094\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"ROC_points\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/ROC_points.png?fit=300%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/ROC_points.png?fit=640%2C640&amp;ssl=1\" src=\"https:\/\/i1.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/ROC_points.png?fit=1024%2C1024&amp;ssl=1\" alt=\"\" class=\"wp-image-1572\" srcset=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/ROC_points.png?w=1093&amp;ssl=1 1093w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/ROC_points.png?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/ROC_points.png?resize=300%2C300&amp;ssl=1 300w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/ROC_points.png?resize=768%2C769&amp;ssl=1 768w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/ROC_points.png?resize=1024%2C1024&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption>Source: <a href=\"https:\/\/en.wikipedia.org\/wiki\/Receiver_operating_characteristic#ROC_space\">Wikipedia<\/a>.<\/figcaption><\/figure>\n\n\n\n<p>This plot shows us that C&#8217; and A are better than a random guess, B is just like a random guess and C is very bad, worse than a random guess. Can we extract anything else, just by looking at the plot? Well, C has a very low TPR, so very few sick patients were correctly classified as sick. Besides, it has a very high FPR, which means a lot of healthy patients were incorrectly classified as sick. Yeah, this is not a good classifier :-(.<\/p>\n\n\n\n<p>In other texts, you will probably see such rates explained in terms of cases. If in your dataset (40 rows) you have 30 rows (patients) that are sick and your classifier was able to classify 28 of them as sick, what is your True Positive Rate (TPR)? If 10 are not sick and you said 5 of these 10 are sick instead, what is your False Positive Rate? See the answers below.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"427\" height=\"117\" data-attachment-id=\"1566\" data-permalink=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/tpr_fpr_answers-3\/\" data-orig-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/TPR_FPR_answers-2.gif?fit=427%2C117&amp;ssl=1\" data-orig-size=\"427,117\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"TPR_FPR_answers\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/TPR_FPR_answers-2.gif?fit=300%2C82&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/TPR_FPR_answers-2.gif?fit=427%2C117&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/08\/TPR_FPR_answers-2.gif?resize=427%2C117&#038;ssl=1\" alt=\"\" class=\"wp-image-1566\"\/><\/figure><\/div>\n\n\n\n<p>But our examples here are networks, right? In this case, you know that the real network has 10 edges between certain nodes and by comparing your inferred network to the real network, you see that you were only able to infer 3 edges from those 10 edges in the real network. In this case, your TPR is 3\/10 = 0.3.<\/p>\n\n\n\n<p>Before going on, I will already make it clear here that if avoiding error type I is much more important than avoiding error type II for your situation, analyzing recall or precision isolated may be more interesting. F-score and accuracy, topics I will comment next, try to take both into consideration, in one way or another, so if precision is not very important for you or recall is not very important for you, analyzing one of them in an isolated manner may be what you&#8217;re looking for.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">F-score<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>In&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Statistics\">statistical<\/a>&nbsp;analysis of&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Binary_classification\">binary classification<\/a>, the&nbsp;<strong>F<sub>1<\/sub>&nbsp;score<\/strong>&nbsp;(also&nbsp;<strong>F-score<\/strong>&nbsp;or&nbsp;<strong>F-measure<\/strong>) is a measure of a test&#8217;s accuracy. It considers both the&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Precision_(information_retrieval)\">precision<\/a>&nbsp;<em>p<\/em>&nbsp;and the&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Recall_(information_retrieval)\">recall<\/a>&nbsp;<em>r<\/em>&nbsp;of the test to compute the score [&#8230;] The F<sub>1<\/sub>&nbsp;score is the&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Harmonic_mean\">harmonic mean<\/a>&nbsp;of the&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Precision_and_recall\">precision and recall<\/a>, where an F<sub>1<\/sub>&nbsp;score reaches its best value at 1 (perfect precision and recall) and worst at 0.<\/p><cite>Wikipedia<\/cite><\/blockquote>\n\n\n\n<p>The F-score is defined as:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"433\" height=\"42\" data-attachment-id=\"1749\" data-permalink=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/codecogseqn-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/09\/CodeCogsEqn-1.gif?fit=433%2C42&amp;ssl=1\" data-orig-size=\"433,42\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"CodeCogsEqn (1)\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/09\/CodeCogsEqn-1.gif?fit=300%2C29&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/09\/CodeCogsEqn-1.gif?fit=433%2C42&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/09\/CodeCogsEqn-1.gif?resize=433%2C42&#038;ssl=1\" alt=\"\" class=\"wp-image-1749\"\/><\/figure><\/div>\n\n\n\n<p>As it was mentioned in the definition above and as you can see in the equation expressed above, the F-score is the <a href=\"https:\/\/deepai.org\/machine-learning-glossary-and-terms\/harmonic-mean\">harmonic mean<\/a> of the precision and recall. The harmonic mean is a type of average generally used for numbers that represent a rate or ratio. If you&#8217;re wondering if there is a score using the geometric mean, yes, there is and it&#8217;s called <a href=\"https:\/\/en.wikipedia.org\/wiki\/Fowlkes%E2%80%93Mallows_index\">G-measure<\/a>. You will use F-score when both precision and recall are important for your model. If one of the two is much more important than the other, you should use the specific measure to evaluate your model, as I described previously. There are some good answers <a href=\"https:\/\/www.quora.com\/What-is-an-intuitive-explanation-of-F-score\">here<\/a> on F-score and arithmetic\/geometric\/harmonic mean.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Accuracy<\/h2>\n\n\n\n<p>The accuracy is defined as:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"295\" height=\"43\" data-attachment-id=\"1751\" data-permalink=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/codecogseqn-2-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/09\/CodeCogsEqn-2.gif?fit=295%2C43&amp;ssl=1\" data-orig-size=\"295,43\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"CodeCogsEqn-2\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/09\/CodeCogsEqn-2.gif?fit=295%2C43&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/09\/CodeCogsEqn-2.gif?fit=295%2C43&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/09\/CodeCogsEqn-2.gif?resize=295%2C43&#038;ssl=1\" alt=\"\" class=\"wp-image-1751\"\/><\/figure><\/div>\n\n\n\n<p>If you&#8217;re trying to answer the question &#8220;From all my guesses, how many were right?&#8221;, accuracy is what you&#8217;re looking for. F-Score is preferred if your cost for FN and FP is different (keep in mind that if the cost difference s too big, you&#8217;d rather go with precision or recall alone). Interesting <i><em>takeaways<\/em><\/i> I took from <a href=\"https:\/\/towardsdatascience.com\/accuracy-recall-precision-f-score-specificity-which-to-optimize-on-867d3f11124\">here<\/a> is:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>An accuracy value of 90% means that 1 of every 10 edges is incorrect, and 9 are correct.<\/li><li>A precision value of 80% means that 8 of every 10 edges are indeed there.<\/li><li>A recall value of 70% means that 3 of every 10 edges are missing.<\/li><li>A specificity value of 60% means that 4 of every 10 edges should not be there but 6 are right.<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\"><b>Reading time: <\/span> <span class=\"rt-time\"> 8<\/span> <span class=\"rt-label rt-postfix\">minutes<\/b><\/span><\/span>Do you want to know more about terms such as recall, specificity, sensitivity, precision, f-score, accuracy, ROC, AUC? Come with me! \ud83d\ude09<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[69,3,24],"tags":[],"class_list":["post-1532","post","type-post","status-publish","format-standard","hentry","category-data-science","category-phd","category-r"],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How can I evaluate my model? Part I. - The Dataist Storyteller<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How can I evaluate my model? Part I. - The Dataist Storyteller\" \/>\n<meta property=\"og:description\" content=\"Reading time:  8 minutesDo you want to know more about terms such as recall, specificity, sensitivity, precision, f-score, accuracy, ROC, AUC? Come with me! ;-)\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/\" \/>\n<meta property=\"og:site_name\" content=\"The Dataist Storyteller\" \/>\n<meta property=\"article:published_time\" content=\"2019-09-29T02:51:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-10-09T19:17:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i1.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/10\/rbsl.png?fit=1024%2C597&amp;ssl=1\" \/>\n<meta name=\"author\" content=\"mribeirodantas\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"mribeirodantas\" \/>\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:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/\"},\"author\":{\"name\":\"mribeirodantas\",\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/2856ebf8edffabf1f4bbca59bade5957\"},\"headline\":\"How can I evaluate my model? Part I.\",\"datePublished\":\"2019-09-29T02:51:23+00:00\",\"dateModified\":\"2019-10-09T19:17:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/\"},\"wordCount\":1843,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/2856ebf8edffabf1f4bbca59bade5957\"},\"image\":{\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i1.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/10\/rbsl.png?fit=1024%2C597&amp;ssl=1\",\"articleSection\":[\"Data Science\",\"PhD\",\"R\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/\",\"url\":\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/\",\"name\":\"How can I evaluate my model? Part I. - The Dataist Storyteller\",\"isPartOf\":{\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i1.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/10\/rbsl.png?fit=1024%2C597&amp;ssl=1\",\"datePublished\":\"2019-09-29T02:51:23+00:00\",\"dateModified\":\"2019-10-09T19:17:05+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/#primaryimage\",\"url\":\"https:\/\/i1.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/10\/rbsl.png?fit=1024%2C597&amp;ssl=1\",\"contentUrl\":\"https:\/\/i1.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/10\/rbsl.png?fit=1024%2C597&amp;ssl=1\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/mribeirodantas.xyz\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How can I evaluate my model? Part I.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/#website\",\"url\":\"https:\/\/mribeirodantas.xyz\/blog\/\",\"name\":\"The Dataist Storyteller\",\"description\":\"Telling stories backed by data\",\"publisher\":{\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/2856ebf8edffabf1f4bbca59bade5957\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/mribeirodantas.xyz\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/2856ebf8edffabf1f4bbca59bade5957\",\"name\":\"mribeirodantas\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6687720529e55feab1680cbd98da5c7f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6687720529e55feab1680cbd98da5c7f?s=96&d=mm&r=g\",\"caption\":\"mribeirodantas\"},\"logo\":{\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How can I evaluate my model? Part I. - The Dataist Storyteller","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:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/","og_locale":"en_US","og_type":"article","og_title":"How can I evaluate my model? Part I. - The Dataist Storyteller","og_description":"Reading time:  8 minutesDo you want to know more about terms such as recall, specificity, sensitivity, precision, f-score, accuracy, ROC, AUC? Come with me! ;-)","og_url":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/","og_site_name":"The Dataist Storyteller","article_published_time":"2019-09-29T02:51:23+00:00","article_modified_time":"2019-10-09T19:17:05+00:00","og_image":[{"url":"https:\/\/i1.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/10\/rbsl.png?fit=1024%2C597&amp;ssl=1","type":"","width":"","height":""}],"author":"mribeirodantas","twitter_card":"summary_large_image","twitter_misc":{"Written by":"mribeirodantas","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/#article","isPartOf":{"@id":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/"},"author":{"name":"mribeirodantas","@id":"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/2856ebf8edffabf1f4bbca59bade5957"},"headline":"How can I evaluate my model? Part I.","datePublished":"2019-09-29T02:51:23+00:00","dateModified":"2019-10-09T19:17:05+00:00","mainEntityOfPage":{"@id":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/"},"wordCount":1843,"commentCount":0,"publisher":{"@id":"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/2856ebf8edffabf1f4bbca59bade5957"},"image":{"@id":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/#primaryimage"},"thumbnailUrl":"https:\/\/i1.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/10\/rbsl.png?fit=1024%2C597&amp;ssl=1","articleSection":["Data Science","PhD","R"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/","url":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/","name":"How can I evaluate my model? Part I. - The Dataist Storyteller","isPartOf":{"@id":"https:\/\/mribeirodantas.xyz\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/#primaryimage"},"image":{"@id":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/#primaryimage"},"thumbnailUrl":"https:\/\/i1.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/10\/rbsl.png?fit=1024%2C597&amp;ssl=1","datePublished":"2019-09-29T02:51:23+00:00","dateModified":"2019-10-09T19:17:05+00:00","breadcrumb":{"@id":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/#primaryimage","url":"https:\/\/i1.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/10\/rbsl.png?fit=1024%2C597&amp;ssl=1","contentUrl":"https:\/\/i1.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/10\/rbsl.png?fit=1024%2C597&amp;ssl=1"},{"@type":"BreadcrumbList","@id":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2019\/09\/29\/how-can-i-evaluate-my-model-part-i\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mribeirodantas.xyz\/blog\/"},{"@type":"ListItem","position":2,"name":"How can I evaluate my model? Part I."}]},{"@type":"WebSite","@id":"https:\/\/mribeirodantas.xyz\/blog\/#website","url":"https:\/\/mribeirodantas.xyz\/blog\/","name":"The Dataist Storyteller","description":"Telling stories backed by data","publisher":{"@id":"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/2856ebf8edffabf1f4bbca59bade5957"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mribeirodantas.xyz\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/2856ebf8edffabf1f4bbca59bade5957","name":"mribeirodantas","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6687720529e55feab1680cbd98da5c7f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6687720529e55feab1680cbd98da5c7f?s=96&d=mm&r=g","caption":"mribeirodantas"},"logo":{"@id":"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/image\/"}}]}},"jetpack_featured_media_url":"","uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"mribeirodantas","author_link":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/author\/mribeirodantas\/"},"uagb_comment_info":20,"uagb_excerpt":"Reading time: 8 minutesDo you want to know more about terms such as recall, specificity, sensitivity, precision, f-score, accuracy, ROC, AUC? Come with me! ;-)","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paw9jx-oI","jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1532","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=1532"}],"version-history":[{"count":41,"href":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1532\/revisions"}],"predecessor-version":[{"id":1812,"href":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1532\/revisions\/1812"}],"wp:attachment":[{"href":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1532"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1532"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}