Given the training set below: Age Income Student Credit_rating Buys_computer <=3
ID: 3326568 • Letter: G
Question
Given the training set below:
Age
Income
Student
Credit_rating
Buys_computer
<=30
high
no
fair
no
<=30
high
no
excellent
no
31…40
high
no
fair
no
>40
medium
no
fair
yes
<=30
low
no
fair
yes
>40
high
no
fair
no
>40
low
yes
fair
yes
>40
low
yes
excellent
no
31…40
low
yes
excellent
yes
<=30
medium
no
fair
no
<=30
low
yes
fair
yes
>40
medium
yes
fair
yes
<=30
medium
yes
excellent
no
31…40
medium
no
excellent
no
31…40
high
yes
fair
yes
>40
medium
no
excellent
yes
The information gain for attribute Student is:
Age
Income
Student
Credit_rating
Buys_computer
<=30
high
no
fair
no
<=30
high
no
excellent
no
31…40
high
no
fair
no
>40
medium
no
fair
yes
<=30
low
no
fair
yes
>40
high
no
fair
no
>40
low
yes
fair
yes
>40
low
yes
excellent
no
31…40
low
yes
excellent
yes
<=30
medium
no
fair
no
<=30
low
yes
fair
yes
>40
medium
yes
fair
yes
<=30
medium
yes
excellent
no
31…40
medium
no
excellent
no
31…40
high
yes
fair
yes
>40
medium
no
excellent
yes
Explanation / Answer
B1. Predict the class of each record:
Ans)
age
income
Student
credit_rating
buys_computer
Prediction
1
<=30
high
No
Fair
no
no
2
<=30
high
No
Excellent
yes
no
3
31…40
high
No
Fair
yes
yes
4
>40
medium
No
Fair
no
yes
5
>40
low
Yes
Fair
yes
yes
6
>40
low
Yes
Excellent
no
no
7
31…40
low
Yes
Excellent
no
yes
8
<=30
medium
No
Fair
no
no
9
<=30
low
Yes
Fair
yes
yes
10
>40
medium
Yes
Fair
No
yes
Accuracy = Number of correct predictions
Total number of predictions
Accuracy=6/10 =0.6
age
income
Student
credit_rating
buys_computer
Prediction
1
<=30
high
No
Fair
no
no
2
<=30
high
No
Excellent
yes
no
3
31…40
high
No
Fair
yes
yes
4
>40
medium
No
Fair
no
yes
5
>40
low
Yes
Fair
yes
yes
6
>40
low
Yes
Excellent
no
no
7
31…40
low
Yes
Excellent
no
yes
8
<=30
medium
No
Fair
no
no
9
<=30
low
Yes
Fair
yes
yes
10
>40
medium
Yes
Fair
No
yes
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.