Skip to content

SupratikB23/Poker-Hand-Prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎴 Poker Hand Prediction Model 🎴

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)]

Made with Jupyter Python 3.x License: MIT

Screenshot 2025-01-14 092314

📊 Dataset Information

  • 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.

⚙️ Workflow

  1. Data Loading – Import training and testing files from /Dataset.
  2. Preprocessing – Validate schema, handle encoding and normalizate the data.
  3. Feature Engineering – Represent ranks/suits and derive hand features where useful.
  4. Model Training – Train models (MLP, Random Forest, Gradient Boosting).
  5. Evaluation – Accuracy, precision, recall, F1-score, and confusion matrix on the test set.

🧠 Models Used

  • Multi-Layer Perceptron Classifier (MLP)
  • Random Forest Classifier
  • Gradient Boosting Classifier
  • Stacking Classifier (all above 3 models)

📈 Results

Model vs Accuracy

__results___19_0

ROC Curve

ROC 20_0

Heatmap for Stacking Classifier

Heat 0

🛠️ Requirements

Install the core dependencies:

pip install pandas numpy scikit-learn imbalanced-learn matplotlib seaborn 

🚀 How to Run

  1. Clone the repository:
    git clone https://github.com/SupratikB23/Poker-Hand-Prediction.git
  2. Open the notebook:
    jupyter notebook Poker_Hand_Prediction_Model.ipynb
  3. Run all cells to train and evaluate the model.

📂 Repository Structure

Poker Hand Prediction
├── Dataset
│   ├── poker-hand-training.data   
│   └── poker-hand-testing.data  
├── Poker_Hand_Prediction_Model
├── LICENSE 
├── NOTICE 
└── README.md                    

💡 Use Cases

  • Educational Tool – Practice and compare classification algorithms.
  • Game Simulation – Integrate into poker bots or simulators.
  • Statistical Analysis – Explore hand probability patterns.

📜 License

This project is licensed under the MIT License. You are free to use, modify, and distribute with attribution.

🙌 Acknowledgements

About

A ML/DL project that predicts Poker Hand rankings based on given card combinations.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors