{"id":1014,"date":"2020-05-24T04:45:48","date_gmt":"2020-05-24T02:45:48","guid":{"rendered":"https:\/\/kindsonthegenius.com\/blog\/?p=1014"},"modified":"2020-05-31T10:40:07","modified_gmt":"2020-05-31T08:40:07","slug":"basics-of-decision-theory-how-medical-diagnosis-apps-work-2","status":"publish","type":"post","link":"https:\/\/kindsonthegenius.com\/blog\/basics-of-decision-theory-how-medical-diagnosis-apps-work-2\/","title":{"rendered":"Basics of Decision Theory &#8211; How Medical Diagnosis Apps Work"},"content":{"rendered":"<p><a href=\"https:\/\/youtu.be\/HSc31v67590\" data-blogger-escaped-target=\"_blank\">Watch the video here.<\/a><\/p>\n<p>In 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 Defintion 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<h3 id=\"t1\"><b>1. What is Decision Theory?<\/b><\/h3>\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<p class=\"separator\" data-blogger-escaped-style=\"clear: both; text-align: center;\"><a href=\"https:\/\/kindsonthegenius.com\/blog\/wp-content\/uploads\/2020\/05\/Decision-Theory.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-1015\" src=\"https:\/\/kindsonthegenius.com\/blog\/wp-content\/uploads\/2020\/05\/Decision-Theory-300x158.jpg\" alt=\"\" width=\"300\" height=\"158\" srcset=\"https:\/\/kindsonthegenius.com\/blog\/wp-content\/uploads\/2020\/05\/Decision-Theory-300x158.jpg 300w, https:\/\/kindsonthegenius.com\/blog\/wp-content\/uploads\/2020\/05\/Decision-Theory.jpg 400w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h3 id=\"t2\"><b>2. Application of Decistion Theory in Cancer Diagnosis<\/b><\/h3>\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.<\/p>\n<p>Now 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).<\/p>\n<p>He have to determine an output t which would either be 1 (presence of cancer) or 0 (absence of cancer).<\/p>\n<p>From 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<p class=\"separator\" data-blogger-escaped-style=\"clear: both; text-align: center;\"><a href=\"https:\/\/kindsonthegenius.com\/blog\/wp-content\/uploads\/2020\/05\/Decision-Theory-Cancer.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-1016 size-medium\" src=\"https:\/\/kindsonthegenius.com\/blog\/wp-content\/uploads\/2020\/05\/Decision-Theory-Cancer-300x135.jpg\" alt=\"\" width=\"300\" height=\"135\" srcset=\"https:\/\/kindsonthegenius.com\/blog\/wp-content\/uploads\/2020\/05\/Decision-Theory-Cancer-300x135.jpg 300w, https:\/\/kindsonthegenius.com\/blog\/wp-content\/uploads\/2020\/05\/Decision-Theory-Cancer.jpg 640w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><b>Let&#8217;s examine the scenarios<\/b><\/p>\n<p><b><span style=\"color: #274e13;\" data-blogger-escaped-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;\" data-blogger-escaped-style=\"color: #cc0000;\"><b>Scenario 2:<\/b><\/span>\u00a0There 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.<\/p>\n<p><span style=\"color: #ffa500;\" data-blogger-escaped-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<\/p>\n<p><span style=\"color: #0b5394;\" data-blogger-escaped-style=\"color: #0b5394;\"><b>Scenario 4:<\/b>\u00a0<\/span>Cancer is absent and the physician decides not to perform a surgery. This is a good decision as well.<\/p>\n<h3 id=\"t3\"><b>3. The Goal of Decision Theory<\/b><\/h3>\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<h3 id=\"t4\"><b>4. Formal Definition of Decision Theory<\/b><\/h3>\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\u00a0<b>x<\/b><\/p>\n<p>A corresponding vector\u00a0<b>t<\/b>\u00a0of the target variables ( which could be 1 or 0)<\/p>\n<p>And 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<\/p>\n<p>t = 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.<\/p>\n<p>In the next article we would go into a more details analysis.<\/p>\n<h3 id=\"t5\"><b>5. False Positives and False Negatives<\/b><\/h3>\n<p>We take example of the cancer diagnosis example. 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.<\/p>\n<p>If on the other hand the doctor finds out that there is no cancer(a negative result is obtained) and actually there is cancer, then this result is considered false negative.<\/p>\n<p>One objective of decision theory is to minimize both the false positive rate and the true positive rate.<\/p>\n<h3 id=\"t6\"><b>6. Minimizing Misclassification and Reducing Expected Loss<\/b><\/h3>\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.<\/p>\n<p>In 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.<\/p>\n<p>The aim is first to minimize misclassification and second to ensure tha the second type of loss is reduced or eliminated<\/p>\n<h3 id=\"t7\"><b>7. What is Reciever Operating Characteristic(ROC) Curve<\/b><\/h3>\n<p>Receiver operating characteristic curve is a plot showing the diagnostic ability of a binary classifier system as its discrimination threshold is varied.<\/p>\n<p>The ROC curve is created by plotting the true positive rate(TPR) against the false positive rate (FPR) at various threshold settings<\/p>\n<h3 id=\"t8\"><b>8. Area Under the Curve(AUC)<\/b><\/h3>\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.<\/p>\n<p>Thank you for reading!<\/p>\n<p>Please leave a comment to let me know your observations.<\/p>\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":1015,"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],"tags":[564,560,561,562,563],"_links":{"self":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/1014"}],"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=1014"}],"version-history":[{"count":1,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/1014\/revisions"}],"predecessor-version":[{"id":1017,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/1014\/revisions\/1017"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/media\/1015"}],"wp:attachment":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/media?parent=1014"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/categories?post=1014"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/tags?post=1014"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}