Docsity

Symbol Based Learning-Artificial Intelligence-lecture Handout, Exercises of Artificial Intelligence

Toggle sidebar
bg1
Artificial Intelligence (CS607)
© Copyright Virtual University of Pakistan
1
2 LEARNING: Symbol-based
Ours is a world of symbols. We use symbolic interpretations to understand the
world around us. For instance, if we saw a ship, and were to tell a friend about its
size, we will not say that we saw a 254.756 meters long ship, instead we’d say
that we saw a ‘huge’ ship about the size of ‘Eiffel tower’. And our friend would
understand the relationship between the size of the ship and its hugeness with
the analogies of the symbolic information associated with the two words used:
‘huge’ and ‘Eiffel tower’.
Similarly, the techniques we are to learn now use symbols to represent
knowledge and information. Let us consider a small example to help us see
where we’re headed. What if we were to learn the concept of a GOOD
STUDENT. We would need to define, first of all some attributes of a student, on
the basis of which we could tell apart the good student from the average. Then
we would require some examples of good students and average students. To
keep the problem simple we can label all the students who are “not good”
(average, below average, satisfactory, bad) as NOT GOOD STUDENT. Let’s say
we choose two attributes to define a student: grade and class participation. Both
the attributes can have either of the two values: High, Low. Our learner program
will require some examples from the concept of a student, for instance:
1. Student (GOOD STUDENT): Grade (High) ^ Class Participation (High)
2. Student (GOOD STUDENT): Grade (High) ^ Class Participation (Low)
3. Student (NOT GOOD STUDENT): Grade (Low) ^ Class Participation
(High)
4. Student (NOT GOOD STUDENT): Grade (Low) ^ Class Participation
(Low)
As you can see the system is composed of symbolic information, based on which
the learner can even generalize that a student is a GOOD STUDENT if his/her
grade is high, even if the class participation is low:
Student (GOOD STUDENT): Grade (High) ^ Class Participation (?)
This is the final rule that the learner has learnt from the enumerated examples.
Here the ‘?’ means that the attribute class participation can have any value, as
docsity.com
pf3
pf4
pf5
pf8

Partial preview of the text

Download Symbol Based Learning-Artificial Intelligence-lecture Handout and more Exercises Artificial Intelligence in PDF only on Docsity!

2 LEARNING: Symbol-based

Ours is a world of symbols. We use symbolic interpretations to understand the world around us. For instance, if we saw a ship, and were to tell a friend about its size, we will not say that we saw a 254.756 meters long ship, instead we’d say that we saw a ‘huge’ ship about the size of ‘Eiffel tower’. And our friend would understand the relationship between the size of the ship and its hugeness with the analogies of the symbolic information associated with the two words used: ‘huge’ and ‘Eiffel tower’.

Similarly, the techniques we are to learn now use symbols to represent knowledge and information. Let us consider a small example to help us see where we’re headed. What if we were to learn the concept of a GOOD STUDENT. We would need to define, first of all some attributes of a student, on the basis of which we could tell apart the good student from the average. Then we would require some examples of good students and average students. To keep the problem simple we can label all the students who are “not good” (average, below average, satisfactory, bad) as NOT GOOD STUDENT. Let’s say we choose two attributes to define a student: grade and class participation. Both the attributes can have either of the two values: High, Low. Our learner program will require some examples from the concept of a student, for instance:

  1. Student (GOOD STUDENT): Grade (High) ^ Class Participation (High)
  2. Student (GOOD STUDENT): Grade (High) ^ Class Participation (Low)
  3. Student (NOT GOOD STUDENT): Grade (Low) ^ Class Participation (High)
  4. Student (NOT GOOD STUDENT): Grade (Low) ^ Class Participation (Low)

As you can see the system is composed of symbolic information, based on which the learner can even generalize that a student is a GOOD STUDENT if his/her grade is high, even if the class participation is low: Student (GOOD STUDENT): Grade (High) ^ Class Participation (?) This is the final rule that the learner has learnt from the enumerated examples. Here the ‘?’ means that the attribute class participation can have any value, as

long as the grade is high. In this section we will see all the steps the learner has to go through to actually come up with the final conclusion like this.

2.1 Problem and problem spaces

Before we get down to solving a problem, the first task is to understand the problem itself. There are various kinds of problems that require solutions. In theoretical computer science there are two main branches of problems:

  • Tractable
  • Intractable

Those problems that can be solved in polynomial time are termed as tractable, the other half is called intractable. The tractable problems are further divided into structured and complex problems. Structured problems are those which have defined steps through which the solution to the problem is reached. Complex problems usually don’t have well-defined steps. Machine learning algorithms are particularly more useful in solving the complex problems like recognition of patterns in images or speech, for which it’s hard to come up with procedural algorithms otherwise.

The solution to any problem is a function that converts its inputs to corresponding outputs. The domain of a problem or the problem space is defined by the elements explained in the following paragraphs. These new concepts will be best understood if we take one example and exhaustively use it to justify each construct.

Example: Let us consider the domain of HEALTH. The problem in this case is to distinguish between a sick and a healthy person. Suppose we have some domain knowledge; keeping a simplistic approach, we say that two attributes are necessary and sufficient to declare a person as healthy or sick. These two attributes are: Temperature (T) and Blood Pressure (BP). Any patient coming into the hospital can have three values for T and BP: High (H), Normal (N) and Low (L). Based on these values, the person is to be classified as Sick (SK). SK is a Boolean concept, SK = 1 means the person is sick, and SK = 0 means person is healthy. So the concept to be learnt by the system is of Sick, i.e., SK=1.

2.1.1 Instance space

How many distinct instances can the concept sick have? Since there are two attributes: T and BP, each having 3 values, there can be a total of 9 possible distinct instances in all. If we were to enumerate these, we’ll get the following table: X T BP SK

Since we don’t know the concept yet, so there might be concepts which can produce 2^9 different outputs, such as:

Each of these is a different concept, only one of which is the true concept (that we are trying to learn), but the dilemma is that we don’t know which one of the 2^9 is the true concept of SICK that we’re looking for, since in real world problems we don’t have all the instances in the instance space X, available to us for learning. If we had all the possible instances available, we would know the exact concept, but the problem is that we might just have three or four examples of instances available to us out of nine.

D T BP SK x 1 N L 1 x 2 L N 0 x 3 N N 0

Notice that this is not the instance space X, in fact it is D: the training set. We don’t have any idea about the instances that lie outside this set D. The learner is to learn the true concept C based on only these three observations, so that once it has learnt, it could classify the new patients as sick or healthy based on the input parameters.

2.1.3 Hypothesis space

The above condition is typically the case in almost all the real world problems where learning is to be done based on a few available examples. In this situation, the learner has to hypothesize. It would be insensible to exhaustively search over the entire concept space, since there are 2^9 concepts. This is just a toy problem with only 9 possible instances in the instance space; just imagine how huge the concept space would be for real world problems that involve larger attribute sets.

So the learner has to apply some hypothesis, which has either a search or the language bias to reduce the size of the concept space. This reduced concept space becomes the hypothesis space. For example, the most common language

C(x 3 ) C(x 6 ) C(x 9 ) C(x 2 ) C(x 5 ) C(x 8 ) C(x 1 ) C(x 4 ) C(x 7 )

0 0 0 0 0 0 0 0 0 C 1

0 0 0 0 0 0 1 0 0 C 2

0 0 0 1 0 0 0 0 0 C 3

0 0 0 1 0 0 1 0 0 C 4

C 29

1 1 1 1 1 1 1 1 1 C 29

bias is that the hypothesis space uses the conjunctions (AND) of the attributes, i.e. H = <T, BP> H is the denotive representation of the hypothesis space; here it is the conjunction of attribute T and BP. If written in English it would mean:

H = <T, BP>:

IF “Temperature” = T AND “Blood Pressure” = BP THEN H = 1 ELSE H = 0 Now if we fill in these two blanks with some particular values of T and B, it would form a hypothesis, e.g. for T = N and BP = N:

For h = <L, L>:

Notice that this is the C 2 we presented before in the concept space section:

This means that if the true concept of SICK that we wanted to learn was c 2 then the hypothesis h = <L, L> would have been the solution to our problem. But you must still be wondering what’s all the use of having separate conventions for hypothesis and concepts, when in the end we reached at the same thing: C 2 =

BP

H 0 0 0

N 0 0 0

L 1 0 0

L N H T

BP

H 0 0 0

N 0 1 0

L 0 0 0

L N H T

Ø. So there are 5 x 5 = 25 total hypotheses possible. This is a tremendous reduction from 2^9 = 512 to 25.

But if we want to represent h 4 = < Ø , L>, it would be the same as h 3 , meaning that there are some redundancies within the 25 hypotheses. These redundancies are caused by Ø, so if there’s this ‘Ø’ in the T or the BP or both, we’ll have the same hypothesis h 3 as the outcome, all zeros. To calculate the number of semantically distinct hypotheses, we need one hypothesis which outputs all zeros, since it’s a distinct hypothesis than others, so that’s one, plus we need to know the rest of the combinations. This primarily means that T and BP can now take 4 values instead of 5, which are: L, N, H and ?. This implies that there are now 4 x 4 = 16 different hypotheses possible. So the total distinct hypotheses are: 16 + 1 = 17. This is a wonderful idea, but it comes at a vital cost. What if the true concept doesn’t lie in the conjunctive hypothesis space? This is often the case. We can try different hypotheses then. Some prior knowledge about the problem always helps.

2.1.4 Version space and searching

Version space is a set of all the hypotheses that are consistent with all the training examples. When we are given a set of training examples D, it is possible that there might be more than one hypotheses from the hypothesis space that are consistent with all the training examples. By consistent we mean h(xi) = C(xi). That is, if the true output of a concept [c(xi)] is 1 or 0 for an instance, then the output by our hypothesis [h(xi)] is 1 or 0 as well, respectively. If this is true for every instance in our training set D, we can say that the hypothesis is consistent.

Let us take the following training set D:

D T BP SK x 1 H H 1 x 2 L L 0 x 3 N N 0

One of the consistent hypotheses can be h 1 =<H, H > But then there are other hypotheses consistent with D, such as h 2 = < H,? >

Although it classifies some of the unseen instances that are not in the training set D, different from h 1 , but it’s still consistent over all the instances in D. Similarly there’s another hypothesis, h 3 = < ?, H >

Notice the change in h 3 as compared to h 2 , but this is again consistent with D. Version space is denoted as VS (^) H,D = {h 1 , h 2 , h 3 }. This translates as: Version space is a subset of hypothesis space H, composed of h 1 , h 2 and h3, that is consistent with D.

BP

H 0 0 1

N 0 0 0

L 0 0 0

L N H T

BP

H 0 0 1

N 0 0 1

L 0 0 1

L N H T

BP

H 1 1 1

N 0 0 0

L 0 0 0

L N H T