Write Find's algorithm and explain with example

Write Find's algorithm and explain with an example


Write Find's algorithm and explain with an example

Answer:

Find's Algorithm: 
  1. Initialize h to a most specific hypothesis. h = {'φ','φ','φ','φ','φ','φ'}.
  2. For each positive example:
  • for each attribute in the example:
  • if (attribute value = hypothesis value)
  • do nothing.
  • else
  • Replace the hypothesis value with more general constraint '?'.

flow chart of Algorithm:


Write Find's algorithm and explain with example

Example:


Learning Concept: Days on which person enjoy the sport.

Data Set:

 Sky  Temp  Humidity  wind  water  Forecast  sport
 Sunny  warm  Normal  Strong  warm  same  Yes
 Sunny  warm  High  Strong  warm  same  Yes
 Rainy  cold  High  Strong  cool  change  No
 Sunny  warm  High  Strong  warm  same  Yes

Step1:
Initialize h to the most specific hypothesis. h = {'φ','φ','φ','φ','φ','φ'} take the most specific hypothesis as your 1st positive instance.
h={'sunny', 'warm','Normal', 'Strong', 'warm', 'same'}

Step2:
Compare with another positive instance for each attribute, if (attribute value = hypothesis value) do nothing. else replace the hypothesis value with more general constraint '?'.
1. Since instance 2 is also positive so we will compare with it. In instance 2 attribute humidity is changing so we will generalize that attribute.
 h={'sunny', 'warm','?', 'Strong', 'warm', 'same'}

2. Instance 3 is negative so we will not consider it.

3. Instance 4 is positive and all attribute of instance 4 is similar to the hypothesis.

so based on find's algorithm the hypothesis for Days on which person enjoy the sport is.
 h={'sunny', 'warm','?', 'Strong', 'warm', 'same'}


Term Used:
General Hypothesis: If I tell my friend to bring some food he might bring pizza/burger/biryani/dosa any food because I didn't specify anything so he will do a general hypothesis.
Denoted by G ={'?', '?','?','?', '?','?'}


Specific Hypothesis: If I tell my friend to bring chicken double-layer king size burger from KFC then it is the specific hypothesis.
Denoted by h = {'φ','φ','φ','φ','φ','φ'}

Check-out all ML post: ML POST

No comments:

For Query and doubts!

Powered by Blogger.