"Drop the Mic" winner algorithm!

January 8, 2018
R data fun

I’ve been watching lots of episodes of “Drop the Mic” on Youtube lately with @klam227 and I think I noticed a pattern on how the winners are selected. It got to a point where I will guess who the winner is before the episode really gets underway and I would be right 8/9 times.

If you haven’t yet found the simple pleasure of watching Drop the Mic, here’s a summary from IMDb:

Hosted by Method Man and Hailey Baldwin, each week Drop the Mic pits four stars from the worlds of entertainment, music, sports and pop culture to face off against each other in a rap battle royale packed with lyrically creative genius and “Did they really just say that?” moments. At the end of each head-to-head battle, there can only be one winner.

And here’s one of the episodes I particularly liked:


Now, granted I have not watched every single episode, but of the ones I did watch I noticed two factors which determined the winner.

My simple-in-head-algorithm for determining the winner is:

  1. If one contestant is female and the other is male, the female wins!
  2. If both are male, or both are female, or if they are a group, the one standing to the left of the screen at the end wins!

😄

Now I want to actually see how good this algorithm is!

First off, scraping the episode data from IMDb:

library(rvest)
library(tidyverse)
library(knitr)
library(kableExtra)

# Scrape data from IMDb
data.dropmic <- read_html("http://www.imdb.com/title/tt6396094/episodes?season=1&ref_=tt_eps_sn_1") %>%
        html_nodes("strong a") %>%
        html_text() %>%
        as.data.frame()

# Title column
names(data.dropmic) <- "Episode"

# Display results
kable(data.dropmic, "html") %>%
        kable_styling(bootstrap_options = c("striped", "hover"))
Episode
Halle Berry vs. James Corden & Usher vs. Anthony Anderson
James Van Der Beek vs. Randall Park & Rob Gronkowski vs. Gina Rodriguez
Niecy Nash vs. Cedric the Entertainer and Liam Payne vs. Jason Derulo
Tony Hale vs Timothy Simons and Rascal Flatts vs. Boyz II Men
Nicole Scherzinger vs. Lil Rel Howery & Charlie Puth vs. Backstreet Boys
Vanessa Hudgens vs. Michael Bennett and James Corden vs. Nicole Richie
Mayim Bialik vs. Kunal Nayyar and Ashley Tisdale vs. Nick Lachey
Wayne Brady vs. Jake Owen and Kenny G vs. Richard Marx
David Arquette vs. Brian Tyree Henry and Jesse Tyler Ferguson vs. Chrissy Metz
Pentatonix vs. Bell Biv Devoe and Padma Lakshmi vs. Randy Jackson
Danielle Fishel vs. Jonathan Lipnicki and Shania Twain vs. Meghan Trainor
Episode #1.15
Episode #1.16
2017-2018 Fall TV Premiere Dates
October TV Calendar
My tv show watchlist
TV Shows
tv shows
Everything in my life
Kodi

(The pretty table styles are courtesy of @haozhu233 and his excellent kableExtra package!)

In the above table, there are some non-episode data in the last few rows. Let’s filter that out with the following code:

# Filter
data.clean <- data.dropmic[grepl(" vs", data.dropmic$Episode),] %>%
        data.frame(Episode = .)

# Display results
kable(data.clean, "html") %>%
        kable_styling(bootstrap_options = c("striped", "hover"))
Episode
Halle Berry vs. James Corden & Usher vs. Anthony Anderson
James Van Der Beek vs. Randall Park & Rob Gronkowski vs. Gina Rodriguez
Niecy Nash vs. Cedric the Entertainer and Liam Payne vs. Jason Derulo
Tony Hale vs Timothy Simons and Rascal Flatts vs. Boyz II Men
Nicole Scherzinger vs. Lil Rel Howery & Charlie Puth vs. Backstreet Boys
Vanessa Hudgens vs. Michael Bennett and James Corden vs. Nicole Richie
Mayim Bialik vs. Kunal Nayyar and Ashley Tisdale vs. Nick Lachey
Wayne Brady vs. Jake Owen and Kenny G vs. Richard Marx
David Arquette vs. Brian Tyree Henry and Jesse Tyler Ferguson vs. Chrissy Metz
Pentatonix vs. Bell Biv Devoe and Padma Lakshmi vs. Randy Jackson
Danielle Fishel vs. Jonathan Lipnicki and Shania Twain vs. Meghan Trainor

Excellent. Now just one more minor step to split each episode up into “battles”, since each episode contains two battles:

# Split into battles
data.clean <- str_split(data.clean$Episode, "&| and ") %>%
        unlist() %>%
        data.frame(Battles = .)

# Display results
kable(data.clean, "html") %>%
        kable_styling(bootstrap_options = c("striped", "hover"))
Battles
Halle Berry vs. James Corden
Usher vs. Anthony Anderson
James Van Der Beek vs. Randall Park
Rob Gronkowski vs. Gina Rodriguez
Niecy Nash vs. Cedric the Entertainer
Liam Payne vs. Jason Derulo
Tony Hale vs Timothy Simons
Rascal Flatts vs. Boyz II Men
Nicole Scherzinger vs. Lil Rel Howery
Charlie Puth vs. Backstreet Boys
Vanessa Hudgens vs. Michael Bennett
James Corden vs. Nicole Richie
Mayim Bialik vs. Kunal Nayyar
Ashley Tisdale vs. Nick Lachey
Wayne Brady vs. Jake Owen
Kenny G vs. Richard Marx
David Arquette vs. Brian Tyree Henry
Jesse Tyler Ferguson vs. Chrissy Metz
Pentatonix vs. Bell Biv Devoe
Padma Lakshmi vs. Randy Jackson
Danielle Fishel vs. Jonathan Lipnicki
Shania Twain vs. Meghan Trainor

Perfect. Now we can add the two features of this algorithm and watch every episode on the list in order to record the winner!

Battles Female Left Algo.predict.correct
Halle Berry vs. James Corden 1 0 1
Usher vs. Anthony Anderson 0 1 1
James Van Der Beek vs. Randall Park 0 1 1
Rob Gronkowski vs. Gina Rodriguez 1 0 1
Niecy Nash vs. Cedric the Entertainer 1 1 1
Liam Payne vs. Jason Derulo 0 1 1
Tony Hale vs Timothy Simons 0 0 0
Rascal Flatts vs. Boyz II Men 0 0 0
Nicole Scherzinger vs. Lil Rel Howery 1 0 1
Charlie Puth vs. Backstreet Boys 0 1 1
Vanessa Hudgens vs. Michael Bennett 1 0 1
James Corden vs. Nicole Richie 1 0 1
Mayim Bialik vs. Kunal Nayyar 1 0 1
Ashley Tisdale vs. Nick Lachey 1 1 1
Wayne Brady vs. Jake Owen 0 1 1
Kenny G vs. Richard Marx 0 1 1
David Arquette vs. Brian Tyree Henry 0 1 1
Jesse Tyler Ferguson vs. Chrissy Metz 1 1 1
Pentatonix vs. Bell Biv Devoe 0 0 0
Padma Lakshmi vs. Randy Jackson 1 1 1
Danielle Fishel vs. Jonathan Lipnicki 1 NA NA
Shania Twain vs. Meghan Trainor 0 NA NA

Looks like my algorithm scored 85%!

And the prediction for the last two episodes (which haven’t yet been posted on Youtube as of Jan. 8 2018) are:

  1. Danielle Fishel will beat Jonathan Lipnicki (female)
  2. Whoever is standing on the left side of the screen (looks like Shania)

Well, that was certainly an enjoyable afternoon! 😄

A look at teacher misconduct in Canada...

August 8, 2018
R data

RNN vs. Dense neural networks for time-series

June 27, 2018
R modelling

Auto neural networks vs. Manual Keras neural model

June 11, 2018
R modelling