Pokémon 151 Card Rarity Classifier
This model predicts whether a Pokémon: Scarlet & Violet—151 expansion card is Common (0) or Rare (1) from six printed card stats.
Inputs and outputs
| Input column | Type |
|---|---|
hp, attack_count, retreat_cost |
Numeric |
type, stage, has_ability |
Categorical |
| Label | Meaning |
|---|---|
0 |
Common |
1 |
Rare (positive class) |
The rarity column restates the target, so it is excluded from inputs along with the ID and augmentation columns.
Data and training
Source: Pokémon 151 tabular dataset.
The published validation split has only 4 cards. The original training and validation cards were pooled and re-split with stratification (seed 24679) so validation contains both classes. The published test split was kept unchanged. Synthetic variants were kept only if both parents were in training and all three shared a label, which retained 239 of 315.
| Partition | Original cards | Retained variants | Total | Common / Rare (originals) |
|---|---|---|---|---|
| Training | 21 | 239 | 260 | 11 / 10 |
| Validation | 4 | 0 | 4 | 2 / 2 |
| Test | 5 | 0 | 5 | 2 / 3 |
| Training setting | Recorded value |
|---|---|
| Framework | AutoGluon Tabular 1.6.1 |
| Preset | medium_quality, default hyperparameters (no per-model HPO) |
| Search space | LightGBM (×3), XGBoost, RandomForest (×2), ExtraTrees (×2), NeuralNetFastAI, NeuralNetTorch, WeightedEnsemble_L2 |
| Selection metric | Validation balanced accuracy |
| Bagging / stacking | Disabled (num_bag_folds=0, num_stack_levels=0) |
| Fit budget | 300 s configured; 16.3 s actual |
| Selected model | WeightedEnsemble_L2, weight 1.0 on XGBoost |
| Environment | Colab CPU (2 vCPU, 12.7 GB RAM, no GPU); Linux; Python 3.13.15 |
Every candidate reached validation balanced accuracy of 1.0 on the 4 validation cards, so choosing XGBoost was effectively a tie-break.
Evaluation
The results below are for the 5 original test cards. The baseline always predicts Common, the majority class among original training cards.
| Test metric | Model | Majority baseline |
|---|---|---|
| Accuracy | 1.000 (5/5) | 0.400 (2/5) |
| Balanced accuracy | 1.000 | 0.500 |
| F1, Rare | 1.000 | 0.000 |
| Actual / predicted | Common | Rare |
|---|---|---|
| Common | 2 | 0 |
| Rare | 0 | 3 |
Each changed prediction moves accuracy by 20 points. P(Rare) was 0.52 for every Rare card and 0.43 for every Common card, so predictions sit near the threshold. The model has only 21 independent training cards and covers a single set.
Load and predict
import zipfile
from huggingface_hub import hf_hub_download
from autogluon.tabular import TabularPredictor
archive = hf_hub_download("REPO_ID_PLACEHOLDER", "autogluon_predictor_dir.zip")
zipfile.ZipFile(archive).extractall("pokemon_model")
predictor = TabularPredictor.load("pokemon_model")
Licensing and provenance
The model is released under Apache-2.0. The dataset card specifies no license. Pokémon names and card designs are trademarks of Nintendo and The Pokémon Company; this model uses only card stats.
AI usage disclosure
Claude was utilized to help modify an exisitng notebook template. Additionally, Claude was used to assist with model card creation.