Information Technology Reference
In-Depth Information
The answer is somewhat disappointing: the program induces that every animal barks.
While this rule is certainly sufficient to explain Fido's barking, something more spe-
cific is desired. To find a more specific rule, the induce predicate must be given some
negative examples:
?- induce([barks(fido),barks(rover),not(barks(kitty)),
not(barks(donald))], R).
R = [barks(_G425), dog(_G425)]
% Every dog barks.
This is a much better rule. Similarly, what rule can be learned from observing that
Fido and Kitty are four-legged but Daffy (the duck) is not:
?- induce([four_legged(fido),four_legged(kitty),
not(four_legged(daffy))], R).
R = [four_legged(_G411), not(duck(_G411))]
% Everything that is not a duck has four legs?
This induced rule may or may not be acceptable given what is known. At the very
least, it should be restricted to animals only, so induce needs to be given information
about a nonanimal individual, say, a tree:
?- induce([four_legged(fido),four_legged(kitty),
not(four_legged(daffy)),
not(four_legged(tree17))], R).
R = [four_legged(_G428), animal(_G428), not(duck(_G428))]
% Every animal that is not a duck has four legs.
This induced rule has a body with two literals: the individual must be an animal and
must not be a duck.
11.3.3 Classification: Training and testing
What is the point of inducing new rules? In general, one wants to observe the world,
notice the properties of some individuals, induce some general rules about them,
and finally, use the general rule to predict the properties of new individuals. So, for
example, after observing that Fido and Rover both bark (but that Kitty and Daffy do
not), the induced rule should be able to predict that Spot the dog will also bark.
This type of learning is often called classification : some training examples are given,
some of which have a property (like barking) and some of which do not; then new
test examples are classified into those that do and those that do not have the property.
The induce predicate can be used to find out if new individuals have a property. In
fact, the new atoms learned from the training examples can be generated:
 
 
Search WWH ::




Custom Search