March 9th, 2026 This is definitely the most interesting year that I’ve done this forecast. The SAG, ACE, and WGA awards tightened the race in the final weeks to now the prediction is pretty simple. There’s about a 50% chance that One Battle After Another wins. There’s about a 33% chance Sinners wins. Which leaves about a 17% chance that any of the other eight movies win Best Picture. Putting it…
I wrote a post last year looking at how to employ tools in LangChain to have GPT-3.5 Turbo access information on the web, outside of its training data. The purpose of the present post is to revisit this post, improving the poor performance I saw there through refactoring and prompt engineering. Background The motivating example is again using large language models (LLMs) to help me calculate…
I wrote a post in July 2023 describing my process for building a supervised text classification pipeline. In short, the process first involves reading the text, writing a thematic content coding guide, and having humans label text. Then, I define a variety of ways to pre-process text (e.g., word vs. word-and-bigram tokenizing, stemming vs. not, stop words vs. not, filtering on the number of times…
February 23rd, 2025 After the SAG and ASC awards last night, we’ve reached the end of the schedule: The only thing left is the Academy Awards, coming up this Sunday. The ASC matters little to the model, and the most predictive award from the SAG awards is the one for ensemble, which went to Conclave (upping it’s chances from 0.01% to 0.08%). The final prediction for Best Picture is Anora.
Following my previous post , I am again looking at how to employ R and Python seamlessly to use large language models (LLMs). Last time, I scraped information off of Wikipedia using the rvest package, fed that information to OpenAI’s Python API, and asked it to extract information for me. But what if we could skip that scraping step? What if we had a more complex question where writing an rvest or…
Well, it looks like the time has finally come for me to join the club and write a large language model (LLM) blog post. I hope to do two things here: Show how easy it is to seamlessly work with both R and Python code simultaneously Use the OpenAI API to see how well it does extracting information from text In my previous blog post , I discussed scraping film awards data to build a model predicting…
The Academy Awards are a week away, and I’m sharing my machine-learning-based predictions for Best Picture as well as some insights I took away from the process (particularly XGBoost’s sparsity-aware split finding). Oppenheimer is a heavy favorite at 97% likely to win—but major surprises are not uncommon, as we’ll see. I pulled data from three sources. First, industry awards. Most unions and…
Many organizations have a substantial amount of human-generated text from which they are not extracting a proportional amount of insight. For example, open-ended questions are found in most surveys—but are rarely given the same amount of attention (if any attention at all) as the easier-to-analyze quantitative data. I have tested out many supposedly “AI-powered” or “NLP-driven” tools for analyzing…
I started taking photos earlier this year. And as someone who loves thinking about probability, statistics, chance, randomness, and R programming, I started thinking about ways to apply probabilistic programming to photography. This is my first attempt. I’m going to be using one shot I particularly like. It’s a tower on 47th between Wyandotte and Baltimore in Kansas City, Missouri—as seen from the…
I like visual arts, but I’m moderately colorblind and thus have never been great at making my own works. When I’m plotting data and need colors, my standard procedure is having a website generate me a color palette or finding a visually pleasing one someone else has made and posted online. I also love film, and I started thinking about ways I could generate color palettes from films that use color…
One of the main assumptions of linear regression taught in statistics courses is that of “constant variance” or “homoscedasticity.” Having data that do not have constant variance (i.e., are heteroscedastic) is then often treated as a problem—a nuisance that violates our assumptions and, among other things, produces inaccurate p -values. But I have been interested for some time in taking a…
I set out to do two things with this post: Show how one can use workflowsets in the tidymodels context to compare different pre-processing and model types against one another. Until recently, there wasn’t a unified way to do this in the R ecosystem. So, I wanted to give workflowsets a try, because I’m glad it exists now. Do this while examining an unorthodox case. I want to look at the role of the…
During the lockdown of the city, game nights are happening on Zoom a lot. I was asked if I could code up a bingo game—about an hour and a half before game time. I’m sure there’s probably some type of bingo game programmed in Shiny already, but I wanted to see what I could do under crunch from scratch. Here’s what I’ve got. Using the rules from Wikipedia , I made two apps: One for the bingo master…
This week was the week of April 14th, the date that shares the (French) name of Aphex Twin’s most well-known work, “Avril 14th.” I have known about Aphex Twin since maybe middle school or so, but I only first really listened in earnest after hearing “Avril 14th” as the backing track to the poignant ending scene of the black comedy Four Lions . And then, of course, it was sampled in Kanye West’s…
The t -test is one of the most often used in psychology and other social sciences. In APA format, researchers are told to report the means and standard deviations of both conditions; the t -statistic, its degrees of freedom, and its p-value; and an effect size with confidence interval (generally Cohen’s d and 95%). Researchers frequently conduct randomized experiments with not just one dependent…
Case 1 best-worst scaling (also known as MaxDiff) designs involve presenting respondents with a number of items and asking them to pick which is “best” and “worst” of the set. More generally, the respondent is asked which items have the most and least of any given feature (importance, attractiveness, interest, and so on). Respondents complete many sets of items in a row, and from this we can learn…
Simulating data is an invaluable tool. I use simulations to conduct power analyses, probe how robust methods are to violating assumptions, and examine how different methods handle different types of data. If I’m learning something new or writing a model from scratch, I’ll simulate data so that I know the correct answer—and make sure my model gives me that answer. But simulations can be…
Welcome from Part 1 , where I talked mainly about methods; Part 2 , where I discussed the three major types of Star Wars fans; Part 3 , where I discussed sexism and political attitudes; and Part 4 , where I discussed age and nostalgia. In this part, I will focus on age and nostalgia. As always, email sw.survey.2019@gmail.com with questions about analyses, methods, results, and so on. People enjoy…
Welcome from Part 1 , where I talked mainly about methods; Part 2 , where I discussed the three major types of Star Wars fans; and Part 3 , where I discussed sexism and political attitudes. In this part, I will focus on age and nostalgia. As always, email sw.survey.2019@gmail.com with questions about analyses, methods, results, and so on. Star Wars was a big part of many fans’ childhoods. In 2005,…
Welcome from Part 1 , where I talked mainly about methods, and Part 2 , where I discussed the three major types of Star Wars fans. In this part, I will focus on sexism and political attitudes. As always, email sw.survey.2019@gmail.com with questions about analyses, methods, results, and so on. It is not inherently sexist to dislike Disney’s Star Wars films. There have been many thoughtful ,…