class: title-slide-custom .pull-left65[ <br><br><br> # FFTrees ##A toolbox to create, visualise, and use fast-and-frugal decision trees <br> ### Nathaniel D. Phillips, University of Basel Coauthors: Hansjoerg Neth, Jan Woike, Wolfgang Gaissmaier <br><br> ] .pull-right35[ <br><br><br><br> <img src="images/heartfft.png" width="100%" style="display: block; margin: auto;" /> ] --- <br><br><br><br><br> # How can one make good decisions based on limited, complex, noisy information? --- <img src="images/three_ex_1.png" width="1687" style="display: block; margin: auto;" /> --- count: false <img src="images/three_ex_2.png" width="1687" style="display: block; margin: auto;" /> --- count: false <img src="images/three_ex_3.png" width="1687" style="display: block; margin: auto;" /> --- count: false <img src="images/three_ex_4.png" width="1687" style="display: block; margin: auto;" /> --- <img src="images/er_busy_1.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/er_busy_2.png" width="100%" style="display: block; margin: auto;" /> --- <img src="images/er_decision_1.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/er_decision_2.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/er_decision_3.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/er_decision_4.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/er_decision_5.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/er_decision_6.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/er_decision_7.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/er_decision_8.png" width="100%" style="display: block; margin: auto;" /> --- <img src="images/green_mehr_fft.png" width="100%" style="display: block; margin: auto;" /> --- <img src="images/whatis_fft_1.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/whatis_fft_2.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/whatis_fft_3.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/whatis_fft_4.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/whatis_fft_5.png" width="100%" style="display: block; margin: auto;" /> --- <img src="images/fft_examples.png" width="100%" style="display: block; margin: auto;" /> --- <img src="images/fftrees_intro.png" width="100%" style="display: block; margin: auto;" /> --- # Heart Disease | age| sex|cp | trestbps| chol| fbs|restecg | thalach| exang| oldpeak|slope | ca|thal | diagnosis| |---:|---:|:--|--------:|----:|---:|:-----------|-------:|-----:|-------:|:-----|--:|:------|---------:| | 63| 1|ta | 145| 233| 1|hypertrophy | 150| 0| 2.3|down | 0|fd | 0| | 67| 1|a | 160| 286| 0|hypertrophy | 108| 1| 1.5|flat | 3|normal | 1| | 67| 1|a | 120| 229| 0|hypertrophy | 129| 1| 2.6|flat | 2|rd | 1| | 37| 1|np | 130| 250| 0|normal | 187| 0| 3.5|down | 0|normal | 0| | 41| 0|aa | 130| 204| 0|hypertrophy | 172| 0| 1.4|up | 0|normal | 0| | 56| 1|aa | 120| 236| 0|normal | 178| 0| 0.8|up | 0|normal | 0| --- # 4 Steps to using FFTrees in R .pull-left15[ <br> <font size = 5>0.Install</font> <br> <font size = 5>1. Load</font> <br> <br> <font size = 5>2. Create</font> <br> <br><br> <br><br> <font size = 5>3. Print</font> <br><br> <font size = 5>4. Plot</font> <br> ] .pull-right85[ ```r # Step 0: Install FFTrees from CRAN install.packages("FFTrees") # Step 1: Load FFTrees library(FFTrees) # Step 2: Create the FFTrees object heart_FFT <- FFTrees(formula = diagnosis ~., # Criterion data = heart.train, # Training data data.test = heart.test, # Testing data main = "Heart Disease", # Optional Labels decision.labels = c("Healthy", "Diseased")) # Step 3: Print the object heart_FFT # Step 4: Plot the tree and accuracy statistics plot(heart_FFT) ``` ] --- # ShinyFFTrees: http://www.shinyfftrees.org <iframe src="https://econpsychbasel.shinyapps.io/shinyfftrees/" width="1100" height="500"></iframe> --- ## plot(heart_FFT, stats = FALSE) --- count: false ## plot(heart_FFT, stats = FALSE) .pull-left5[ <img src="images/heart_fft_nostats_2.png" width="70%" style="display: block; margin: auto;" /> ] .pull-right5[ <br><br><br> ###thal <br2> <font size=5>Imaging test that measures blood flow to the heart</font> ### cp <br2> <font size=5>Type of chest pain</font> ### ca <br2> <font size=5>Number of major vessels colored by fluoroscopy</font> ] --- ## plot(heart_FFT) --- count: false ## plot(heart_FFT) .pull-left7[ <img src="images/heart_fft_train.png" width="80%" style="display: block; margin: auto;" /> ] .pull-right3[ <br> <font size = 5>Starts with dataset description</font> <br><br> <font size = 5>Tree <b>and</b> step-by-step decisions applied to data</font> <br><br><br> <font size = 5>Aggregate classification statistics and algorithm comparison in ROC</font> ] --- ## plot(heart_FFT, data = "test") .pull-left7[ <img src="images/heart_fft_test.png" width="80%" style="display: block; margin: auto;" /> ] .pull-right3[ <br> <font size = 5>Easily apply tree to <b>new, test data</b></font> <br><br> <font size = 5>Look for changes in when decisions are made, and when <b>errors</b> occur</font> <br><br><br> <font size = 5>Compare prediction accuracy to other algorithms</font> ] --- ## plot(heart_FFT, data = "test", tree = 7) .pull-left7[ <img src="images/heart_fft_test_tree7.png" width="80%" style="display: block; margin: auto;" /> ] .pull-right3[ <br><br> <font size = 5>Explore trees with different <b>exit structures</b> and <b>error trade-offs</b></font> <br><br> <font size = 5>Tree #7 has a very low false-alarm rate but a huge number of misses></font> <br><br> ] --- ## plot(heart_FFT, data = "test", tree = 6) .pull-left7[ <img src="images/heart_fft_test_tree6.png" width="80%" style="display: block; margin: auto;" /> ] .pull-right3[ <br><br> <font size = 5>Explore trees with different <b>exit structures</b> and <b>error trade-offs</b></font> <br><br> <font size = 5>Tree #6 has very few misses but a huge number of false-alarms></font> <br><br> ] --- <br><br><br> # I know what you're thinking... --- .pull-left5[ <br><br><br> # I know what you're thinking... <br> ] .pull-right5[ <img src="images/cute_monster.jpg" width="90%" style="display: block; margin: auto;" /> ] --- .pull-left5[ <br><br><br> # I know what you're thinking... <br> ### FFTs are cute, but they can't possibly compete with [insert your favorite ML algorithm] in raw predictive power. ] .pull-right5[ <img src="images/cute_monster.jpg" width="90%" style="display: block; margin: auto;" /> Source: Alex ‘alexmdc’ Solis ] --- # 10 datasets from UCI ML database, 50/50 CV, 100 Splits <img src="images/ten_datasets.png" width="100%" style="display: block; margin: auto;" /> --- .pull-left5[ # Make a Prediction! <br> <br> <font size = 6>What will the median relative accuracy of FFTrees be to Random Forests?</font> ] .pull-right5[ ] --- .pull-left5[ # Make a Prediction! <br> <br> <font size = 6>What will the median relative accuracy of FFTrees be to Random Forests?</font> ] .pull-right5[ <img src="images/predict_relacc_1.png" width="90%" style="display: block; margin: auto;" /> ] --- <img src="images/simulation_speed_1.png" width="70%" style="display: block; margin: auto;" /> --- count: false <img src="images/simulation_speed_2.png" width="70%" style="display: block; margin: auto;" /> --- count: false <img src="images/simulation_speed_3.png" width="70%" style="display: block; margin: auto;" /> --- <img src="images/simulation_accuracy_1.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/simulation_accuracy_2.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/simulation_accuracy_3.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/simulation_accuracy_4.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/simulation_accuracy_5.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/simulation_accuracy_6.png" width="100%" style="display: block; margin: auto;" /> --- .pull-left5[ # Make a Prediction! <br> <br> <font size = 6>What will the median relative accuracy of FFTrees be to Random Forests?</font> ] .pull-right5[ <img src="images/predict_relacc_1.png" width="90%" style="display: block; margin: auto;" /> ] --- count: false .pull-left5[ # Make a Prediction! <br> <br> <font size = 6>What will the median relative accuracy of FFTrees be to Random Forests?</font> ] .pull-right5[ <img src="images/predict_relacc_2.png" width="90%" style="display: block; margin: auto;" /> ] --- <br> <br> <br> <br> # The Dark Secret at the heart of AI and big data --- count: false <br> <br> <br> <br> # The Dark Secret at the heart of AI and big data ## What happens when things go wrong? --- count: false .pull-left5[ ] .pull-right5[ <br><br> <img src="images/darksecretai.png" width="70%" style="display: block; margin: auto;" /> ] --- count: false .pull-left5[ <br><br><br> > <font size=6>[W]hat if one day [an automated car] did something unexpected—crashed into a tree, or sat at a green light? [...] The system is so complicated that even the engineers who designed it may struggle to isolate the reason for any single action.</font> > <br> > <br> > <font size=5>~ Will Knight, MIT Technology Review, April 2017</font> ] .pull-right5[ <br><br> <img src="images/darksecretai.png" width="70%" style="display: block; margin: auto;" /> ] --- <img src="images/jaakola_1.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/jaakola_2.png" width="100%" style="display: block; margin: auto;" /> --- <img src="images/world_blank.png" width="85%" style="display: block; margin: auto;" /> --- count: false <img src="images/world_slowgains_1.png" width="85%" style="display: block; margin: auto;" /> --- count: false <img src="images/world_slowgains_2.png" width="85%" style="display: block; margin: auto;" /> --- count: false <img src="images/world_slowgains_3.png" width="85%" style="display: block; margin: auto;" /> --- count: false <img src="images/world_fastgains_1.png" width="85%" style="display: block; margin: auto;" /> --- count: false <img src="images/world_fastgains_2.png" width="85%" style="display: block; margin: auto;" /> --- count: false <img src="images/world_fastgains_3.png" width="85%" style="display: block; margin: auto;" /> --- class: title-slide-custom .pull-left55[ <br> # FFTrees ##A toolbox to create, visualise, and use fast-and-frugal decision trees <br> <font size=5>Nathaniel D. Phillips, University of Basel</font> Hansjoerg Neth, Jan Woike, Wolfgang Gaissmaier <br> <font size=4>Nathaniel.D.Phillips.is@gmail.com</font> <br3> <font size=4>Slides: <a href="http://ndphillips.github.io/Informs2017">http://ndphillips.github.io/Informs2017</a></font> <br3> <font size=4>ShinyFFTrees: <a href="http://www.shinyfftrees.org">http://www.shinyfftrees.org</a></font> ] .pull-right4[ <br><br> <font size=4>Phillips, N. D., Neth, H., Woike, J. K., & Gaissmaier, W. (2017). FFTrees [...]. Judgment and Decision Making, 12(4).</font> <img src="images/manuscript_cover_short.png" width="100%" style="display: block; margin: auto;" /> ] --- # Backup Slides --- <br> # Will you benefit from FFTrees? <br><br><br> > # What kind of data world do you live in? --- <img src="images/dataworld_1.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/dataworld_2.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/dataworld_3.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/dataworld_4.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/dataworld_5.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/dataworld_6.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/dataworld_7.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/dataworld_8.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/dataworld_9.png" width="100%" style="display: block; margin: auto;" /> --- count: false <img src="images/dataworld_10.png" width="100%" style="display: block; margin: auto;" /> --- <img src="images/simulation_accuracy_tree_1.png" width="100%" style="display: block; margin: auto;" /> --- <img src="images/simulation_accuracy_tree_2.png" width="100%" style="display: block; margin: auto;" /> --- <br><br><br> # Additional Features --- <img src="images/fftrees_bonus_all.png" width="90%" style="display: block; margin: auto;" /> --- # Documentation .pull-left45[ ### Phillips et al. (2017). FFTrees: A toolbox to create... <img src="images/manuscript_cover_short.png" width="100%" style="display: block; margin: auto;" /> ] .pull-right45[ ### <a href = "http://www.shinyfftrees.org">http://www.shinyfftrees.org</a> <img src="images/shinyfftrees_ss.png" width="100%" style="display: block; margin: auto;" /> ] --- # Closing slide --- # To Do - Get shinyfftrees.org -