Data Science2023
Pokedex — 800 Pokemon Under the Microscope
Exploratory analysis and battle-outcome prediction across the complete Pokemon stat universe.
- Feature engineering first
- Interpretable baselines
- Playful without being sloppy
- Population
- 800+ Pokemon
- Features
- 6 base stats + typing
- Model
- Naive Bayes classifier
- Method
- EDA-driven features
01
Overview
The Pokemon universe is a closed statistical system: hundreds of creatures, each defined by the same six base stats, two type slots, and a web of type-effectiveness rules. That makes it an unusually clean sandbox for real analysis technique. This notebook takes the full Kaggle Pokedex and treats it seriously — distribution analysis, type-matchup structure, correlation between stats, and a Naive Bayes classifier predicting battle outcomes.
02
Problem
Toy datasets teach nothing because nothing is at stake and no structure exists to find. Pokemon data is the opposite: deliberately designed balance, legendary outliers, and generation-by-generation power creep are all real patterns waiting in the numbers — if the analysis is careful enough to separate them.
03
Goals
- Map the stat distributions and their outliers — what actually makes a legendary legendary
- Quantify type advantages beyond the folklore of the type chart
- Train and honestly evaluate a battle-outcome classifier on engineered stat differences
04
Solution
EDA first: distribution plots for each base stat, correlation heatmaps across Attack, Defense, HP, Speed and the special stats, and side-by-side comparisons across primary and secondary types — surfacing how the designers trade bulk against speed and where legendaries break the curve.
The predictive layer frames battles as a classification problem: given two Pokemon, engineered features (stat differentials, type relationships) feed a Naive Bayes model, chosen deliberately as an interpretable baseline whose assumptions can be checked against the data rather than a black box.
Tooling
Tech stack
- Python
- pandas
- NumPy
- seaborn
- matplotlib
- scikit-learn
- Jupyter
Friction
Challenges
Feature engineering beats model choice
Raw stats predict poorly; differences and ratios between the two combatants carry the signal. The lesson generalises to every matchup-prediction problem — encode the comparison, not the entities.
Class balance and the Speed problem
Faster Pokemon win disproportionately, so a model can look smart by learning one feature. Evaluation had to check what the model uses, not just its accuracy.
Takeaways
Lessons learned
- An interpretable baseline (Naive Bayes) that you can interrogate is worth more early on than an opaque model with two extra points of accuracy
- Game-design data rewards analysis unusually well because its structure was put there on purpose
- The EDA-to-model handoff is where most notebooks go wrong; features should come from the exploration, not despite it
Evidence
Dataset
The Complete Pokemon Dataset
Kaggle — Rounak Banik
Base stats, types, abilities, and metadata for 800+ Pokemon across seven generations.
View datasetRoadmap
Future improvements
- Upgrade the battle model with type-effectiveness interaction terms
- Generation-over-generation power-creep analysis
- An interactive matchup explorer in the browser
Rebuilt for this site from the original repository — source history