Using the following training dataset, apply Naïve Bayes classification algorithm to find the class of an unknown sample X = < Rainy, Cool, High, False >
| S. No | Outlook | Temperature | Humidity | Windy | Play Golf/Class |
| 0 | Rainy | Hot | High | False | No |
| 1 | Rainy | Hot | High | True | No |
| 2 | Overcast | Hot | High | False | Yes |
| 3 | Sunny | Mild | High | False | Yes |
| 4 | Sunny | Cool | Normal | False | Yes |
| 5 | Sunny | Cool | Normal | True | No |
| 6 | Overcast | Cool | Normal | True | Yes |
| 7 | Rainy | Mild | High | False | No |
| 8 | Rainy | Cool | Normal | False | Yes |
| 9 | Sunny | Mild | Normal | False | Yes |
| 10 | Rainy | Mild | Normal | True | Yes |
| 11 | Overcast | Mild | High | True | Yes |
| 12 | Overcast | Hot | Normal | False | Yes |
| 13 | Sunny | Mild | High | True | No |
Naïve Bayes is a probabilistic classifier based on Bayes' theorem, which assumes that the features (attributes) used to describe an object are conditionally independent of each other. This simplifies the calculation of probabilities, as we only need to calculate the probabilities of the individual features independently and then combine them. For the given dataset, we will use the Naïve Bayes classification algorithm to predict the class (Play Golf/No or Yes) of an unknown sample X = <Rainy, Cool, High, False>.
### Step 1: Understand the Dataset
The dataset consists of four features:
1. Outlook: The weather outlook for the day (Rainy, Overcast, Sunny).
2. Temperature: The temperature of the day (Hot, Mild, Cool).
3. Humidity: The humidity level (High, Normal).
4. Windy: Whether it is windy or not (True or False).
The target class, which is what we want to predict, is Play Golf with possible values `Yes` or `No`.
### Step 2: Calculate the Prior Probabilities
The prior probability ______ ______ ________ _______ ____ ________ _________ ________ _______ ________ _____ ________.
_________ ___ ________ ____ ____ _______.
__________ ____ _______ __________ _______ ____ ___.
________ ________ ___ ______ ____ ____ ____ _______ ________ ___ ____.
_________ ________ _____ ________ ____ _______.
__________ ______ ______ ______ _____ ______ _______.
____ __________ ___ _____ _________ _______ _________ ___.
______ __________ ________ _____ _____ ___ __________ __________ ___ ________.
_______ ______ __________ __________ _____ ________ ____ _____ _____ ___.
____ _________ ________ _____ ____ ___ ____ _____ ________ _______ _______ ________.
_____ _______ _______ ________ _________ ____ _____ ______ _________ ______ ________ _____.
_______ ______ __________ __________ _________ ________.
____ _________ ________ ________ _______ _________.
___ __________ ______ _________ ________ _____ ___ ________.
_________ ___ __________ __________ _____ _____ _________.
___ __________ ______ ___ ____ _______ ____ _________ _______ ______.
_____ ____ ___ ______ _____ _________ ________.
________ ________ ______ ___ ________ ___ _______ ____ ________ _________ ___ ______.
_______ ___ ______ ____ ___ _____ __________ ______ _______.
_______ __________ _________ _____ _____ ______ ___ _______ __________ _______ _________.
__________ ___ _____ ____ ____ ______ ________.
_________ ___ ___ _________ _________ ___.
_________ ________ _____ ___ __________ __________ ________ __________ _________ ______ ____ ____.
_______ ________ _____ ____ ________ ________ ___ ____ ____ ____ ___ _____.
______ ________ _____ ________ __________ ______ _______ ________ _______ ________ __________ __________.
____ __________ ___ ________ _______ _________ ____ _____ __________ ___ _________.
________ _________ ________ _______ ________.
____ ___ ____ _______ _____ ______.
________ _____ __________ ________ ____ __________ _________.
________ ______ _________ __________ _______ _____ __________ ______ ________.
________ ________ _____ ________ _________.
____ ____ _____ _______ _____.
_________ ___ ___ _______ __________ ___ _______ ________.
________ ______ _________ ___ ____.
_______ ________ __________ _______ ____ ________ ___.
_______ ____ ___ __________ ______ _________.
__________ ________ _______ ____ ______.
_______ ______ _____ _____ ___ ___ _______.
_____ ______ ____ _______ ________.
_____ ______ ________ _______ __________ _________ _____.
___ _________ __________ ______ ___ ___ _____ ____ ____ _____ __________.
_________ ____ _____ _________ _______.
____ ________ _____ _________ _______ ___ ____ ______ ______ _____ ______ _____.
__________ _______ _____ _____ __________.
___ _____ _______ ____ _______ ____ _______ ____.
____ ______ _________ __________ ____.
______ ____ _________ ______ _____ __________ ______.
_______ ____ __________ ____ _____ ______ _____ ______.
________ _____ ___ ________ ___.
_______ ____ _________ ___ ___ _______ _____ ______ ______ _________ _____ ___.
____ ________ ________ ___ _______ ______ _____ _____.
_______ ___ _______ ________ __________ ______ ___ ______ _________ _______ ___.
_______ ____ __________ ___ _______.
__________ __________ ________ _______ ___ ______ ______ _________ _______.
________ __________ ____ ___ _____ ___ __________ ___ ___ _____ ______.
_____ ____ __________ ____ __________ ____ __________ ______ __________ _______ ______.
_______ _____ ____ ____ ___ __________ __________.
______ __________ _______ ____ ___ __________ ______.
________ _______ _____ ________ _________ __________ _______ ________ __________ ________.
__________ _______ ______ ________ _________ ____ ____ _________ ________ ________.
_______ ____ ________ _________ __________.
____ _____ __________ ________ _______.
_________ _____ ____ ______ ______ _______ ____ ______.
________ _____ ____ ___ _______ ________ ___ _________ __________ _______ ____ _______.
______ ____ _____ ____ _____ ____.
__________ __________ _______ _______ ___ _______.
__________ _______ ____ _______ ___ _______ ________ _________ ______ ___.
________ __________ ___ __________ ________ ________ ___ ______ __________ ____ ______.
___ __________ ____ _____ _____ _____ _______ ________ _______ __________ _________ ______.
______ _________ ___ ____ ___ ___ ______.
_______ ____ ________ ____ ____.
___ _____ __________ _______ ___ _____ __________ _______ ________ __________.
_____ _______ _______ __________ ___ __________ ___ __________ _________ _______ ___.
______ _______ __________ __________ ______ _____ ___ __________ _____ ___.
_______ ___ __________ ______ ______ ________ ________ ____.
_________ ___ ____ ________ __________ ___ ___ _________.
________ _______ ___ _________ _________ ______ _________ _______ ____.
____ _______ _______ _____ _________ _______ _______ ____ ___ ________ ________ _____.
_____ ______ _________ _____ _______ ____ ______ ______ ___.
____ ____ _____ _____ ___ ________ _____ _______ ______ __________.
______ ______ __________ _______ __________ _____ ________.
_______ ______ _____ ___ ______ _________ _________ ________.
______ _______ ____ ________ _________ __________ ______ _________ ________.
_______ _________ _______ _______ _____ _________.
____ ____ __________ ___ ____.
______ _________ ___ ____ _____ _______.
_________ __________ ________ ______ ___ _______ __________ __________.
______ _________ ___ ____ ___ ____.
__________ ______ _____ __________ _________ __________ ____ _________ ______.
_________ _________ _______ _________ ___.
__________ ______ ____ _________ ____ _________.
____ ____ _____ _____ _____ _________ ____ _________ _________ ______ __________ ___.
____ ____ ____ _______ _____ _______ ________.
_______ ___ _________ _________ ______ ________ ____ ___ _________ _________ ________.
______ _______ _______ _______ ___ _____ ______.
_________ __________ ______ ____ _____ __________ ________ ________ ___ _______.
_________ ___ _______ ________ __________ ________ ___ _______ ______ _____ _________ _______.
__________ _________ _________ _______ __________ __________ _________ _____ _______.
________ _______ ___ ________ _______ _____ ______.
Get Full Answer on WhatsApp