Table 4.4

Golf Dataset With Modified Temperature and Humidity Attributes
No.Temperature X1Humidity X2Outlook X3Wind X4Play (Class Label) Y
1HighMedSunnyfalseno
2HighHighSunnytrueno
3LowLowRaintrueno
4MedHighSunnyfalseno
5LowMedRaintrueno
6HighMedOvercastfalseyes
7LowHighRainfalseyes
8LowMedRainfalseyes
9LowLowOvercasttrueyes
10LowLowSunnyfalseyes
11MedMedRainfalseyes
12MedLowSunnytrueyes
13MedHighOvercasttrueyes
14HighLowOvercastfalseyes

Image

Step 1: Calculating Prior Probability P(Y)

Prior probability P(Y) is the probability of an outcome. In this example set there are two possible outcomes: Play=yes and Play=no. From Table 4.4, 5 out of 14 records with the “no” ...

Get Data Science, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.