Professional Documents
Culture Documents
Lecture No. 2
VERSION SPACE
Instructor:
Prof. Dr. M Sultan Zia
VERSION SPACE
Concept Learning by Induction
• Learning has been classified into several types: deductive, inductive, analytical, etc.
• Much of human learning involves acquiring general concepts from specific training
examples (this is called inductive learning)
3
• Task:
– Learn (to imitate) a function f: X Y (i.e. given x, predict y)
• Experience:
– Learning algorithm is given the correct value of the function for particular inputs
training examples (see table above)
– An example is a pair (x, y), where x is the input and y=f(x) is the output of the function
applied to x.
• Performance Measure:
– Find a function h: X Y predicts the same y as f: X Y as often as possible.
Instance Space X: Set of all possible objects described by attributes.
• If
sky = sunny temp = warm humidity = ? wind = strong water =
? forecast = same
then
Enjoy Sport = Yes
else
Enjoy sport = No
In our example, the instance space X can contain 3.2.2.2.2.2 = 96 distinct instances
Once a hypothesis that best fits the training examples is found, we can use it to predict
the class label of new examples
Any hypothesis found to approximate the target function well over a sufficiently
large set of training examples will also approximate the target function well over
other unobserved examples (The inductive learning hypothesis)
9
VERSION SPACE
Concept Learning by Induction: General to Specific Ordering
Consider
the three
hypotheses
h1, h2 and
h3
10
Find-S Algorithm
Note that our search is guided by the positive examples and we consider only those
hypotheses which are consistent with the positive training examples
The search moves from hypothesis to hypothesis, searching from the most specific to
progressively more general hypotheses
At each step, the hypothesis is generalized only as far as necessary to cover the new
positive example
Therefore, at each stage the hypothesis is the most specific hypothesis consistent with
13
the training examples observed up to this point
VERSION SPACE
Find-S Algorithm
Note that the algorithm simply ignores every negative example
However, since at each step our current hypothesis is maximally specific it will never
cover (falsely classify) any negative example. In other words, it will be always
consistent with each negative training example
However the data must be noise free and our hypothesis representation should be such
that the true concept can be described by it
14
VERSION SPACE
Find-S Algorithm
15
VERSION SPACE
Definition: Version Space
16
VERSION SPACE
List-then-Eliminate Algorithm
This algorithm first initializes the version space to contain all hypotheses
possible, then eliminate any hypothesis found inconsistent with any training
example
The version space of candidate hypotheses thus shrinks as more examples are
observed, until ideally just one hypothesis remains that is consistent with all
the observed examples
For the Enjoy Sport data we can list 973 possible hypotheses
Then we can test each hypothesis to see whether it confirms with our training
data set or not
17
VERSION SPACE
List-then-Eliminate Algorithm
18
VERSION SPACE
List-then-Eliminate Algorithm
If insufficient data is available to narrow the version space to a single hypothesis,
then the algorithm can output the entire set of hypotheses consistent with the
observed data
It has the advantage that it guarantees to output all the hypotheses consistent with
the training data
19
VERSION SPACE
Candidate Elimination Algorithm
The Candidate Elimination algorithm instead of listing all the possible members of
the version space, employs a much more compact representation
The version space is represented by its most general (maximally general) and most
specific (maximally specific) members
These members form the general and specific boundary sets that delimit the
version space. Every other member of the version space lies between these
boundaries
20
VERSION SPACE
Candidate Elimination Algorithm
21
Candidate Elimination Algorithm
22
Candidate Elimination Algorithm
Candidate Elimination Algorithm
Candidate Elimination Algorithm
Candidate Elimination Algorithm
Candidate Elimination Algorithm
S0 = {, , , , , }
G0 = {?, ?, ?, ?, ?, ?}
VERSION SPACE
Candidate Elimination Algorithm
31
??? ((( )))
32