This project utilizes the IRC Poker dataset to analyze Poker hands from Holdem3 game files. It includes steps for data extraction, preparation, analysis, and building a predictive model.
- Create a Virtual Environment
Create a Python virtual environment to isolate project dependencies:python -m venv venv
- Activate the Virtual Environment
Activate the virtual environment and install all the dependencies
source venv/bin/activate pip install -r requirements.txt - Run the Data Extractor
Execute the
extractor.pyscript to extract Poker hands data. After execution, ahands.jsonfile will be created in the main directory:python extractor.py
The extractor.py script processes the Holdem3 game files and extracts Poker hands data, saving it in a hands.json file in the root directory.
The data_preparation.ipynb notebook contains all necessary steps to convert the hands.json file into a .csv format. The key output is the data/holdem3.csv file, which will be used in subsequent steps.
The data_analysis.ipynb notebook provides a detailed analysis of the participating players in Holdem3 game hands. Insights and patterns observed during the analysis are highlighted.
The model_building.ipynb notebook covers feature engineering and the development of a LightGBM model. This model predicts whether a player will win during the turn stage of the game.
Ensure all the following dependencies are installed by using the requirements.txt file:
source venv/bin/activate
pip install -r requirements.txt