{"id":227,"date":"2017-12-16T21:13:00","date_gmt":"2017-12-16T21:13:00","guid":{"rendered":"https:\/\/kindsonthegenius.com\/blog\/2017\/12\/16\/basics-of-decision-theory-how-medical-diagnosis-apps-work\/"},"modified":"2020-08-23T06:28:42","modified_gmt":"2020-08-23T04:28:42","slug":"basics-of-decision-theory-how-medical-diagnosis-apps-work","status":"publish","type":"post","link":"https:\/\/kindsonthegenius.com\/blog\/basics-of-decision-theory-how-medical-diagnosis-apps-work\/","title":{"rendered":"Basics of Decision Theory &#8211; How Medical Diagnosis Apps Work"},"content":{"rendered":"<p><a href=\"https:\/\/youtu.be\/HSc31v67590\" target=\"_blank\" rel=\"noopener\">Watch the video here. <\/a><br \/>\nIn this lesson we would examine the following topics<\/p>\n<ol>\n<li><a href=\"#t1\">What is Decision Theory<\/a><\/li>\n<li><a href=\"#t2\">Application of Decision Theory in Cancer Diagnosis<\/a><\/li>\n<li><a href=\"#t3\">The Goal of Decision Theory<\/a><\/li>\n<li><a href=\"#t4\">Formal Definition of Decision Theory<\/a><\/li>\n<li><a href=\"#t5\">False Positives and False Negatives<\/a><\/li>\n<li><a href=\"#t6\">Minimizing Misclassification and Reducing Expected Loss<\/a><\/li>\n<li><a href=\"#t7\">Introduction to Receiver Operating Characteristics(ROC) Curve<\/a><\/li>\n<li><a href=\"#t8\">What is Area Under the Curve (ROC)<\/a><\/li>\n<\/ol>\n<p>You may also want to review\u00a0<a href=\"https:\/\/www.kindsonthegenius.com\/basics-of-conditional-probability\/\">The Basics of Conditional Probability<\/a><\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t1\">1. What is Decision Theory?<\/strong><\/h4>\n<p>This is mathematical theory in the field of Machine Learning that allows us to make optimal decisions in situations involving uncertainty.<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/1.bp.blogspot.com\/-klsnS4iBvYc\/WjWLWqouaEI\/AAAAAAAAAgI\/YiJslHQFBcoglgrodaYdmtArT8bH2o1sgCLcBGAs\/s1600\/Decision%2BTheory.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/1.bp.blogspot.com\/-klsnS4iBvYc\/WjWLWqouaEI\/AAAAAAAAAgI\/YiJslHQFBcoglgrodaYdmtArT8bH2o1sgCLcBGAs\/s400\/Decision%2BTheory.jpg\" width=\"400\" height=\"210\" border=\"0\" data-original-height=\"747\" data-original-width=\"1415\" \/><\/a><\/div>\n<p>Decision theory is applied in many areas. For example:<\/p>\n<ul>\n<li>In sports, Goal-Line-Technology uses decision theory to determine if there is a goal or not<\/li>\n<li>In medical diagnoses if a patient has a certain disease<\/li>\n<li>In aviation, used by Auto Pilots in flights to make decisions etc.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t2\">2. Application of Decision Theory in Cancer Diagnosis<\/strong><\/h4>\n<p>Let&#8217;s illustrate decision theory using a medical situation where a physician needs to decide if a patient have cancer or not.<br \/>\nNow the physician request for an X-Ray of the patient so he can examine the film. He would pay attention to the intensity of the pixels in the image. which we would represent a x (input).<br \/>\nHe have to determine an output t which would either be 1 (presence of cancer) or 0 (absence of cancer).<br \/>\nFrom his decision, he would take one of two actions, either perform a surgery, or not to perform a surgery. This is illustrated in the figure below:<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/3.bp.blogspot.com\/-c0ghFgGVzeA\/WjWFZ60au_I\/AAAAAAAAAf4\/UHTBMawlzpckTbwkDbHPQ0PvdgRcJq-qACLcBGAs\/s1600\/Decision-Theory%2B-%2BCancer.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/3.bp.blogspot.com\/-c0ghFgGVzeA\/WjWFZ60au_I\/AAAAAAAAAf4\/UHTBMawlzpckTbwkDbHPQ0PvdgRcJq-qACLcBGAs\/s640\/Decision-Theory%2B-%2BCancer.jpg\" width=\"640\" height=\"288\" border=\"0\" data-original-height=\"532\" data-original-width=\"1182\" \/><\/a><\/div>\n<p><b>Let&#8217;s examine the scenarios<\/b><\/p>\n<p><b><span style=\"color: #274e13;\">Scenario 1<\/span><\/b>: There is presence of cancer and the physician decides to perform a surgery. That is 100% because its the best decision to take.<\/p>\n<p><span style=\"color: #cc0000;\"><b>Scenario 2:<\/b><\/span> There is presence of cancer but the physician decides not to perform a surgery. That is a score of 0 as it is the worst case scenario and of course the consequences would be very serious. This is false negative and must be avoided.<\/p>\n<p><span style=\"color: orange;\"><b>Scenario 3<\/b><\/span>: Cancer is absent but the physician decides to perform a surgery anyway. This is a low score but does not result in any serious consequence. So this is false positive.<\/p>\n<p><span style=\"color: #0b5394;\"><b>Scenario 4:\u00a0<\/b><\/span>Cancer is absent and the physician decides not to perform a surgery. This is a good decision as well.<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t3\">3. The Goal of Decision Theory<\/strong><\/h4>\n<p>So from the figure\u00a0 we can see that the goal of the physician would be to get the highest score possible which is 100% and that is the objective of Decision Theory, to make the most optima decision.<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t4\">4. Formal Definition of Decision Theory<\/strong><\/h4>\n<p>Let&#8217;s not look at a formal definition of Decision Theory and we would pay attention to a few mathematical model, but I would try as much as I can to keep it simple.<\/p>\n<p>Consider that we have an input vector <b>x<\/b><br \/>\nA corresponding vector <b>t<\/b> of the target variables ( which could be 1 or 0)<br \/>\nAnd the two classes C1 and C2 (C1 = presence of cancer, C2 = absence of cancer)<\/p>\n<p>Let t = 1 correspond to class C1 and<br \/>\nt = 0 correspond to class C2<\/p>\n<p>The general inference problem is to determine the joint distribution p(x, Ck). Here k = 1,2. This is the same as as p(x,t). Decision theory is concerned with how to make optimal decisions given the appropriate probabilities.<br \/>\nIn the next article we would go into a more details analysis.<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t5\">5. False Positives and False Negatives<\/strong><\/h4>\n<p>We take example of the cancer diagnosis example.<\/p>\n<p>Let&#8217;s assume that after a test the physician decides that based the diagnosis, cancer is present (that is a positive result is obtained for cancer test). If actually cancer is not present, then this result is known a false positive.<br \/>\nIf on the other hand the doctor determines that there is no cancer(a negative result is obtained) but actually there is cancer, then this result is considered false negative. This could have adverse effects and its occurrence should be minimized to the limit.<\/p>\n<p>One objective of decision theory is to minimize both the false positive rate and the true positive rate.<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t6\">6. Minimizing Misclassification and Reducing Expected Loss<\/strong><\/h4>\n<p>When there is misclassification, a loss is incurred. Take for example, a patient image is classified as having cancer when actually there is not cancer. In this case, the loss would include cost incurred to perform a surgery, and the discomfort the patient experiences.<br \/>\nIn the second case, a patient that actually have cancer is classified as not having cancer. The loss that would in incurred would be much worse as it may cost the life of the patient.<br \/>\nThe aim is first to minimize misclassification and second to ensure that the second type of loss is reduced or eliminated<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t7\">7. What is Receiver Operating Characteristic(ROC) Curve<\/strong><\/h4>\n<p>Receiver operating characteristic curve is a plot showing the diagnostic ability of a binary classifier system as its discrimination threshold is varied.<br \/>\nThe ROC curve is created by plotting the true <strong><em>positive rate(TPR)<\/em><\/strong> against the <strong><em>false positive rate (FPR)<\/em><\/strong> at various threshold settings<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t8\">8. Area Under the Curve(AUC)<\/strong><\/h4>\n<p>The area under the curve\u00a0 is equal to the probability that a classifier will rank a randomly chosen positive instance higher than a randomly chosen negative one. We&#8217;ll discuss this is details in another lesson.<\/p>\n<p>Thank you for reading!<br \/>\nPlease leave a comment to let me know your observations.<\/p>\n<p><ins style=\"display: block; text-align: center;\" data-ad-client=\"ca-pub-7041870931346451\" data-ad-format=\"fluid\" data-ad-layout=\"in-article\" data-ad-slot=\"8227894917\"><\/ins><br \/>\n<ins style=\"display: block; text-align: center;\" data-ad-client=\"ca-pub-7041870931346451\" data-ad-format=\"fluid\" data-ad-layout=\"in-article\" data-ad-slot=\"8227894917\"><\/ins><\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Watch the video here. In this lesson we would examine the following topics What is Decision Theory Application of Decision Theory in Cancer Diagnosis The &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[15,11,16],"tags":[],"_links":{"self":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/227"}],"collection":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/comments?post=227"}],"version-history":[{"count":3,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/227\/revisions"}],"predecessor-version":[{"id":1616,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/227\/revisions\/1616"}],"wp:attachment":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/media?parent=227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/categories?post=227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/tags?post=227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}