https://github.com/saadarazzaq/probabilistic-tennis-classifier
Predict tennis play decisions from weather data with Naive Bayes Classifier. πΎπ₯
https://github.com/saadarazzaq/probabilistic-tennis-classifier
machine-learning naive-bayes-classifier probabilistic-models supervised-learning
Last synced: over 1 year ago
JSON representation
Predict tennis play decisions from weather data with Naive Bayes Classifier. πΎπ₯
- Host: GitHub
- URL: https://github.com/saadarazzaq/probabilistic-tennis-classifier
- Owner: SaadARazzaq
- Created: 2023-10-30T14:25:36.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-01T16:22:36.000Z (almost 3 years ago)
- Last Synced: 2025-01-23T16:14:23.857Z (over 1 year ago)
- Topics: machine-learning, naive-bayes-classifier, probabilistic-models, supervised-learning
- Language: Jupyter Notebook
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# πΎ Probabilistic Tennis Classifier π¦

Welcome to the **Probabilistic Tennis Classifier**βwhere we bring a dash of data science and machine learning into your daily tennis game decisions! π€...
`NOTE: *Funfact: This Code is all writen without using ML libraries. All handcrafted with bacjend logic of the algorithm π*`
## πΎ Introduction
Are you ever in a dilemma about whether to grab your tennis racket and hit the courts when the weather is just as unpredictable as your tennis partner's serve? πΎπ€οΈ This repository has your back!
Our nifty **Naive Bayes classifier** is here to help you decide whether it's a good idea to play tennis on a given day based on the weather conditions. We're taking the guesswork out of your tennis plans and replacing it with data-driven decision-making! π
## π¦ Problem Statement
Let's set the stage for our problem:
**Problem 1:**
Imagine you wake up to a day with the following weather conditions:
- Outlook: Sunny βοΈ
- Temperature: Hot π₯
- Humidity: High π§
- Wind: Weak π¬οΈ
Your task? Determine whether it's a good day to grab your tennis gear and head out to the courts. πΎ
## π§ Intuition
We're not just guessingβour classifier is armed with the power of probability and Bayesian reasoning. To make the call, we calculate two important probabilities:
- **P(Yes | Sunny, Hot, High, Weak)**: The chance of playing tennis when it's sunny, hot, humid, and with a gentle breeze.
- **P(No | Sunny, Hot, High, Weak)**: The probability of skipping tennis on such a day.
We break these probabilities down into the individual components:
- **P(Sunny | Yes)**: How often it's sunny when we decide to play tennis.
- **P(Hot | Yes)**: The likelihood of a hot day for tennis.
- **P(High | Yes)**: The probability of high humidity during a tennis game.
- **P(Weak | Yes)**: The chances of weak wind on tennis days.
- **P(Yes)**: The overall probability of playing tennis.
We do the same for not playing tennis (No). Then, we compare the results and go with the one that shouts "Play Tennis!" the loudest. This smart decision-making process is what we call the **Maximum a Posteriori (MAP) rule.**
## π Repository Structure
- `data/play_tennis.csv`: Our secret sauce, a dataset with historical weather and tennis play decisions.
- `notebook.ipynb`: The magical Python script housing our custom Naive Bayes classifier.
- `README.md`: The interactive tour guide you're reading right now.
## π Usage
Want to see our classifier in action? Dive into the `notebook.ipynb` file, where we showcase how to use the classifier to make predictions based on weather conditions.
## π Contributions
We welcome contributions and feedback from anyone who wants to make this project even cooler. Feel free to submit a pull request with your ideas for improvement or expansion. π
## π© Credits
This project was crafted with π by [Saad Abdur Razzaq](https://github.com/SaadARazzaq) and [Wasif Anwar](https://github.com/wiznemm). If you find it helpful, a little tip of the hat in the form of credit to this repository would be much appreciated.
Ready to let data guide your tennis game decisions? Let's play some tennis! πΎπ
*Serve responsibly.* πΎππ₯€