Knowledge Representation
Asrul Abdullah
Adapted from Data Mining Practical Machine Learning Tools and Techniques, �I. H. Witten, E. Frank and M. A. Hall
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
2
Output - Knowledge representation
witten&eibe
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
Output: representing structural patterns
3
witten&eibe
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
Decision tables
4
Outlook | Humidity | Play |
Sunny | High | No |
Sunny | Normal | Yes |
Overcast | High | Yes |
Overcast | Normal | Yes |
Rainy | High | No |
Rainy | Normal | No |
witten&eibe
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
Decision trees
5
witten&eibe
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
Nominal and numeric attributes
6
witten&eibe
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
Missing values
7
witten&eibe
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
Classification rules
8
witten&eibe
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
From trees to rules
9
witten&eibe
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
From rules to trees
If a and b then x If c and d then x |
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
A tree for a simple disjunction
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
The exclusive-or problem
If x = 1 and y = 0�then class = a If x = 0 and y = 1�then class = a If x = 0 and y = 0�then class = b If x = 1 and y = 1�then class = b |
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
A tree with a replicated subtree
If x = 1 and y = 1�then class = a If z = 1 and w = 1�then class = a Otherwise class = b |
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
“Nuggets” of knowledge
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
Interpreting rules
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
Special case: boolean class
16
If x = 1 and y = 1 then class = a If z = 1 and w = 1 then class = a Otherwise class = b |
witten&eibe
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
Rules involving relations
17
witten&eibe
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
A propositional solution
18
Width | Height | Sides | Class |
2 | 4 | 4 | Standing |
3 | 6 | 4 | Standing |
4 | 3 | 4 | Lying |
7 | 8 | 3 | Standing |
7 | 6 | 3 | Lying |
2 | 9 | 4 | Standing |
9 | 1 | 4 | Lying |
10 | 2 | 3 | Lying |
If width ≥ 3.5 and height < 7.0�then lying If height ≥ 3.5 then standing |
witten&eibe
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
A relational solution
19
If width > height then lying If height > width then standing |
witten&eibe
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
Rules with variables
If height_and_width_of(x,h,w) and h > w�then standing(x) |
If height_and_width_of(z,h,w) and h > w� and is_top_of(x,z) and standing(y)� and is_rest_of(x,y)�then standing(x) If empty(x) then standing(x) |
If height_and_width_of(x,h,w) and h > w� and is_top_of(x,y)�then standing(x) |
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
Inductive logic programming
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
Instance-based representation
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
The distance function
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas
Representing clusters
Probabilistic assignment
| 1 | 2 | 3 |
| | | |
a | 0.4 | 0.1 | 0.5 |
b | 0.1 | 0.8 | 0.1 |
c | 0.3 | 0.3 | 0.4 |
d | 0.1 | 0.1 | 0.8 |
e | 0.4 | 0.2 | 0.4 |
f | 0.1 | 0.4 | 0.5 |
g | 0.7 | 0.2 | 0.1 |
h | 0.5 | 0.4 | 0.1 |
Dendrogram
NB: dendron is the Greek
word for tree
Universitas Muhammadiyah Pontianak
www.asrulabdullah.my.id
inovasi, kolaborasi & integritas