{"id":167,"date":"2023-09-27T12:35:53","date_gmt":"2023-09-27T12:35:53","guid":{"rendered":"https:\/\/ozer.gt\/log\/?p=167"},"modified":"2024-01-29T10:45:32","modified_gmt":"2024-01-29T15:45:32","slug":"using-predictive-modeling-as-a-hammer-when-the-nail-needs-more-thinking","status":"publish","type":"post","link":"https:\/\/ozer.gt\/log\/2023\/09\/27\/using-predictive-modeling-as-a-hammer-when-the-nail-needs-more-thinking\/","title":{"rendered":"Using predictive modeling as a hammer when the nail needs more thinking"},"content":{"rendered":"<blockquote><p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-168\" src=\"https:\/\/ozer.gt\/log\/wp-content\/uploads\/2024\/01\/path_minimization.png\" alt=\"\" width=\"562\" height=\"559\" srcset=\"https:\/\/ozer.gt\/log\/wp-content\/uploads\/2024\/01\/path_minimization.png 562w, https:\/\/ozer.gt\/log\/wp-content\/uploads\/2024\/01\/path_minimization-300x298.png 300w, https:\/\/ozer.gt\/log\/wp-content\/uploads\/2024\/01\/path_minimization-150x150.png 150w\" sizes=\"auto, (max-width: 562px) 100vw, 562px\" \/><\/p><\/blockquote>\n<p>The business problem is to put a lifeguard station on a beach to save some lives (i.e., find the best location for the lifeguard station). This is not really a predictive modeling problem. But that&#8217;s the hammer our data scientists have and they have access to fancy libraries. There is also some historical data: swimmers rescued and drowned at other beaches. It all checks out. Resistance to \ud835\ude31\ud835\ude2a\ud835\ude31 \ud835\ude2a\ud835\ude2f\ud835\ude34\ud835\ude35\ud835\ude22\ud835\ude2d\ud835\ude2d \ud835\ude31\ud835\ude33\ud835\ude30\ud835\ude31\ud835\ude29\ud835\ude26\ud835\ude35 is futile.<\/p>\n<p>Transforming the problem into an objective function could have signaled that this is an optimization problem (a prescriptive modeling problem), but that step was skipped. In the picture shown, we may need a solution:<\/p>\n<p>&#8211; minimizes distance =&gt; \ud835\udde6\ud835\uddfc\ud835\uddf9\ud835\ude03\ud835\uddf2\ud835\uddf1 \ud835\ude02\ud835\ude00\ud835\uddf6\ud835\uddfb\ud835\uddf4 \ud835\uddfd\ud835\uddf6\ud835\uddfd \ud835\uddf6\ud835\uddfb\ud835\ude00\ud835\ude01\ud835\uddee\ud835\uddf9\ud835\uddf9 \ud835\uddf3\ud835\uddee\ud835\uddfb\ud835\uddf0\ud835\ude06_\ud835\uddf9\ud835\uddf6\ud835\uddef\ud835\uddff\ud835\uddee\ud835\uddff\ud835\ude06<br \/>\nwhile also&#8230;<br \/>\n&#8211; minimizing time =&gt; \ud835\udde7\ud835\uddf5\ud835\uddf2 \ud835\uddf1\ud835\uddfc\ud835\uddfa\ud835\uddee\ud835\uddf6\ud835\uddfb \ud835\uddf2\ud835\ude05\ud835\uddfd\ud835\uddf2\ud835\uddff\ud835\ude01 \ud835\uddf2\ud835\uddfb\ud835\ude01\ud835\uddf2\ud835\uddff\ud835\ude00 \ud835\ude01\ud835\uddf5\ud835\uddf2 \ud835\uddff\ud835\uddfc\ud835\uddfc\ud835\uddfa<br \/>\n&#8211; minimizing swimming =&gt; \ud835\udde7\ud835\uddf5\ud835\uddf2 \ud835\uddf9\ud835\uddee\ud835\uddef\ud835\uddfc\ud835\uddff \ud835\ude02\ud835\uddfb\ud835\uddf6\ud835\uddfc\ud835\uddfb \ud835\uddf6\ud835\uddfb\ud835\ude01\ud835\uddf2\ud835\uddff\ud835\ude03\ud835\uddf2\ud835\uddfb\ud835\uddf2\ud835\ude00<br \/>\n&#8211; minimizing time to ice cream =&gt; \ud835\udde7\ud835\uddf5\ud835\uddf2 \ud835\uddf2\ud835\ude05\ud835\uddf2\ud835\uddf0\ud835\ude02\ud835\ude01\ud835\uddf6\ud835\ude03\ud835\uddf2 \ud835\uddf9\ud835\uddf2\ud835\uddee\ud835\uddf1\ud835\uddf2\ud835\uddff\ud835\ude00\ud835\uddf5\ud835\uddf6\ud835\uddfd \ud835\ude00\ud835\ude01\ud835\uddf2\ud835\uddfd\ud835\ude00 \ud835\uddf6\ud835\uddfb<br \/>\n&#8211; [not shown] minimizing walking on sand =&gt; \ud835\udde7\ud835\uddf5\ud835\uddf2 \ud835\uddd7\ud835\uddf2\ud835\uddfd\ud835\uddee\ud835\uddff\ud835\ude01\ud835\uddfa\ud835\uddf2\ud835\uddfb\ud835\ude01 \ud835\uddfc\ud835\uddf3 \ud835\udddf\ud835\uddee\ud835\uddef\ud835\uddfc\ud835\uddff \ud835\uddff\ud835\uddf2\ud835\uddfe\ud835\ude02\ud835\uddf6\ud835\uddff\ud835\uddf2\ud835\uddfa\ud835\uddf2\ud835\uddfb\ud835\ude01<br \/>\nand hopefully not&#8230;<br \/>\n&#8211; maximizing time =&gt; \ud835\uddd4 \ud835\uddf7\ud835\ude02\ud835\uddfb\ud835\uddf6\ud835\uddfc\ud835\uddff \ud835\uddf1\ud835\uddee\ud835\ude01\ud835\uddee \ud835\ude00\ud835\uddf0\ud835\uddf6\ud835\uddf2\ud835\uddfb\ud835\ude01\ud835\uddf6\ud835\ude00\ud835\ude01 \ud835\ude00\ud835\uddfc\ud835\uddf9\ud835\ude03\ud835\uddf2\ud835\ude00 \ud835\ude01\ud835\uddf5\ud835\uddf2 \ud835\uddfd\ud835\uddff\ud835\uddfc\ud835\uddef\ud835\uddf9\ud835\uddf2\ud835\uddfa<\/p>\n<p>So, the ideal solution requires more thinking about the problem. For example, maximizing the number of lives saved may actually require constraints on how to minimize time so that lifeguards don&#8217;t risk their lives during the rescue.<\/p>\n<p>The law of the instrument works a little too well in predictive modeling (and more generally in machine learning). Objective functions are often lost in translation when they should be an explicit step in the modeling process. Best practice tends to favor performance metrics, even though achieving the highest performance on the wrong function is clearly useless (and sometimes detrimental).<\/p>\n<p>More focus on objective functions and less obsession with &#8220;better performance&#8221; may be what we need. This would underline the importance of problem formulation and domain knowledge, and undermine the \ud835\ude31\ud835\ude2a\ud835\ude31 \ud835\ude2a\ud835\ude2f\ud835\ude34\ud835\ude35\ud835\ude22\ud835\ude2d\ud835\ude2d \ud835\ude31\ud835\ude33\ud835\ude30\ud835\ude31\ud835\ude29\ud835\ude26\ud835\ude35 solution.<\/p>\n<p>A combination of <a id=\"ember4097\" class=\"ember-view\" href=\"https:\/\/www.linkedin.com\/in\/warrenbpowell\/\">Warren Powell<\/a>&#8216;s writing and the accompanying xkcd comic inspired this post (courtesy of <a class=\"app-aware-link \" href=\"http:\/\/xkcd.com\/\" target=\"_self\" rel=\"noopener\" data-test-app-aware-link=\"\">xkcd.com<\/a>).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The business problem is to put a lifeguard station on a beach to save some lives (i.e., find the best location for the lifeguard station). This is not really a predictive modeling problem. But that&#8217;s the hammer our data scientists have and they have access to fancy libraries. There is also some historical data: swimmers [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"cybocfi_hide_featured_image":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-167","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/ozer.gt\/log\/wp-json\/wp\/v2\/posts\/167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ozer.gt\/log\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ozer.gt\/log\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ozer.gt\/log\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ozer.gt\/log\/wp-json\/wp\/v2\/comments?post=167"}],"version-history":[{"count":2,"href":"https:\/\/ozer.gt\/log\/wp-json\/wp\/v2\/posts\/167\/revisions"}],"predecessor-version":[{"id":257,"href":"https:\/\/ozer.gt\/log\/wp-json\/wp\/v2\/posts\/167\/revisions\/257"}],"wp:attachment":[{"href":"https:\/\/ozer.gt\/log\/wp-json\/wp\/v2\/media?parent=167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ozer.gt\/log\/wp-json\/wp\/v2\/categories?post=167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ozer.gt\/log\/wp-json\/wp\/v2\/tags?post=167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}