Lecture 6 Knowledge Representation NonFormal Method Semantic Nets Frames - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Lecture 6 Knowledge Representation NonFormal Method Semantic Nets Frames

Description:

... as something that asserts to be true about one element relative to another. ... and B eats oranges. ... and a popular way to represent facts in expert systems ... – PowerPoint PPT presentation

Number of Views:418
Avg rating:3.0/5.0
Slides: 20
Provided by: dinas5
Category:

less

Transcript and Presenter's Notes

Title: Lecture 6 Knowledge Representation NonFormal Method Semantic Nets Frames


1
Lecture 6Knowledge RepresentationNon-Formal
Method Semantic Nets Frames

2
Semantic Nets
  • A semantic network focuses on the graphical
    representation of relations between elements in a
    domain.
  • Components are nodes and links
  • Nodes used to represent domain elements
  • (normally represented with rectangles and in some
    books with ellipse)
  • Links (or arcs) represent the relationship
    between the elements. Shown as vector from one
    element to the other element

3
Examples
  • Hassan eats meat
  • Nodes hassan and meat
  • Link eating
  • Hassan eats Meat
  • Link can be viewed as something that asserts to
    be true about one element relative to another. An
    assertion can only be true or false, therefore
    fundamentally its BINAR RELATION
  • (examples of binary relation ISA, PART OF etc.)

4
Examples, cont..
  • Hassan isa mammal
  • Nodes hassan and mammal
  • Link isa
  • Hassan isa mammal
  • Horse has a tail
  • Tail partof Horse

5
Examples, cont..
  • Horse is a mammal with tail

TAIL
partof
isa
HORSE
MAMMAL
6
Examples, cont..
  • Instance a specific example of a class is the
    instance of that class.
  • Animals are a class of living beings. Humans are
    subclass of animals and Zahra is an instance of
    subclass human, class animals
  • Horse is a mammal with a tail. Tony is horse of
    black color

7
Examples, cont..
  • Property Inheritance The properties of the class
    are inherited by the instances by default, unless
    specified.Tony in the example below also has a
    tail.

TAIL
partof
isa
HORSE
MAMMAL
instance
color
BLACK
TONY
8
Examples, cont..
  • ProblemAnimals have types reptiles and mammals.
    All Mammals have heads. Element is a typical
    mammal with grey color and large size. A and b
    are two elephants. A likes bananas and and B eats
    oranges.
  • Nodes Animals, reptiles, mammals, elephants, A,
    B, bananas and oranges

9
Examples, cont..
  • ProblemAnimals have types reptiles and mammals.
    All Mammals have heads. Element is a typical
    mammal with grey color and large size. A and b
    are two elephants. A likes bananas and and B eats
    oranges.

color
instance
likes
10
Examples, cont..
  • Problem
  • Vertebrates are animals with several types. Birds
    are type of vertebrates with feathers. Using
    these feathers they can fly. A bluebird is
    typical bird with blue colour and small size.
    Horses are also vertebrates, but are mammals.
    They have tails and cannot fly. Trigger is a
    horse with white colour. This horse is very old
    and is nearly dead.

11
Examples, cont..
12
Examples, cont..
  • Problem
  • Snow is form of water, it is soft, slippery and
    white in color. Ice is also formed of water and
    share all the properties of snow except that it
    is hard and clear. One can form snowman from ice
    frosty is a snow man that I saw in the forest.

13
Frames
  • Frames are a variant of semantic networks, and a
    popular way to represent facts in expert systems
  • Relevant information is stored in single complex
    entity called frames
  • Frames support inheritance, superficially similar
    to data structure (struct)

14
Example
  • ProblemAnimals have types reptiles and mammals.
    All Mammals have heads. Element is a typical
    mammal with grey color and large size. A and b
    are two elephants. A likes bananas and and B eats
    oranges.

Mammal subclass Animal has_part
head Elephant subclass Mammal color grey
size large A instance Elephant likes bananas

Reptiles subclass Animal
objects
Slot values
15
Default and Multiple Inheritance
Default values are those values that can be
overridden and changed for subclass and/or
instances
Multiple Inheritance When more than one parent
class is present, which attribute is to be passed.
  • Mammal
  • subclass Animal
  • has_part head
  • warm_blooded yes
  • angry yes
  • Elephant
  • subclass Mammal
  • has_trunk yes
  • color grey
  • size large
  • habitat jungle
  • Circus_Animal
  • subclass Animal
  • habitat tent
  • skills balancing on a ball
  • A
  • instance Circus_Animal
  • Elephant
  • color pink
  • Mammal
  • subclass Animal
  • has_part head
  • warm_blooded yes
  • angry yes
  • Elephant
  • subclass Mammal
  • has_trunk yes
  • color grey
  • size large
  • angry no
  • A
  • instance Elephant
  • color pink
  • owner Farid
  • likes bananas
  • B instance Elephant
  • size small

?
16
Implementing Simple Frames
  • IF slot_value (O,P) returns a value V, return V.
  • Otherwise, IF slot_value(O,subclass)
  • or
  • slot_value(O,instance)
  • return C,
  • find value(C,P )
  • and return this value
  • Otherwise, fail

Oobject, PAttribute/Property slot_value(O,subcla
ss) checks whether O is a subclass or
not slot_value(O,instance) checks whether O is a
instance or not
17
Example of the Algo.
  • Question 1 What does elephant A likes?
  • Step one O elephant A, Plikes
  • Evaluate value(A,likes)
  • returns bananas ------------query successful

18
Example of the Algo.
  • Question 1 What is the color of the elephant A ?
  • Step one O elephant A, Pcolor
  • Evaluate value(A,color)
  • returns nil ------------query not successful
  • Step Two
  • Evaluate slot_value(A,subclass) returns nil A s
    not subclass
  • Evaluate slot_value(A,instance) returns Elephant
  • Evaluate slot_value(Elephant, colour) returns
    grey

19
Example
DEVELOP A FRAME FOR A CAR
20
Example CAR FRAME
Write a Comment
User Comments (0)
About PowerShow.com