A Machine Learning & Deep Learning project that predicts poker hand rankings from 5-card combinations.
The model classifies hands such as High Card, Pair, Two Pair, Three of a Kind, Straight, Flush, Full House,
Four of a Kind, Straight Flush, and Royal Flush.
[Project for Social Winter of Code (SWOC 2025)]
- Each row represents a single 5-card poker hand.
- Columns encode the rank and suit for each card.
- A target column stores the integer label for the hand category.
- Source: Noah Boggs – Poker Hand Dataset.
- Data Loading – Import training and testing files from /Dataset.
- Preprocessing – Validate schema, handle encoding and normalizate the data.
- Feature Engineering – Represent ranks/suits and derive hand features where useful.
- Model Training – Train models (MLP, Random Forest, Gradient Boosting).
- Evaluation – Accuracy, precision, recall, F1-score, and confusion matrix on the test set.
- Multi-Layer Perceptron Classifier (MLP)
- Random Forest Classifier
- Gradient Boosting Classifier
- Stacking Classifier (all above 3 models)
Install the core dependencies:
pip install pandas numpy scikit-learn imbalanced-learn matplotlib seaborn - Clone the repository:
git clone https://github.com/SupratikB23/Poker-Hand-Prediction.git - Open the notebook:
jupyter notebook Poker_Hand_Prediction_Model.ipynb - Run all cells to train and evaluate the model.
Poker Hand Prediction
├── Dataset
│ ├── poker-hand-training.data
│ └── poker-hand-testing.data
├── Poker_Hand_Prediction_Model
├── LICENSE
├── NOTICE
└── README.md
- Educational Tool – Practice and compare classification algorithms.
- Game Simulation – Integrate into poker bots or simulators.
- Statistical Analysis – Explore hand probability patterns.
This project is licensed under the MIT License. You are free to use, modify, and distribute with attribution.
- Noah Boggs - Poker Hand Classification for the dataset.
- Social Winter of Code (SWOC 2025)