Xi
Day Season Fog Rain
1 Weekday Spring None None
2 Weekday Winter None Slight
3 Weekday Winter None None
4 Holiday Winter High Slight
5 Saturday Summer Normal None
6 Weekday Autumn Normal None
7 Holiday Summer High Slight
8 Sunday Summer Normal None
9 Weekday Winter High Heavy
10 Weekday Summer None Slight
11 Saturday Spring High Heavy
12 Weekday Summer High Slight
13 Weekday Winter Normal None
14 Weekday Summer High None
15 Weekday Winter Normal Heavy
16 Saturday Autumn High Slight
17 Weekday Autumn None Heavy
18 Holiday Spring Normal Slight
19 Weekday Spring Normal None
20 Weekday Spring Normal Heavy
x1 = 13 x5 = 5 x9 = 5 x12 = 8 y1 =
x2 = 3 x6 = 6 x10 = 8 x13 = 7 y2 =
x3 = 1 x7 = 3 x11 = 7 x14 = 5 y3 =
x4 = 3 x8 = 6 y4 =
x1∩y1= 9
x1 = Weekday x5 = Spring x9 = None x12 = None
x2 = Saturday x6 = Summer x10 = Normal x13 = Slight
x3 = Sunday x7 = Autumn x11 = High x14 = Heavy
x4 = Holiday x8 = Winter
Weekday winter High
Class On time Late
On time Prior Probability P(Y=yi)= yi/n 14/20 = 0.7 2/20 = 0.1
On time Posterior Probability
On time (x1∩y1)/y1 (x1∩y2)/y2
Late x1 = Weekday 0.642857143 0.5
On time x2 = Saturday
Day
Very late x3 = Sunday
On time x4 = Holiday
On time x5 = Spring
Very late x6 = Summer
Season
On time x7 = Autumn
Cancelled x8 = Winter
On time x9 = None
Late Fog x10 = Normal
On time x11 = High
Very late x12 = None
On time Rain x13 = Slight
On time x14 = Heavy
On time
On time
On time
14
2
3
1
y1 = On time
y2 = Late
y3 = Vey Late
y4 = Cancelled
Heavy ?
Very late Cancelled To assign the class for:
3/20 = 0.15 1/20 = 0.05 Weekday Winter High Heavy
(x1∩y3)/y3 (x1∩y4)/y4
1 0
Fever Cough Body Pain Fatigue Disease Class
S.N.
1 1 0 0 Common Cold
1
1 1 1 1 Flu
2
1 0 0 1 COVID-19
3
0 1 0 0 Allergy
4
1 1 1 1 COVID-19
5
0 0 0 1 Allergy
6
1 0 1 1 Flu
7
1 1 1 0 COVID-19
8
0 1 0 1 Allergy
9
1 0 1 0 Flu
10
1 1 1 1 Flu
11
0 1 1 1 Allergy
12
1 0 0 0 Common Cold
13
1 1 0 1 COVID-19
14
0 0 1 1 Allergy
15
Counts of "0" 5 6 7 5 5
Counts of "1" 10 9 8 10 2
4
4
5 2 4 4
Allergy Common Cold Covid-19 Flu
Prior Prob.
Posterior
Probability
x1=0 No Allergy Case 1
x2=1 Allergy Case 2
x3=0 No Common cold Case 3
x4=1 Common cold Case 4
x5=0 No covid
x6=1 Covid
x7=1 No flu
x8=1 Flu
y1 = Allergy
y2 = Common Cold
y3 = Covid-19
y4 = Flu
To assign the class for:
fever cough no body pain no fatigue
Allergy
Common Cold
Covid-19
Flu