Classification Tree, E-Sports, K-Means Clustering, Logistic Regression, NBA2k, nintendo, Overwatch, Propensity Modeling, Regression Modeling, Super Mario, Tree Based Models

TBCC 2019 Player One, Power Ups, & Probabilities: Panel Recap

012


001.png


This panel was held on: Saturday, August 3, 2019 at 3 PM – 4 PM
And here was the pitch:
Join the data science debate of the highest critically acclaimed video games vs the nostalgia of games we grew up. The data science team at Pancake Breakfast: A Stack Of Stats will be serving up supporting data and driving the discussion for both sides of the debate. Panelists will debate greatest video game of all time or overrated!
The Panelist were myself and Stephen (an indie game developer).  Obviously Steve had the advantage going into this debate but it was really fun and the audience was very engaged, probably one of our best Q&A sessions of all time.
015

Video Game Recommendation Engine – This is how we do it

These are data science panels and we started off this panel with a video game recommendation engine.  I had Stephen fill out a survey prior to the panel and from his results I built a recommendation model, with the goal of selecting games he has not played (he’s played a lot of games, so not an easy task) and would rate above average.

002

How are we going to build this recommendation?  Through Propensity scoring!

A propensity score is an estimated probability that a data point might have the predicted outcome.

  • One of our panelists completed a survey and had to rank video games they have played
  • Their responses were linked to our ancillary data (critics score, user score, and genres)
  • Our model shot out a score between 0 and 1. The closer to 1 the more likely this game would be enjoyed by the panelist.

003


 

Video Game Recommendation Engine – The Output

004.png

For this panelist, the survey told us this about their gaming preferences:

The value User Score more than the Critics Score.

Their preferred genre is Action Adventure.

Their preferred platform is the PS2.

005


Video Game Debate: Overview

006

On the screen will be a video game, with some profiling data.

Panelist will debate the impact, perceived and replay value of the featured game.

Crowd will decide who made the better argument.

This is the meat of the panel., on the screen is also the IGN review headline and rating, Stephen and myself would take turns and argue if it deserved it’s ranking.


Goldeneye 007

007

Stephen went first and argued that Goldeneye does not deserve this high of rating and his key point was on the replay value.  I attempted to argue on to value it at time of release.  The crowd sided with Stephen.


Pokémon Gold & Silver

008

I went first this round and argued for the rating, this was a very pro Pokémon crowd.  Stephen brought up good points on where he thinks the series should go and adding another region is not the answer.  The crowd sided with Me.


Ultimate Marvel vs. Capcom 3

009

Stephen chose to argue for this game, I wanted to throw a curve-ball in this debate.  It would have been very obvious if we chose Marvel vs Capcom 2, too easy.  I argued that it wasn’t even the best in the series, and the best in the series is actually X-men vs Street fighter.


Halo Combat Evolved

010

Stephen was on team Halo for this one, I love Halo as well, but the crowd did not.  That was a shock to us but maybe Halo doesn’t have replay value?  Or everyone is getting tired with the series.


Battle Dome: Overview

011

Two games go in… only one comes out

Panelists will argue for a game, they cannot both argue for the same game

The crowd decides who had the best argument

This was fun and challenging section of our panel.  I won’t go into details on this section but I do want to try something out.  As test to see who is interacting with my page by reading the data stories, I have a special giveaway.

Here are the rules, you must have an Instagram account. You must be following my Instagram account: @pancake_analytics.

To enter you need read through the battle dome section, screen shot your favorite match-up and post it to instagram.

In this post I want you tag @pancake_analytics and caption the post with “Who do you have in this Battle Dome match-up?”.

This giveaway will end on December 31st, 2019 and the winner will receive a Game-stop Gift card from me.  For to use on your next video game purchase in the new year!

Here’s the disclaimer I have to post:

Per Instagram rules, we must mention this is in no way sponsored, administered, or associated with Instagram, Inc. By entering, entrants confirm they are 13+ years of age, release Instagram of responsibility, and agree to Instagram’s term of use. Good luck!!!!!

Here’s the battle dome match-ups:


012


013


014


I want to personally thank everyone who attended the panel in Tampa, at the Tampa Comic Convention.  I look forward to meeting again in 2020.


003_008

K-Means Clustering, Logistic Regression, nintendo, Propensity Modeling, Regression Modeling, Super Mario

TBCC 2019 Smash Brothers, Segmentation & Strategy: Panel Recap

012


003


This Panel was held on:

Friday, August 2, 2019 at 7:30 PM – 8:30 PM

During the Tampa Bay Comic Convention 2019, held at the Tampa Convention Center.

The Panelists were:

Tom Ferrara (@pancake_analytics) , Kalyn Hundley (@kehundley08), Andy Polak (@polak_andy)

001

I want to take a quick moment to discuss the panelists.  I love giving as many different point of views as possible to these data science panels.  Without this variety of point of views it’s more of a lecture and less of a discussion.  This mix of panelists gave the audience the data science view, the tech industry view and the biological sciences view.  Best part about this is Smash Brother brought us all together.


Changing the Tier Conversation

004.png

One of the main objectives of this panel was getting a discussion going on tier selection in Smash and how do we base tier selection in data science, and how do we validate our findings through one of the best players in the game.

A k-means cluster uncovers trends within our Smash Brothers data to understand the relational similarities and differences on key in game attributes.

The more clusters the clearer our picture becomes and the deeper we can understand the pros and cons of each main selection.


005.png

A brief overview of a k-means cluster:

  • Standardize your variables
  • Analyze your elbow curve
  • Validate your clusters

Treat each game release as new product launch or a change in the market.

You would re-score your data, to understand the current market and you’re able to migrate and understand how the meta-game has changed.


006

We end up with five unique clusters:

Floaters:

This group is the slowest by run speed and lightest by weight.

Jack Of All Trades:

They are middle group on everything, there is no distinct trend.

Dashers:

Like the Jack of All Trades group but faster.

Air Tanks:

Fast in aerial attacks and the heaviest of the characters.

Speedsters:

This group is the fastest and the lightest.


007

propensity model is a statistical scorecard that is used to predict the behavior of your customer or prospect base. Propensity models are often used to identify those most likely to respond to an offer, or to focus retention activity on those most likely to churn.

So who should be your main?  In this segment I rely on industry knowledge as well (ZeRo’s tiers as dependent variable).   I’ll build propensity score with the following independent variables:

  • Change in air acceleration
  • Base air acceleration
  • Base speed in the air
  • Base Run Speed
  • Character Weight
  • Ultimate Smash Bros. Cluster
  • Wii-U Smash Bros. Cluster

008


What makes these three stand above the crowd?

The are middle ground on weight, fast air accelerators.

What are the differences between the three?

Wario has a slow run speed.

Palutena is the lightest.

Yoshi is the middle ground of this group.


The Curious Case of Ganondorf

009

Ganondorf has more in-common with Jiggly Puff than he does Bowser.

The reason being is he’s quicker and can adapt well in aerial attacks and in falling than Bowser can.

On the flip-side of this I can also say Bowser more accurately represents how he’s viewed from the super Mario franchise, in Super Smash Bros. Ultimate.


Game Time: Name that segment: Overview

010

I personally feel one of the best ways to reinforce learning is through a game.  For this panel I decided to reinforce the k-means segmentation and wanted volunteers to guess the segment 3 characters on the screen fall into.

Here was the overview:

5 Volunteers

On the screen will be 3 characters

All 3 characters belong to the same segment

Volunteers will do their best to convince the panel of which segment the characters fall into:

  • Floaters
  • Jack of All Trades
  • Dashers
  • Air Tanks
  • Speedsters

For participating volunteers receive a fabulous prize.

For this particular game the prize was an amiibo of their choice that works with Smash Ultimate for the Nintendo Switch.


I want to personally thank everyone who attended the panel in Tampa, at the Tampa Comic Convention.  I look forward to meeting again in 2020.


003_008

K-Means Clustering, Pokemon Go

Recipe 015: Pokemon Gen 3 K-means Clustering

logo

Take Charge of your Destiny!

In this data story I’ll be showing you how a self guided machine learning algorithm can select the best Pokemon squad for the Hoenn region.

At the end of this data story you’ll have

six Pokemon to look out for in Pokemon GO

, as well as understand why the Bagon Community Day was the best to date!


025


007_hoenn_region

As seen in the generation 2 games, the generation 3 games brought a wave of changes, especially the data structure.

Listed below are what I feel to be some of the major changes which effect the data of Hoenn region Pokemon.

Main Features added from Generation 2:
A complete overhaul of the Pokemon data structure:
Individual personality value
Abilities and Nature
The IV system went from 0-15 to 0-31
Damage such as Poison, Burn and Leach Seed (passive damage) are resolved at the end of the turn instead of immediately)
135 new Pokemon introduced
103 new moves were introduced
Weather can now be found on the field and activate at the start of a battle
Double Battles

009_pokemon_double_battles

I’d like to call out double battles, as one of the main ingredients in my Pokemon evaluation soup is : Experience Growth Rate.

Double battles allow for more and quicker experience.

In other words all Pokemon can gain more experience earlier on in the game.

021

If you recall when I looked at the data of the Johto Pokemon, we introduced to the very strong bugs.

Now in the Hoenn region we are introduced to weaker bugs.

This was done to counteract the impact of Heracross and Shuckle.

Catch these bugs below for the pokedex completion but you’re not going to have them on your main team.

022

So these weak bugs aside you do get one of (if not the most) powerful dragons: Salamence.  If you play Pokemon Go, you most likely took advantage of in my opinion the best Pokemon Go Community Day to date (Held on 4/13/2019).

008_community_day_01

One of my favorite sayings and motto is “Stay away from the brand names.”  What does this mean and how does it apply to Pokemon?  It means don’t buy into popular opinion, let the facts and data support your choices.

What’s all you hear about on community days?  If you screamed “shinys” then yes… that’s all you hear about.  How many shinys did you catch?

What’s your highest CP shiny?  I’ll trade for shinys.  Don’t be distracted by the brand name of community day, go for more than shinys.  Play in area with several poke stops and has cover from weather.

During the Bagon community day you should have been catching every Bagon spawn

, not only clicking in to see if it’s shiny.  Salamence is the goal, you want to be the mother of dragons (yes, I’m hype for Game of Thrones).

008_community_day


006_scatter_plot

Sticking to the theme of “Stay Away from Brand Names”, applying a k-means clustering algorithm will look for trends in the data and give us a group of Elite Pokemon we should replay Pokemon Ruby and Sapphire with and keep an eye out for in Pokemon Go.

How do we get to the ideal Pokemon team?  Applying a self guided machine learning approach: K-means clustering.  Now you can’t jump ahead and run the algorithm against your data.  First step is standardize your data, because you want to give each of your attributes an equal weight. 

Take for instance:

I want a well balanced team, I don’t want a team elite on attack but weak on defense.

After the data standardize and I run the k-means algorithm, you can see the scatter plot above.  The top right and far right cluster is the segment I want to build my team out of.  All other segments, you can win with but you can 100% steam roll the competition.

Below I’ve included visual representation of the top attackers and defenders in each cluster.


017


018


019


020


This is great, love info graphics… but what do we do this knowledge?  Well we can build a team.

Your team building begins from the very beginning.

I’ll cut to the chase… you should chose Torchic (sorry Swampert fans)

026

Why Torchic? Well I’m concerned about team structure and most importantly a showdown with Slaking (Fighting moves are must).  Below you can see the full recommendation of what your final team should look like.  You should also target all of these in Pokemon GO.

 

024


005

027


028

DC Comics, K-Means Clustering, Logistic Regression, Propensity Modeling

Recipe 011: DC Super Hero Throw Down: Propensity Modeling

logo

I want you to remember, Clark…In all the years to come… in your most private moments… I want you to remember my hand at your throat… I want you to remember the one man who beat you.

Chilling quote isn’t it?  That was said by Batman to Superman during the The Dark Knight Returns, a comic book miniseries written and drawn by Frank Miller.

One of the greatest debates in comic book lore and a fun discussion to have is pitting up two superheroes against each other… Who wins and why?  The below data story will introduce a data science approach to answering this debate.  To have fun with it… I’ve thrown characters from the video game Injustice 2 into a Superhero Thrown Down Tournament.


012_pic

 

 


010_pic

Before we dive into the tournament and the results of the throw down, I’d like to touch on the approach: Propensity modeling.

Propensity modeling has been around since 1983 and is a statistical approach to measuring uplift (think return on investment).  The goal is to measure the uplift of similar or matched groups.

The heart of this approach lies within two machine learning approaches (segmentation and probability.)

Why propensity modeling for this exercise?  I wanted to rank my superheroes for the bracket using statistics (i.e. Batman is not getting a number one seed.)

35 characters were segmented on strength, ability, defense and health.  For the propensity score I gathered ranking information from crowd sourced websites and surveys.  Using this I was able to give an intangible skill score.  The reasoning was I wanted the medium of comics to do the majority of the work for me.  Comics are stories and the narrative drives the inner core of a character.  The higher a character is on a fan sourced website I’m assuming they are written well and are timeless.

Next step was to take the mean of the intangible skill score and flag those characters above the average (this will be my dependent variable for my logistic regression to calculate a propensity score).

What was thrown into the propensity model?  The skill sets gathered from the Injustice game, the assumption here is a character of Superman’s skill set would be written much differently then say Catwoman.

011_pic


Now it’s time for our throw down.

001_pic

The top four characters by propensity score were:

Cyborg

Supergirl

Aquaman

Black Adam

To determine a winner in the throw-downs characters were put up against each other in 11 categories.


Round 1 Takeaways:

002_pic

Our number one seed Cyborg nearly lost to Atrocitus. The result was 6-2-5, that’s read as six wins, 2 ties and 5 losses.

There were no upsets in the first round of play.  A few characters did not win a single category in their match-ups:

Harley Quinn (vs. Captain Cold)

Green Arrow (vs. Batman)

Black Manta (vs. Black Canary)

These three characters were ill-equipped to take on their opponent, it is possible they would have advanced given a new opponent.

003_pic


Round 2 Takeaways:

004_pic

Cyborg (our number one seed) defeated Captain Cold by a larger difference (+3 winning categories) compared to the previous match-up against Atrocitus, but he scored one win less.

We begin to see upsets in Round 2:

Robin defeated Black Adam by 1 winning category.  Wonder Woman defeated Firestorm by 4 winning categories.  Batman defeated Supergirl by 3 wining categories.

On propensity scores these were upsets, but from comic book debate standpoint you could argue these, i.e. given enough time to prepare Batman could defeat Supergirl.

005_pic


Round 3 Takeaways:

006_pic

Cyborg falls to Superman, loss by 4 categories.  This was the biggest fight Superman was given in this tournament to date (in both previous rounds he had 9 winning categories).

The upsets keep coming in:

Robin sneaks in a win again by 1 winning category (over Brainiac). Wonder Woman defeats the top seed in her region of the bracket (Aquaman) by 4 winning categories.  Batman defeated Green Lantern by 3 winning categories.

007_pic


Final 4 Takeaways:

008_pic

Robin’s Cinderella story comes to an end at the hands of Superman (winning in 9 categories).  Robin did fair better than those previously who gave Superman 9 category wins… Robin won in 2 categories.

Batman was able to upset Wonder Woman, by 2 winning categories.  We’re set for a championship round, the original who wins… Batman Versus Superman!

batman-vs-superman-movie


Our winner is…

009_pic

Superman defeats Batman.  Superman did not win in a landslide.  Batman loss by two categories but he was able to win in 5 categories.  Previously the highest total win categories against Superman were 3 winning categories.


What did we learn from diving into the DC data?  Comic book writing and fan perception goes along way in determining who wins a thrown debate.  If we use propensity modeling we can have more even playing field and limit the amount of unfair battles.


005

SupermanPancakesW


003_008

K-Means Clustering, NBA2k

Recipe: 004 A Data Driven Approach During the NBA Pace and Space Era

logo

The format of this post will be slightly different from previous recipes.  Think of this as a yelp review, I’ll be going sharing the paper I presented during the SESUG 2018 SAS Conference.  This will be wordy than usual, but I will start with the recipe card per usual and then we’ll dive deep into the paper.  At the end of this post you’ll be a full belly of a new approach to building a NBA team, can be applied to one of my favorite game modes in the 2K series… Franchise mode.


001


002


SESUG Paper 234-2018 Data Driven Approach in the NBA Pace and Space Era

ABSTRACT

Whether you’re an NBA executive or Fantasy Basketball owner or a casual fan, you can’t help but begin the conversation of who is a top tier player? Currently who are the best players in the NBA? How do you compare a nuts and glue defensive player to a high volume scorer? The answer to all these questions lies within segmenting basketball performance data.

OVERVIEW

A k-means cluster is a commonly used guided machine learning approach to grouping data. I will apply this method to human performance. This case study will focus on NBA basketball individual performance data. The goal at the end of this case study will be to apply a k-means cluster to identify similar players to use in team construction.

INTRODUCTION 

My childhood was spent in Brooklyn, New York. I’m a die-hard New York Knicks fan. My formative years were spent watching my favorite team get handled by arguably the greatest basketball player of all time, Michael Jordan. Several moments throughout my life and to this day it crosses my mind, only if we had that player on our team. Over time I have come to terms with we would never have Michael Jordan or player of his caliber, but wouldn’t it be interesting if a NBA team could find complimentary parts or look-a-like players? This is why I’m writing a paper about finding these look-a-likes, these diamonds in the rough, or as the current term is “Unicorns”. Let’s begin this journey together in search for a cluster of basketball unicorns.

WATCHING THE GAME TAPE

What do high level performers have in common? In most cases you’ll find they study their sport, study their own game performance, study their opponents and study the performance of other athletes they strive to be like. The data analyst equivalent to watching game tape would be to gather as many independent and dependent variables as possible to perform an analysis. For the NBA data used in this k-means cluster analysis, I took the approach of what contributes to success in winning a game. Outscoring your opponent was a no-brainer starting point, but I’ll need to dig deeper. How many ways can and what methods can you outscore an opponent? The avid basketball fan would agree how a player scores a basket (i.e. field goal vs behind the three point line) will determine how they fit into an offensive scheme and defines their game plan. Beyond scoring there are other equally as important contributors to basketball performance. This is where I began to think of how much hustle and defensive metrics could I gather (i.e. rebounds, assists, steals, blocks, etc.). Could I normalize all of these metrics to come to get a baseline on player efficiency and more importantly effectively identify an individual player’s role in a team’s overall performance? To normalize my metrics I made the decision to produce my raw data on a per minute level, this way I wouldn’t show biases to high usage players or low usage players. To identify how a player fits into an offensive scheme and their scoring tendencies I calculated an individual level what percent of points scored comes from all methods of scoring (i.e. free throw percentage, three pointers made, two point field goals). Once I went through all of my data analyst game tape, I was ready to hold practice and cluster.

HOLDING PRACTICE

Practice makes perfect, but everything in moderation (i.e. the New York Knicks of the 1990’s overworked themselves during practice, they would lose steam in long games). Similar to I wouldn’t want to over-fit a model on sample data, I won’t get too complicated with my approach to standardizing my variables. Utilizing proc standard, I’ll standardize my clustering variables to have a mean of 0 and a standard deviation of 1. After standardizing the variables I’ll run the data analyst version of a zone defense (proc fastclus and use a macro to create max clusters from 1 through 9). I don’t anticipate to use a 9 cluster solution once running the game plan and evaluating my game time results. Ideally I want to keep my cluster size to small manageable number while still showing a striking difference between the groups. To evaluate how many cluster I’ll analyze to come to a final solution, I’ll extract the r-square values from each cluster solution and then merge them to plot an elbow curve. Using proc gplot to create my elbow curve, I’ll want to observe where the line begins to curve (creating an elbow). Finally, before we’re kicked off the court for another team’s practice, I’ll use proc anova to validate my clusters. As a validate metric I’ll use the variable “ttll_pts_per_m” this should help identify the difference between a team’s “go-to” option and a player whom is more of a complimentary piece at best.

RUNNING GAME PLAN AND GAME TIME RESULTS

A k-means cluster analysis was conducted to identify underlying subgroups of National Basketball Association athletes based on their similarity of responses on 11 variables that represent characteristics that could have an impact on 2016-17 regular season performance and play type. Clustering variables included quantitative variables measuring: perc_pts_ft (percentage of points scored from free throws) perc_pts_2pts (percentage of points scored from 2 pt field goals) perc_pts_3pts (percentage of points scored from 3 pt field goals) ‘3pts_made_per_m’N (3 point field goals made per minute) reb_per_min (rebounds per minute) asst_per_min (assists per minute) stl_per_min (steals per minute) blk_per_min (blocks per minute) fg_att_per_m (field goals attempted per minute) ft_att_per_min (free throws attempted per minute) fg_made_per_m (field goals made per minute) ft_made_per_m (free throws made per minute) to_per_min (turnovers per minute) All clustering variables were standardized to have a mean of 0 and a standard deviation of 1. Data was randomly split into a training set that included 70% of the observations (N=341) and a test set that included 30% of the observations (N=145). A series of k-means cluster analyses were conducted on the training data specifying k=1-9 clusters, using Euclidean distance. The variance in the clustering variables that was accounted for by the clusters (r-square) was plotted for each of the nine cluster solutions in an elbow curve (see figure 1 below) to provide guidance for choosing the number of clusters to interpret.

003

Canonical discriminant analyses was used to reduce the 11 clustering variable down a few variables that accounted for most of the variance in the clustering variables. A scatter-plot of the first two canonical variables by cluster (Figure 2 shown below) indicated that the observations in cluster 3 is the most densely packed with relatively low within cluster variance, and did not overlap very much with the other clusters. Cluster 1’s observations had greater spread suggesting higher within cluster variance. Observations in cluster 2 have relatively low cluster variance but there are a few observations with overlap.

004

The means on the clustering variables showed that, athletes in each cluster have uniquely different playing styles.

Cluster 1:

These athletes have high values for percentage of points from free throws, moderate on percentage points from 3 point field goals and low on percentage of points from 2 point field goals. These athletes attempt more field goals per minute, free throws per minute, make more 3 point field goals per minute and have the highest value for assists per minute; these athletes are focal points of a team’s offensive strategy.

Athletes in this cluster: Kevin Durant ,Anthony Davis, Stephen Curry

Cluster 2:

The athletes have extremely high values for percentage of points from 2 point field goals, moderate on percentage points from free throws, and extremely low values for percentage of points from 3 point field goals. These athletes rarely make perimeter shots and have low values for assists.

Athletes in this cluster: Rudy Gobert, Hassan Whiteside, Myles Turner

Cluster 3:

The athletes have high values for percentage of points from 3 point field goals, and low values for point 2 point field goals and free throws. These athletes stay on the perimeter (high values for 3 point field goals made) but are a secondary option at best, observed by a low field goal attempts per minute.

Athletes in this cluster: Otto Porter, Klay Thompson, Al Horford

In order to externally validate the clusters, an Analysis of Variance (ANOVA) was conducting to test for significant differences between the clusters on total points scored per minute (ttl_pts_per_m). A tukey test was used for post hoc comparisons between the clusters. The results indicated significant differences between the clusters on ttl_pts_per_m (F(2, 340)=86.67, p<.0001). The tukey post hoc comparisons showed significant differences between clusters on ttl_pts_per_m, with the exception that clusters 2 and 3 were not significantly different from each other. Athletes in cluster 1 had the highest ttl_pts_per_m (mean=.541, sd=0.141), and cluster 3 had the lowest ttl_pts_per_m (mean=.341, sd=0.096).

CONCLUSION

Using a k-means cluster is a data driven approach to grouping basketball player performance. This method can be used in constructing a team when a salary budget is constricted. The elephant in the room is this essentially is human behavior, therefore the validation step using proc anova is critical. The approach I’ve applied to the NBA data is a guide machine learning approach.


005007


006

https://www.nba2k.com/

http://www.sesug.org/SESUG2018/index.php


003_008

K-Means Clustering, Pokemon Go

Recipe: 001 Pokémon Go K-Means Clustering Segmentation

logo


Here’s a treat for all the Pokémon Go players out there.  You’ll find below a recipe for a cluster analysis intended to guide you in building the most cost effective team of Pokémon. The goal of this recipe is to segment Kanto (GEN 1) Pokémon which can be found in the wild, with an emphasis on return on investment (ROI), or in this case Candy Cost investment and Gym Battle return.  Hope you enjoy! – Tom

001


002


003


004


005


006


007


008


Good Old Fashioned Pancake Recipe:

https://www.allrecipes.com/recipe/21014/good-old-fashioned-pancakes/

Cool Pokémon Pancake Art:

Support our theme for this week’s analytics:

https://www.pokemongo.com/en-us/

https://www.pokemon.com/us/

Follow this blog on Instagram: Pancake_analytics