contents knowledge representation rule-based representation frame-based representation ...

22

Upload: randolf-day

Post on 17-Dec-2015

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Contents  Knowledge Representation  Rule-Based Representation  Frame-Based Representation  Semantic-Networks 2
Page 2: Contents  Knowledge Representation  Rule-Based Representation  Frame-Based Representation  Semantic-Networks 2

Contents

Knowledge RepresentationRule-Based RepresentationFrame-Based RepresentationSemantic-Networks

2

Page 3: Contents  Knowledge Representation  Rule-Based Representation  Frame-Based Representation  Semantic-Networks 2

April 18, 2023 3

What is frame? A frame is a data structure with typical knowledge about a

particular object or concept. Followings are two typical frames with knowledge about airline

passengers. Both frames have the same structure. Each frame has its own name & a set of attributes or slots,

associated with it.

QUANTAS BOARDING PASSCarrier: QUANTAS AIRWAYSName: MR N BLACKFlight: QF 612Data: 29DECSeat: 23AFrom: HOBARTTO: MELBOURNEBoarding:0620Gate: 2

AIR NEW ZEALAND BOARDING PASSCarrier: AIR NEW ZEALANDName: MRS J WHITEFlight: NZ 0198Data: 23NOVSeat: 27KFrom: MELBOURNETO: CHRISTCHURCHBoarding:1815Gate: 4

Page 4: Contents  Knowledge Representation  Rule-Based Representation  Frame-Based Representation  Semantic-Networks 2

April 18, 2023 4

Frames as knowledge representation technique

The concept of a frame is defined by a collection of slots or attributes.

Each slot describes a particular attribute or operation of the frame.

Slots are used to store values.A slot may contain a default value or a pointer to

another frame, a set of rules or procedure by which the slot value is obtained.

Page 5: Contents  Knowledge Representation  Rule-Based Representation  Frame-Based Representation  Semantic-Networks 2

April 18, 2023 5

There are 3 types of relationships between objects:Generalization:

It denotes “a-kind-of” or “is-a” relationship between super-class and its sub-class.

For example, a car is-a vehicle, or in other words, Car represents a subclass of the more general super-class Vehicle.

Frame-Based Knowledge Frame-Based Knowledge RepresentationRepresentation

How are objects related in a frame-based system?

Page 6: Contents  Knowledge Representation  Rule-Based Representation  Frame-Based Representation  Semantic-Networks 2

April 18, 2023 6

CLASS: Vehicle

CLASS: Boat CLASS: CarCLASS: Airplane

is-a is-a is-a

Superclass: Vehicle

Superclass: Vehicle

Superclass: Vehicle

Generalization

Frame-Based Knowledge Frame-Based Knowledge RepresentationRepresentation

Page 7: Contents  Knowledge Representation  Rule-Based Representation  Frame-Based Representation  Semantic-Networks 2

April 18, 2023 7

Aggregation:It is “a-part-of” or “part-whole” relationship in

which several subclass representing components are associated with a super-class representing components are associated with a super-class representing a whole.

For example, an engine is a part of a car.

Frame-Based Knowledge Frame-Based Knowledge RepresentationRepresentation

How are objects related in a frame-based system?

Page 8: Contents  Knowledge Representation  Rule-Based Representation  Frame-Based Representation  Semantic-Networks 2

April 18, 2023 8

CLASS: Car

CLASS:Chassis CLASS:Engine CLASS:Transmission

a-part-of

Superclass: Car Superclass:Car Superclass:Car

Aggregation

a-part-of a-part-of

Frame-Based Knowledge Frame-Based Knowledge RepresentationRepresentation

Page 9: Contents  Knowledge Representation  Rule-Based Representation  Frame-Based Representation  Semantic-Networks 2

April 18, 2023 9

Association:It describes some semantic relationship

between different classes which are unrelated otherwise.

For example, Mr. Black owns a car.

Frame-Based Knowledge Frame-Based Knowledge RepresentationRepresentation

How are objects related in a frame-based system?

Page 10: Contents  Knowledge Representation  Rule-Based Representation  Frame-Based Representation  Semantic-Networks 2

April 18, 2023 10

CLASS: Mr. Black

CLASS:House CLASS: Car CLASS: Computer

Superclass: Mr. Black

Superclass: Mr. Black

Superclass:Mr. Black

Association

Belongs-toBelongs-to

Belongs-to

ownsowns owns

Frame-Based Knowledge Frame-Based Knowledge RepresentationRepresentation

Page 11: Contents  Knowledge Representation  Rule-Based Representation  Frame-Based Representation  Semantic-Networks 2

April 18, 2023 11

We can define the given problem in abstract way.Frames provide a way for the structured and

concise representation of knowledge. In a single entity, a frame combines all necessary

knowledge about a particular object or concept.During a search for a specific item, we go directly

to the item’s instance frame that contains the desired goal.

Frame-Based Knowledge Frame-Based Knowledge RepresentationRepresentation

Advantages

Page 12: Contents  Knowledge Representation  Rule-Based Representation  Frame-Based Representation  Semantic-Networks 2

April 18, 2023 12

Idea behind the frame based system is easy, but implementation is difficult.

It can not distinguish between essential properties and accidental properties of a frame.

Hence, in a complex case, it is difficult to predict how these features will interact, or to explain unexpected interactions, which makes debugging and updating difficult.

Frame-Based Knowledge Frame-Based Knowledge RepresentationRepresentation

Disadvantages

Page 13: Contents  Knowledge Representation  Rule-Based Representation  Frame-Based Representation  Semantic-Networks 2

Semantic NetworkSN was first proposed by Quillian in 1966, as a model of

human memorySemantic network (SN) is a graph-based representationIt is a directed graphA SN is a network of nodes and links to represent the

definition of a concept (or a collection of concepts)The nodes represent conceptsThe links represent the relations between concepts

April 18, 2023 13

Page 14: Contents  Knowledge Representation  Rule-Based Representation  Frame-Based Representation  Semantic-Networks 2

Semantic NetworkIn these networks, objects are shown by nodes,

and links between the nodes describethe relationship between two objects, for

example,Mary is an instance of trainer, and trainer is a

type of consultant. A trainer trains a programmer and a

programmer is an employee.Joe is an instance of programmer.

From this we can clearly see the relationship that may exist between Mary and Joe.

April 18, 2023 14

Page 15: Contents  Knowledge Representation  Rule-Based Representation  Frame-Based Representation  Semantic-Networks 2

ExampleDraw a diagram representing the relationships between

Mary and Joe, indicating the relationship between a trainer, consultant, programmer and employee.

April 18, 2023 15

Page 16: Contents  Knowledge Representation  Rule-Based Representation  Frame-Based Representation  Semantic-Networks 2

ExampleSuch a diagram is the beginning of a semantic

network but this can be improved by more closely defining the nature of the relationships.

April 18, 2023 16

Page 17: Contents  Knowledge Representation  Rule-Based Representation  Frame-Based Representation  Semantic-Networks 2

InheritanceInheritance is concerned with how one object inherits

the properties of another object.

In the diagram you created in the previous activities,

identify from which classes Mary and Joe inherit

properties.

You should have been able to recognize that Mary, in

being a trainer, inherits the properties of the consultant

class and that Joe, in being a programmer, inherits the

properties of the employee class.April 18, 2023 17

Page 18: Contents  Knowledge Representation  Rule-Based Representation  Frame-Based Representation  Semantic-Networks 2

Inheritance

April 18, 2023 18

Page 19: Contents  Knowledge Representation  Rule-Based Representation  Frame-Based Representation  Semantic-Networks 2

InheritanceYou should have been able to recognize that from this semantic

network it would be possible to conclude that the grass snake

Slither is a vegetarian and Slither eats meat. Clearly, these

conclusions are contradictory. Which conclusion we reach

depends where in the network we start and which links we

follow. This process is unreliable.

Thus, to perform inference using a semantic network you must

understand the meaning of the links and follow the correct links.

As the links can be many, and varied, performing inference

using a semantic network is complex and unreliable.

April 18, 2023 19

Page 20: Contents  Knowledge Representation  Rule-Based Representation  Frame-Based Representation  Semantic-Networks 2

April 18, 2023 20

Vertebrata Cat Fur

Animal Mammal Bear

FishWater

Whale

is-an is-a

is-anis-a

Lives-in

Is-a

has

has

Has-a is-a

ExampleExampleMammal is a kind of animal that has vertebrata. Cat, Bear and whale are mammal. Cat and Bear has fur. Fish is a type of animal. Whale is a Fish and Fish lives in water.

Page 21: Contents  Knowledge Representation  Rule-Based Representation  Frame-Based Representation  Semantic-Networks 2

AdvantagesExplicit in visualization and easy to understand

Often used as a communication tool between the

knowledge engineer and the expert during the knowledge

acquisition phase

SNs are particularly good at representing knowledge in the

form of hierarchies

Knowledge is hierarchically categorized (classified)

Quick inference possible

Supports default reasoning in finite timeApril 18, 2023 21

Page 22: Contents  Knowledge Representation  Rule-Based Representation  Frame-Based Representation  Semantic-Networks 2

DisadvantagesNo interpretation standard – Lack well-defined

semantics

They are less reliable than other knowledge

representation techniques because inferring

becomes a process of searching across the

diagram.

Quite limited inference possible

Diagrams can become very complex.April 18, 2023 22