You are on page 1of 3

TCB3343 Artificial Intelligence

Exercise 7: Machine Learning


1. Dataset in Table Q1a shows the different properties observed on people from
two different continents American and Asian.
Table Q1a
Height

Hair

Eyes

People

Short

Blond

Blue

American

Tall
Tall

Blond
Red

Brown
Blue

Asian
American

Short

Dark

Blue

Asian

Tall

Dark

Blue

American

Tall

Blond

Blue

American

Short
Short

Dark
Blond

Brown
Brown

Asian
American

Using Nave Bayesian learning algorithm, classify the new data in Table Q1b.
Table Q1b

2.

Height

Hair

Eyes

Tall

Dark

Brown

Dataset in Table Q2a shows the parameters affecting a kite flying activity.
Table Q2a
Sky
Sunny
Cloudy
Cloudy
Sunny

Temperature
Cold
Cold
Cold
Hot

Rain
None
Shower
Shower
Shower

Wind
Strong
Weak
Strong
Strong

Fly Kite?
Yes
Yes
No
No

Using Nave Bayesian learning algorithm, classify the new data in Table Q2b.
Table Q2b
Sky
Cloudy

Temperature
Hot

TCB3343 Artificial Intelligence / Sept 2014

Rain
Shower

Wind
Strong

3.

A dataset for a project assessment risk analysis is shown in Table Q3.


Table Q3
Fund
Inadequate
Inadequate
Adequate
Adequate
Adequate
Inadequate
Inadequate

Team
Large
Small
Large
Large
Small
Large
Small

Risky?
Yes
Yes
No
Yes
No
Yes
Yes

Calculate each of the following. Show all your work.

4.

a.

The Entropy of the whole dataset.

b.

The Information Gain for Fund attribute.

c.

The Information Gain for Team attribute.

Dataset in Table Q4 shows the properties observed on roses.

Using ID3

learning algorithm, draw the Decision Tree and state the possible properties for a
rose that can be learnt in rules form. Show all your work.
Table Q4
Leaf

Color

Smell

Class

Short

Pink

Yes

Positive

Long

Pink

No

Negative

Long

Red

Yes

Positive

Short

Yellow

Yes

Negative

Long

Yellow

Yes

Negative

Long

Pink

Yes

Positive

Long

Yellow

No

Negative

Short

Pink

No

Negative

TCB3343 Artificial Intelligence / Sept 2014

5.

A dataset of attributes that determine whether a person will purchase a computer is


shown in Table Q5.

Draw the decision tree using ID3 algorithm. Show all your

calculations.
Table Q5
Age

Income

Student?

<30
<30
30-40
>40
>40
>40
31-40
<30
<30
>40
<30
31-40
31-40
>40

high
high
high
medium
low
low
low
medium
low
medium
medium
medium
high
medium

no
no
no
no
yes
yes
yes
no
yes
yes
yes
no
yes
no

TCB3343 Artificial Intelligence / Sept 2014

Credit
Rating?
fair
excellent
fair
fair
fair
excellent
excellent
fair
fair
fair
excellent
excellent
fair
excellent

Buy Computer?
no
no
yes
yes
yes
no
yes
no
yes
yes
yes
yes
yes
no

You might also like