Quantile Regression Forests for Prediction Intervals 2021-04-21 In this post I will build prediction intervals using quantile regression, more specifically, quantile regression forests. This is my third post on prediction intervals. Prior posts: […] This … workflows ggplot yardstick gt forcats scales pander

Simulating Prediction Intervals 2021-04-05 Part 1 of my series of posts on building prediction intervals used data held-out from model training to evaluate the characteristics of prediction intervals. In this post I will use hold-out data to … workflows devtools gt ggplot forcats scales pander

Understanding Prediction Intervals 2021-03-18 Prediction intervals provide a measure of uncertainty for predictions on individual observations. This post… […] This is the first of three posts on prediction intervals (Part 2 employs … AmesHousing dplyr rsample recipes gt parsnip workflows ggplot yardstick stringr tidyr forcats scales pander

Weighting Confusion Matrices by Outcomes and Observations 2020-12-08 Weighting in predictive modeling may take multiple forms and occur at different steps in the model building process. […] The focus of this post is on the last stage1. I will describe two types … ggplot dplyr rsample parsnip probably yardstick devtools purrr knitr tidyr

Undersampling Will Change the Base Rates of Your Model's Predictions 2020-11-23 TLDR: In classification problems, under and over sampling1 techniques shift the distribution of predicted probabilities towards the minority class. If your problem requires accurate probabilities you … ggplot dplyr purrr tidyr knitr modelr yardstick

Influencing Distributions with Tiered Incentives 2020-11-02 In this post I will use incentives for sales representatives in pricing to provide examples of factors to consider when attempting to influence an existing distribution. For instance, if you have a … ggplot dplyr purrr forcats

Feature Engineering with Sliding Windows and Lagged Inputs 2020-10-12 The new rsample::sliding_*() functions bring the windowing approaches used in slider to the sampling procedures used in the tidymodels framework1. These functions make evaluation of models with … httr jsonlite dplyr lubridate rsample slider devtools recipes parsnip workflows tune purrr tidyr forcats ggplot broom

A National Popular Vote Weighted by the Electoral College 2020-09-11 TLDR: In this post I discuss using a national popular vote weighted by the electoral college to elect the president. This approach would empower voters by expanding political influence outside of … pins readr dplyr janitor tidyr forcats ggplot

Use Flipbooks to Explain Your Code and Thought Process 2020-06-24 Using the pipe operator (%>%) is one of my favorite things about coding in R and the tidyverse. However when it was first shown to me, I couldn’t understand what the #rstats nut describing it was … dplyr tidyr purrr ggplot ggbeeswarm animatrixr emo rlang fs pagedown magick here pdftools officer flair flipbookr

Tidy Pairwise Operations 2020-06-03 In May of 2021 I co-wrote pwiser a package for doing pairwise operations in {dplyr} that provides a much smoother approach than the one I build-up to in this post. […] Say you want to map an … AmesHousing dplyr corrr tidyr stringr purrr forcats ggplot devtools weights

Riddler Solutions: Pedestrian Puzzles 2020-03-04 This post contains solutions to FiveThirtyEight’s two riddles released 2020-02-14, Riddler Express and Riddler Classic. I created a toy package animatrixr to help with some of the visualizations and … tidyr dplyr animatrixr knitr ggplot ggforce purrr forcats

Visualizing Matrix Transformations 2020-02-20 I highly recommend the fantastic video series Essence of Linear Algebra by Grant Sanderson. In this post I’ll walk through how you can use gganimate and the tidyverse to (very loosely) recreate some … dplyr tidyr ggplot ggforce purrr knitr gganimate

Riddler Solutions: Palindrome Dates & Ambiguous Absolute Value Bars 2020-02-13 This post contains solutions to FiveThirtyEight’s two riddles released 2020-02-07, Riddler Express and Riddler Classic. Code for figures and solutions can be found on my github page. […] The … dplyr lubridate stringi knitr purrr stringr tidyr ggplot

Riddler Solutions: Perfect Bowl & Magnetic Volume 2020-02-06 This post contains solutions to FiveThirtyEight’s two riddles released 2020-01-31, Riddler Express and Riddler Classic. Code for figures and solutions can be found on my github page. […] The … dplyr ggplot ggforce