FT228/4 Knowledge Based Decision Support Systems

Slides:



Advertisements
Similar presentations
Modelling with expert systems. Expert systems Modelling with expert systems Coaching modelling with expert systems Advantages and limitations of modelling.
Advertisements

Chapter 11 user support. Issues –different types of support at different times –implementation and presentation both important –all need careful design.
Semantics Static semantics Dynamic semantics attribute grammars
Database Systems: Design, Implementation, and Management Tenth Edition
Frame-based expert systems
Knowledge Representation
Frame-Based Expert Systems
Frame Based Expert System
© Negnevitsky, Pearson Education, Introduction, or what is a frame? Introduction, or what is a frame? Frames as a knowledge representation technique.
1 Knowledge Representation We’ve discussed generic search techniques. Usually we start out with a generic technique and enhance it to take advantage of.
Intelligent systems Lecture 6 Rules, Semantic nets.
Knowledge Engineering
FT228/4 Knowledge Based Decision Support Systems Rule-Based Systems Ref: Artificial Intelligence A Guide to Intelligent Systems Michael Negnevitsky – Aungier.
Object-Oriented Analysis and Design
NaLIX: A Generic Natural Language Search Environment for XML Data Presented by: Erik Mathisen 02/12/2008.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 The Basic (Flat) Relational Model.
Help and Documentation zUser support issues ydifferent types of support at different times yimplementation and presentation both important yall need careful.
Knowledge Acquisitioning. Definition The transfer and transformation of potential problem solving expertise from some knowledge source to a program.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 The Enhanced Entity- Relationship (EER) Model.
Designing Help… Mark Johnson Providing Support Issues –different types of support at different times –implementation and presentation both important.
Protegè Dott. Daniela Briola. Class Usually classes will correspond to objects, or types of objects, in the domain. Classes in Protege-Frames are shown.
Knowledge Representation
Frame-based expert systems
Modelling classes Drawing a Class Diagram. Class diagram First pick the classes –Choose relevant nouns, which have attributes and operations. Find the.
Objects Objects are at the heart of the Object Oriented Paradigm What is an object?
UML Class Diagrams: Basic Concepts. Objects –The purpose of class modeling is to describe objects. –An object is a concept, abstraction or thing that.
Semantic Web Technologies Lecture # 2 Faculty of Computer Science, IBA.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Frame-based Knowledge Representation
سید ضیاء الدین البرزی زیر نظر جناب دکتر حلاوتی.  One common methods used for representing knowledge in an expert systems.  How a FB experts system uses.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Ontology Development Kenneth Baclawski Northeastern University Harvard Medical School.
Lectures 5,6 MACHINE LEARNING EXPERT SYSTEMS. Contents Machine learning Knowledge representation Expert systems.
INF 384 C, Spring 2009 Ontologies Knowledge representation to support computer reasoning.
Programming in Java Unit 2. Class and variable declaration A class is best thought of as a template from which objects are created. You can create many.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Database Management System Prepared by Dr. Ahmed El-Ragal Reviewed & Presented By Mr. Mahmoud Rafeek Alfarra College Of Science & Technology Khan younis.
USCISIUSCISI Background Description Logic Systems Thomas Russ.
Object Oriented Analysis & Design & UML (Unified Modeling Language)1 Part V: Design The Design Workflow Design Classes Refining Analysis Relationships.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Alternative representations: Semantic networks
Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
CS212: Object Oriented Analysis and Design Lecture 13: Relationship between Classes.
Database Systems: Enhanced Entity-Relationship Modeling Dr. Taysir Hassan Abdel Hamid.
UML Class Diagram Trisha Cummings. What we will be covering What is a Class Diagram? Essential Elements of a UML Class Diagram UML Packages Logical Distribution.
EEL 5937 Ontologies EEL 5937 Multi Agent Systems Lecture 5, Jan 23 th, 2003 Lotzi Bölöni.
Object Oriented Software Development
Chap#11 What is User Support?
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
CSE314 Database Systems Lecture 3 The Relational Data Model and Relational Database Constraints Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson.
Knowledge Representation
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
Knowledge Representation Fall 2013 COMP3710 Artificial Intelligence Computing Science Thompson Rivers University.
Lecture 5 Frames. Associative networks, rules or logic do not provide the ability to group facts into associated clusters or to associate relevant procedural.
 Description of Inheritance  Base Class Object  Subclass, Subtype, and Substitutability  Forms of Inheritance  Modifiers and Inheritance  The Benefits.
Artificial Intelligence Knowledge Representation.
Knowledge Engineering. Sources of Knowledge - Books - Journals - Manuals - Reports - Films - Databases - Pictures - Audio and Video Tapes - Flow Diagram.
16 April 2011 Alan, Edison, etc, Saturday.. Knowledge, Planning and Robotics 1.Knowledge 2.Types of knowledge 3.Representation of knowledge 4.Planning.
Knowledge Representation
Knowledge Representation Techniques
Architecture Components
Knowledge Representation
Chapter 20 Object-Oriented Analysis and Design
KNOWLEDGE REPRESENTATION
Chapter 11 user support.
Semantic Nets and Frames
Deniz Beser A Fundamental Tradeoff in Knowledge Representation and Reasoning Hector J. Levesque and Ronald J. Brachman.
Representations & Reasoning Systems (RRS) (2.2)
Presentation transcript:

FT228/4 Knowledge Based Decision Support Systems Frame-Based Expert Systems Have been talking so far about expert systems that represent knowledge as rules Have talked about general production rules but also about how to handle uncertainty because it may not always be possible to represent full knowledge as a set of rules Going to now look at another representation technique called frames You may recognise some things talked about from JESS Ref: Artificial Intelligence A Guide to Intelligent Systems, Michael Negnevitsky – Aungier St. Call No. 006.3

Knowledge Representation In building a knowledge base, the programmer must select the significant objects and relations in the domain and map these into formal language The resulting program must contain sufficient knowledge to solve the problem of the domain, it must make correct inferences and it must do so quickly We can consider a knowledge base as a mapping between objects and relations in a problem domain and the computational objects and relations in a program The results of inferences on the knowledge base should correspond to the results of actions or observations in the world The computational objects, relations and inferences are determined by the knowledge representation language the programmer selects.

Knowledge Representation General principles and issues Class hierarchies are found in both scientific and common sense classification schemes How do we provide a general mechanism for representing them? How may we represent definitions? How may we represent exceptions? When should a knowledge based system make default assumptions about missing information, and how should it adjust its reasoning if these assumptions prove wrong? How may we best represent time? How may we best represent causality? How may we best represent uncertainty?

Knowledge Representation Medium of representation is the language Scheme is how we use the language Classification of schemes Logical representation schemes: Use expressions in formal logic to represent a knowledge base. Inference rules and proof procedures apply this knowledge to problem instances Procedural representation schemes: Knowledge represented as a set of instructions for solving a problem. In a rule based system, an if…then may be seen as a procedure for solving a goal in a problem domain, by solving the premises in order.

Knowledge Representation Classification of schemes (contd.) Network representation schemes: Network representations capture knowledge as a graph in which the nodes represent objects or concepts in the problem domain and the arcs represent relations or associations between them Structured representation schemes: Extension of networks by allowing each node to be a complex data structures consisting of slots with attached values. These values may be simple numeric or symbolic data, pointers to other frames or even procedures for performing a particular task.

Issues in Knowledge Representation Most of the issues in knowledge representation are motivated by the effort to program a computer to understand natural languages such as English. Issues raised: Exactly what things can be represented by the objects and relations in the language. E.g. if a predicate relates an object to a value, such as hascolour(car,red) how can that be used to represent “John’s car is redder than Mary’s”. What level of complexity is required for our objects. How do we distinguish between intensional and extensional knowledge? The intension determines what a concept means at an abstract level (ball is round). The extension is the set of all things denoted by the object (set of all balls). A database denotes the extension of the object, whereas an expert system includes the intension of the object.

Issues in Knowledge Representation Issues raised (contd.): How do we represent meta-knowledge, or knowledge about the objects and structures of the representation language itself? This type of knowledge helps us represent things such as “George believes thaty Tom knows that Mary’s car is red” How do we represent into class hierarchies, use inheritance, excpetions, overriding, overloading, default values etc.

Frames “Thinking always begins with suggestive but imperfect plans and images; these are progressively replaced by better–but usually still imperfect–ideas”

What is a frame ? Minsky 1975 : “When one encounters a new situation (or makes a substantial change in one’s view of a problem) one selects from memory a structure called a ‘frame’. This is a remembered framework to be adapted to fit reality by changing details as necessary” Basically what we are talking about is yet another model of human cognition: the structure of knowledge in memory. Have to keep in mind constantly what we are trying to do with expert systems. We are trying to acquire and represent the knowledge used by experts and the act on it in a way that mimics an expert. Basically the idea is that we adjust to new experiences or situations by calling up information structured from past experiences. When then specifically fashion or revise the details from these past experiences to represent individual differences in the new situation.

What is a frame ? Complex unit that represent situations or objects in our domain of interest Data structure with typical knowledge about a particular object or concept Proposed by Marvin Minsky in 1970s Used to capture and represent knowledge in frame-based expert systems

Example John kicked the ball John Person Male 6’4” Ball Round White Black spots

Frame Examples Quantas Boarding Pass Carrier: Quantas Name: Mr. Black Flight: Q 101 Date: 12 Dec Seat: 24A From: Melbourne To: Sydney Boarding: 0600 Gate: 4 Air New Zealand Boarding Pass Carrier: Air New Zealand Name: Mr. White Flight: NZ 101 Date: 13 Dec Seat: 25A From: Melbourne To: Christchurch Boarding: 1800 Gate: 7 Think of them as templates – each frame has its own name and a set of attributes or slots associated with it. So we have slots above. Slots may have a procedure to determine the value

Frames Has a name A set of attributes or slots associated with it E.g. Frame Boarding Pass has attributes Carrier, Name, Flight, Date,Seat,From, To, Boarding,Gate Each slot has a value associated with it Slot may have a procedure associated with it to determine its value Slot may be a pointer to another frame or set of rules May recognise this from jess – often used in conjunction with production rules Basically frame is a way of organising knowledge to describe various attributes/characteristics of an object An application of object-oriented programming for expert systems to an extent Object is a concept – abstraction or a things with a crisp boundary or meaning for the problem at hand Objects have an identity and are clearly distinguishable Think of our example of lab exercise patient, doctor, disease, symptom Object can combine both data and behaviour into a single entity – contrast with rule based expert systems where facts and rules are separated. Basically a frame is an object. Talking about using frames to represent well-understood stereotypical situations

Frames Rule Based systems may work with facts scattered through the knowledge base May have to search through knowledge that is not relevant Search may be slow Frames better organise the knowledge in the knowledge base

Slots Frame is a collection of slots. May include information such as Frame name Relationship of frame to other frames E.g. frame DELL Laptop may be member of class Computer which may belong to class Hardware Slot Value Can be symbolic, numeric or Boolean. Can be assigned when the frame is created or during an expert system session Default Slot Value Taken to be true when no evidence to contrary is found. Range of Slot Value Determines where a particular object or concept complies with the stereotype requirements Procedural Information Procedure executed when the slot is changed or needed Slot Value: in our boarding pass example slot name had symbolic values, slot gate had numeric value Presence, absence or amount of detail in each of these depends on the particular problem-solving situation addressed

Facets A facet is a means of providing extended knowledge about an attribute of a frame Used to establish the attribute value, control end-user queries and tell the inference engine how to process the attribute Value facet Specify default and initial values Prompt facet Enable the end-user to enter the attribute online Inference facet Allow us to stop the inference process when a value of a specified attribute changes What is the correct level of decomposition ? What is a frame, what is a slot, what is a facet ? There is no correct level. Depends on the nature of the problem and the judgement of the knowledge engineer. Work through an example – Lab4 exercise.

Classes and Instances Frame may refer to a particular object or a group of similar objects Class-frame describes a group of objects with common attributes Instance-frame refers to a particular instance of an object Each frame ‘knows’ its class Implicit property of the frame

Class and Instance Example CLASS: Boarding Pass Carrier: [Str] Name: [Str] Flight: [Str] Date: [Str] Seat: [Str] From: [Str] To: [Str] Boarding: [Num] Gate: [Num] INSTANCE: Air New Zealand Boarding Pass Carrier: Air New Zealand Name: Mr. White Flight: NZ 101 Date: 13 Dec Seat: 25A From: Melbourne To: Christchurch Boarding: 1800 Gate: 7 INSTANCE: Quantas Boarding Pass Carrier: Quantas Name: Mr. Black Flight: Q 101 Date: 12 Dec Seat: 24A From: Melbourne To: Sydney Boarding: 0600 Gate: 4 In other words a frames class is an implicit property of the frame For example instances identify their class in a slot Class Frames basically make it easier for us to organise our knowledge hierarchically Also allows us to think of an object as a single entity and ignore the details of the internal structure i.e. don’t care about the mechanical organisation of a car until it breaks down we just use it – then want to know the details. Why bother with classes ? We are less concerned with defining strictly and exhaustively all the properties of an object we are more concerned with the salient properties typical for the entire class. Based on the idea that humans seem to be more concerned with salient properties – idea of proto-types Prototypical bird can fly so we tend to think of this as a property of a bird even though there are birds that can’t fly. There is also the sense that for example an eagle is a better example of the bird category than the penguin because it is more typical of its class. Nonetheless the existence of the penguin means that we are forced to qualify generalisation such that birds can fly

Class Inheritance Attributes of a class-frame represent things that are typically true for all objects in the class Slots and default values of a class frame are inherited across the class/sub-class and class/member hierarchy. Slots in instance-frames can be filled with actual data uniquely specified for each instance Default values are only assigned to selected slots to be used only if other information is not available When an instance of a frame is created the system will attempt to fill its slots either by querying the user, accepting the default from the class frame or executing some procedure to obtain the instance value. The inheritance of default values can mean that the data description of the problem is incorrect, lets us make incorrect assumptions and can lead to incorrect conclusions

Relationships among classes Subclass is related to its superclass by an ‘is-a’ relation An instance-frame can overwrite some of the typical attribute values in the hierarchy The instance-frame remains a member of the class with access to properties further up the hierarchy even if it violates the typical value in its class Relationships in such a hierarchy constitute a process of specialisation Frame at the top of the hierarchy represents some generic concept, frames further down represent more restricted concepts

Relationships among objects Generalisation denotes ‘a-kind-of’ or ‘is-a’ relationship. E.g. car is a vehicle, boat is a vehicle Aggregation denotes a ‘part-of’ or ‘part-whole’ relationship in which subclasses representing components are associated with a superclass representing a whole. E.g. an engine is part of a car Association describes some semantic relationship between different classes unrelated otherwise. Usually appear as verbs and are bi-directional. E.g. Mr. Black owns a house, Mr. Black owns a car, John kicked a ball Bi-directional : does not imply that the verb is the same in both directions. The house does not own Mr. Black it is owned by or belongs to. Can use the inverse of the relationship.

More about inheritance Inheritance is the process by which all characteristics of a class-frame are assumed by an instance frame. Instance-frame inherits from its parent-frame. Can have multiple inheritance All parents must have unique attribute names Means code reuse Reduces number of independent and specific features of an expert system Have already said that a common use is to impose default values on all instance-frames. Can view as a tree-like structure that is turned over. Highest level of abstraction is at the top I.e. root. Branches illustrate lower levels of abstraction, leaves at the bottom are instance frames. Each frame inherits characteristics from those higher in the hierarchy. Multiple inheritance : job of the knowledge engineer is to group similar classes together and reuse common code.

Disadvantages Cannot distinguish between essential properties and accidental properties May become impossible to construct composite concepts when using multiple inheritance Leave the knowledge engineer with difficult decisions to make about the hierarchical structure of the systems and its inheritance paths All seems very simple – what is the catch Simplicity has been lost at implementation stage Essential property – property frame must have to be considered member of its class Accidental property – properties instances just happen to have Instances inherit all typical properties and because it is possible to overwrite them anywhere in the frame hierarchy it may become impossible to construct composite concepts when using multiple inheritance Appeals to so-called typical properties do not always work so we get unexpected results Frame-based expert systems cannot offer safeguards against creating coherent structures but do provide data and control structures that are more suited for simulation of human reasoning than conventional programming languages – also combine two approaches to knowledge representation, rules and frames

Methods and Demons A method is a procedure associated with a frame attribute that is executed whenever requested Method can determine an attributes specific value or execute a series of actions when the value changes A demon generally has an IF-THEN structure Executed when attribute in IF statement changes Two types of method WHEN CHANGED Executed immediately when an attribute value changes WHEN NEEDED Used to obtain attribute value only when needed Expert systems are not only required to store information but also to validate and manipulate it. To add actions to frames need methods and demons Method – equivalent to series of commands in a macro When needed - Executed when information associated with attribute value is needed for soling the problem but attribute value is undetermined Demon – executed when attribute in IF changes. Often used as synonym for method but demon is limited to IF then structure. Methods used for more complex procedures.

Interaction of Rules and Frames – Inference Engine Rule-Based Expert System Inference engine links rules in knowledge base with data in database When goal is set up, inference engine searches knowledge base to find rule with that goal in its consequent If it finds such a rule and if part matches data in database, rule is fired and goal obtains its value. If no such rule found , the queries user for value Most frame based expert systems allow use of a set of rules to evaluate information contained in frames

Inference Engine Frame-Based System Inference engine also searches for goal Rules play auxiliary role. Frames represent major source of knowledge. Methods and demons used to add actions to frames. Goal can be established either in method or demon.

Inference engine Frame-based system Based on goal, inference engine finds rules whose consequents find goal of interest Examines these rules one at a time in order they appear in the rule base Examines the validity of each antecedent in the first rule This may require the If all antecedents are valid, concludes the goal If any of the antecedents are invalid, concludes goal is invalid and will proceed to next rule

Inference engine Has to obtain value from WHEN NEEDED method only when it has not been determined from rule base Search order for attribute value has to be determined first Attach a SEARCH ORDER facet to an attribute to indicate where and in what order to obtain attribute value E.g. set the order so that it first searches the rule base and only when this fails executes when needed

Rule-Based Expert Systems Set of rules represents the domain knowledge useful for problem solving. Each rule captures some heuristic of the problem. Each rule adds some new knowledge and thus makes the system smarter. Rule base can be easily modified by changing, adding and subtracting rules. Principal difference is how the knowledge is viewed and represented in the system.

Frame-based Expert Systems Overall hierarchical structure of knowledge is decided first. Classes and attributes are identified. Hierarchical relationship between frames are established. Architecture allows us to add actions to the frames through methods and demons. Problem is viewed in a different manner

Building Frame-based Expert System Specify the problem and define the scope of the system Determine the classes and their attributes Define instances. Design displays. Define WHEN CHANGED and WHEN NEEDED methods, and demons. Define rules. Evaluate and expand the system. Basic steps are the same as when developing rule-based expert systems Knowledge engineer has to obtain general understanding of problem and overall knowledge structure They then decide on the tool to use to develop the prototype system They then create the knowledge base and test it by running a number of consultations Expert system is then expanded, tested and revised until it does what the user wants