Thanks to visit codestin.com
Credit goes to github.com

Skip to content

LucaSforza/Pokemon

Repository files navigation

Pokémon Battle Predictor — README

Brief description

Project to predict the outcome of Pokémon battles from the early phases of a match. Raw data (jsonl files) are loaded into a SQLite DB, preprocessed, and used to train/evaluate various ML models.

What load_data.py does

  1. Creates a DB connection and registers a new Dataset (Train or Test).
  2. For each match in the JSONL:
  3. Maintains consistency with INSERT OR IGNORE for reference tables (type, status, moves).
  4. Final commit of the data into the DB.

data_analyzer folder

The data_analyzer/ folder contains code to extract, preprocess, select models and run experiments:

  • data_analyzer/init.py — exports main functions from lib.py.
  • data_analyzer/lib.py — utilities and preprocessing / I/O pipeline:
    • get_datapoints — builds the dataset with all normalized features (as described in the report).
    • load_datapoints — reads preprocessed tables (Input, Output, TestInput, TestOutput).
    • create_submission — generates submission CSVs from predictions.
    • load_best_model — reconstructs a model from the information in models.json.
  • data_analyzer/model_selection.py — classes and helpers for hyperparameter search and validation:
    • ModelTrainer and various implementations (LogisticRegressionTrainer, RandomForestClassifierTrainer, XGBClassifierTrainer, etc.) for cross‑validation and hyperparameter search.
    • plot_history — saves validation plots.
  • data_analyzer/main.py — CLI for analysis operations (save dataset, PCA, training, ensemble, etc.). Runs routines that use functions from lib.py and model_selection.py.

Typical execution

  • main.py contains the entire pipeline to reproduce the results; it was later converted into a notebook for the Kaggle challenge.

Useful resources in the repo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •