<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/visualizing-classifier-thresholds/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://bayesianbiologist.com/2017/11/13/visualizing-classifier-thresholds/"> Rstats – bayesianbiologist</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>Lately I’ve been thinking a lot about the connection between prediction models and the decisions that they influence. There is <a rel="nofollow" href="http://predictivehealthcare.pennmedicine.org/2017/11/07/from-predictions-to-decisions.html" target="_blank">a lot of theory around this</a>, but communicating how the various pieces all fit together with the folks who will use and be impacted by these decisions can be challenging.</p>
<p>One of the important conceptual pieces is the link between the decision threshold (how high does the score need to be to predict positive) and the resulting distribution of outcomes (true positives, false positives, true negatives and false negatives). As a starting point, I’ve built this interactive tool for exploring this.</p>
<p><img data-orig-file="https://bayesianbiologist.files.wordpress.com/2017/11/screen-shot-2017-11-13-at-11-16-26-am.png?w=456" data-orig-size="1448,824" data-medium-file="https://bayesianbiologist.files.wordpress.com/2017/11/screen-shot-2017-11-13-at-11-16-26-am.png?w=456?w=300" data-attachment-id="1547" data-image-meta="{" data-image-description="" src="https://bayesianbiologist.files.wordpress.com/2017/11/screen-shot-2017-11-13-at-11-16-26-am.png?w=456" data-permalink="https://bayesianbiologist.com/2017/11/13/visualizing-classifier-thresholds/screen-shot-2017-11-13-at-11-16-26-am/#main" data-large-file="https://bayesianbiologist.files.wordpress.com/2017/11/screen-shot-2017-11-13-at-11-16-26-am.png?w=456?w=640" alt="Screen Shot 2017-11-13 at 11.16.26 AM" data-image-title="Screen Shot 2017-11-13 at 11.16.26 AM" sizes="(max-width: 640px) 100vw, 640px" data-comments-opened="1" class="wp-image-1547" data-recalc-dims="1"></p>
<p>The idea is to take a validation sample of predictions from a model and experiment with the consequences of varying the decision threshold. The hope is that the user will be able to develop an intuition around the tradeoffs involved by seeing the link to the individual data points involved.</p>
<p>Code for this experiment is <a rel="nofollow" href="https://github.com/cjbayesian/datascience-utils/blob/master/cm_thresholds_widget.ipynb" target="_blank">available here</a>. I hope to continue to build on this with other interactive, visual tools aimed at demystifying the concepts at the interface between predictions and decisions.</p>
<p> <a rel="nofollow" href="https://feeds.wordpress.com/1.0/gocomments/bayesianbiologist.wordpress.com/1544/" target="_blank"><img border="0" alt="" src="https://feeds.wordpress.com/1.0/comments/bayesianbiologist.wordpress.com/1544/"></a> <img border="0" alt="" src="https://i1.wp.com/pixel.wp.com/b.gif?resize=1%2C1&ssl=1" data-recalc-dims="1"></p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://bayesianbiologist.com/2017/11/13/visualizing-classifier-thresholds/"> Rstats – bayesianbiologist</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/WgvVfSFCUgg" height="1"></a></div>