You are on page 1of 16

Fajar A.

Nugroho

Content
y Flashback to Machine Learning y Supervised Learning y Example y Weather data y Fruit data y Practice y Manual y Rapidminer y Weka

Flashback
y What is machine learning ?

Flashback
y Examples of Machine Learning Applications y Learning Associations y Supervised Learning y Unsupervised Learning y Reinforcement Learning

Supervised Learning
y Learning a Class from Examples

Historical Data
Outl Sunny Sunny Overcast Rainy Rainy Rainy Overcast Sunny Sunny Rainy Sunny Overcast Overcast Rainy Te erature H t H t H t Mil C l C l C l Mil C l Mil Mil Mil H t Mil Humi ity High High High High N rmal N rmal N rmal High N rmal N rmal N rmal High N rmal High i y lay N N Yes Yes Yes N Yes N Yes Yes Yes Yes Yes N False True False False False True True False False False True True False True

Can Historical Data Test New Data ?


Outlook Sunny Overcast Rainy Temperature ot ot Mild Humidity igh igh igh Windy rue rue rue Play ??? ??? ???

Outlook Sunny Sunny Overcast Rainy Rainy Rainy Overcast Sunny Sunny Rainy Sunny Overcast Overcast Rainy

Temperature Humidity ot ot ot Mild Cool Cool Cool Mild Cool Mild Mild Mild ot Mild igh igh igh igh Normal Normal Normal igh Normal Normal Normal igh Normal igh Temperature ot ot Mild

Windy False rue False False False rue rue False False False rue rue False rue Humidity igh igh igh

Play No No Yes Yes Yes No Yes No Yes Yes Yes Yes Yes No Windy rue rue rue Play ??? ??? ???

Outlook Sunny Overcast Rainy

Outlook Sunny Overcast Rainy

Temperature ot ot Mild

Humidity igh igh igh

Windy rue rue rue

Play ??? ??? ???

Supervised Learning Process


New Data
Classification

Predicted Class

Historical Data

ID3

Rule

ID3 Classification Algorithm


y Entropy

Entropy D m P

: a measure of uncertainty in communication systems (Shannon, 1948) : Data Partition : number of distinct classes : probability tuple in D belongs to class Ci, estimated by |Ci|/|D|

ID3 Classification Algorithm


y Gain

Other Case
fruit_surface Special_odor scaly yes fibrous no scaly yes scaly yes smooth no smooth no fibrous yes fibrous no scaly yes fibrous no smooth no scaly no scaly no scaly no fibrous no smooth yes fibrous no smooth yes scaly no scaly no leave_type broad broad broad broad broad broad broad broad broad broad narrow narrow broad narrow broad narrow broad narrow narrow narrow habitat waste grasses woods paths leaves leaves woods grasses woods grasses woods leaves woods woods paths grasses paths grasses leaves woods class edible edible edible edible edible edible edible edible edible edible poisonous poisonous poisonous poisonous poisonous poisonous poisonous poisonous poisonous poisonous

New Data
fruit_surface special/odor leave_type habitat scaly No broad path Smooth Yes broad Grasses scaly Yes broad Waste class ??? ??? ???

Can we predict the class of new data ?

fruit_surfac Special_odo leave_typ habitat e r e scaly yes broad waste fibrous no broad grasses scaly yes broad woods scaly yes broad paths smooth no broad leaves smooth no broad leaves fibrous yes broad woods fibrous no broad grasses scaly yes broad woods fibrous no broad grasses smooth no narrow woods scaly no narrow leaves scaly no broad woods scaly no narrow woods fibrous no broad paths smooth yes narrow grasses fibrous no broad paths smooth yes narrow grasses scaly no narrow leaves scaly no narrow woods

class edible edible edible edible edible edible edible edible edible edible poisonous poisonous poisonous poisonous poisonous poisonous poisonous poisonous poisonous poisonous

fruit_surface scaly Smooth scaly

special/odor No Yes Yes

leave_type broad broad broad

habitat path Grasses Waste

class ??? ??? ???