1 ISAT 252: Analytical Methods IV Knowledge-Based Systems (KBS) and Declarative Programming KBS development and KBSDT Details Reading Assignment: Corvid.

Slides:



Advertisements
Similar presentations
Modern Systems Analyst and as a Project Manager
Advertisements

Modelling with expert systems. Expert systems Modelling with expert systems Coaching modelling with expert systems Advantages and limitations of modelling.
Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES.
Chapter 11 Describing Process Specifications and Structured Decisions
Describing Process Specifications and Structured Decisions Systems Analysis and Design, 7e Kendall & Kendall 9 © 2008 Pearson Prentice Hall.
Inferences The Reasoning Power of Expert Systems.
Lecture Roger Sutton 21: Revision 1.
MIS 325 PSCJ. 2  Business processes can be quite complex  Process model: any abstract representation of a process  Process-modeling tools provide a.
Case Tools Trisha Cummings. Our Definition of CASE  CASE is the use of computer-based support in the software development process.  A CASE tool is a.
5/15/2015Slide 1 SOLVING THE PROBLEM The one sample t-test compares two values for the population mean of a single variable. The two-sample test of a population.
Making Assignment Expectations Clear: Create a Grading Rubric Barb Thompson Communication Skills Libby Daugherty Assessment FOR Student Learning 1.
Chapter 12: Expert Systems Design Examples
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming The software development method algorithms.
Chapter 6: Design of Expert Systems
Chapter 9 Describing Process Specifications and Structured Decisions
Chapter 9 Describing Process Specifications and Structured Decisions Systems Analysis and Design Kendall & Kendall Sixth Edition © 2005 Pearson Prentice.
Artificial Intelligence
Chapter 9 Describing Process Specifications and Structured Decisions
Knowledge Acquisition CIS 479/579 Bruce R. Maxim UM-Dearborn.
1 Pertemuan 13 Membangun Expert System Matakuliah: H0383/Sistem Berbasis Pengetahuan Tahun: 2005 Versi: 1/0.
Project Management Session 7
Engineering Fundamentals and Problem Solving, 6e
ES: Expert Systems n Knowledge Base (facts, rules) n Inference Engine (software) n User Interface.
Purpose of the Standards
CSSE 375 Software Construction and Evolution: Configuration Management
Expert Systems Infsy 540 Dr. Ocker. Expert Systems n computer systems which try to mimic human expertise n produce a decision that does not require judgment.
8/20/2015Slide 1 SOLVING THE PROBLEM The two-sample t-test compare the means for two groups on a single variable. the The paired t-test compares the means.
1 Lecture 5.3: SEF Ch 4 Requirements Analysis Dr. John MacCarthy UMBC CMSC 615 Fall, 2006.
Knowledge representation
Chapter 6 Supplement Knowledge Engineering and Acquisition Chapter 6 Supplement.
 Knowledge Acquisition  Machine Learning. The transfer and transformation of potential problem solving expertise from some knowledge source to a program.
11 C H A P T E R Artificial Intelligence and Expert Systems.
Requirements Elicitation. Who are the stakeholders in determining system requirements, and how does their viewpoint influence the process? How are non-technical.
Lecture 7: Requirements Engineering
Saeed Ghanbartehrani Summer 2015 Lecture Notes #5: Programming Structures IE 212: Computational Methods for Industrial Engineering.
Systems Analysis and Design in a Changing World, Fourth Edition
Requirements Engineering Southern Methodist University CSE 7316 – Chapter 3.
Object-Oriented Software Engineering using Java, Patterns &UML. Presented by: E.S. Mbokane Department of System Development Faculty of ICT Tshwane University.
Theory of Computation, Feodor F. Dragan, Kent State University 1 TheoryofComputation Spring, 2015 (Feodor F. Dragan) Department of Computer Science Kent.
CS62S: Expert Systems Based on: The Engineering of Knowledge-based Systems: Theory and Practice, A. J. Gonzalez and D. D. Dankel.
PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this.
Structured Programming (4 Credits)
SAFEWARE System Safety and Computers Chap18:Verification of Safety Author : Nancy G. Leveson University of Washington 1995 by Addison-Wesley Publishing.
Introduction to Programming in Corvid EXSYS-Corvid is an intelligent systems programming environment General order of tasks: Enter and define Variables.
Of An Expert System.  Introduction  What is AI?  Intelligent in Human & Machine? What is Expert System? How are Expert System used? Elements of ES.
SCOPE DEFINITION,VERIFICATION AND CONTROL Ashima Wadhwa.
Artificial Intelligence
ITEC 1010 Information and Organizations Chapter V Expert Systems.
1 Chapter 11 Planning. 2 Project Planning “establishing a predetermined course of action within a forecasted environment” “establishing a predetermined.
Progression in KS3/4 Algorithms MONDAY 30 TH NOVEMBER SUE SENTANCE.
4 - Conditional Control Structures CHAPTER 4. Introduction A Program is usually not limited to a linear sequence of instructions. In real life, a programme.
Presented by The Solutions Group Decision Making Tools.
Algorithms and Problem Solving
Engineering Fundamentals and Problem Solving, 6e
Introduction Characteristics Advantages Limitations
Object-Oriented Software Engineering Using UML, Patterns, and Java,
DSS & Warehousing Systems
ALGORITHMS AND FLOWCHARTS
Methodologies By Akinola Soyinka.
Gary Hughes, South Oakleigh College
Artificial Intelligence
About the Presentations
Lecture 2 Introduction to Programming
Unit# 9: Computer Program Development
Significance Tests: The Basics
The Logic of Declarative Statements
Algorithms and Problem Solving
Chapter 11 Describing Process Specifications and Structured Decisions
Basic Concepts of Algorithm
Documenting Accounting Information Systems
Presentation transcript:

1 ISAT 252: Analytical Methods IV Knowledge-Based Systems (KBS) and Declarative Programming KBS development and KBSDT Details Reading Assignment: Corvid Quick Start Manual

2 Outline 1.Lecture 1:Introduction to KBS and declarative programming 2.Lecture 2: Knowledge-based systems (KBS): definition and requirements overview 3.Lecture 3: KBS development and programming details Examples 1.Snow board packageSnow board package 2.Guitar selectionGuitar selection 3.Auto audio systemAuto audio system

3 Objectives Students should be able to: Explain the steps involved in the EKBS development methodology State and explain how to determine whether a problem is a good candidate for an EKBS solution Represent declarative knowledge as a decision tree(s) Generate a rule base from decision trees Generate a forest of decision trees from a rule base

4 KBS Development Methodology Cycle ready for final evaluation? design assumption correct? final evaluation define problem & goals design & construct prototype analyze & correct test/use system failed passed noyes no yes Prototype evolution: define the problem design & construct a prototype test/use the system analyze & correct if design assumptions are no longer correct. go to step 2; otherwise, if the system in not ready for final testing, go to step 3; otherwise, final test: if the system fails the final test, go to step 4; otherwise; implement the system.

5 Knowledge-based systems development ready for final evaluation? design assumption correct? final evaluation define problem & goals design & construct prototype analyze & correct test/use system failed passed noyes no yes Selecting an appropriate problem requires a clear description of the problem and an assessment as to the FEASIBILITY of a KBS solution. Step 1: problem definition

6 Feasibility Guidelines Include: 1. The need must justify the cost and effort 2. The knowledge in not available in all situations where it is needed 3. The problem may be solved using reasoning 4. The domain is well structured and does not require common sense 5. The problem may not be better solved using other computing methods 6. Domain expertise exists, for example, a cooperative & articulate domain expert is available 7. The problem is of proper size and scope

7 What makes for a good domain? ALL MUST BE TRUE! Genuine experts exist Experts must generally agree about goals/choices Experts must be able to articulate and explain their method Problem must require cognitive not physical skills Task cannot be too difficult Problems should not require common sense

8 Knowledge-based systems development ready for final evaluation? design assumption correct? final evaluation define problem & goals design & construct prototype analyze & correct test/use system failed passed noyes no yes Design and prototype construction includes the following knowledge engineering tasks: 2.1 acquiring the domain knowledge 2.2 representing the domain knowledge 2.3 designing the prototype 2.4 coding the prototype These knowledge engineering tasks are interrelated and may require several iterations to set up step 3: test/use. Step 2: design & prototype construction

9 Knowledge-based systems development ready for final evaluation? design assumption correct? final evaluation define problem & goals design & construct prototype analyze & correct test/use system failed passed noyes no yes Step 3: test/use the system Step 4: analyze and correct problems found in Step 3 Step 5: check the corrections against the design assumption and iterate through Steps until there is nothing to correct. Step 6: decide if the system is ready for the final evaluation: if not, return to Step 3; otherwise, Step 7: perform final evaluation: if it fails, return to Step4; otherwise, Quit Steps 3 - 7:

10 Step 2 and Declarative Programming A declarative program provides the computer with a set of declarative statements (facts, relationships) about a domain and the system infers conclusions that logically follow. To accomplish this involves the interrelated tasks mentioned in Step 2 above: 1.knowledge acquisition - acquiring the knowledge about the subject matter domain; 2.knowledge representation - representing the knowledge such that it can be used by the humans involved and the computer system; 3.prototype design - that is, designing a solution that the client is OK with – show the client; 4.programming - that is, entering the knowledge-base into the system (coding the prototype) – show the client.

11 Knowledge Representation There are several formalisms to represent declarative knowledge Each formalism has representational advantages over the others IF-THEN Rules Many people express their knowledge in this way Easy to implement It may be hard to verify Decision Trees A graphical way to represent knowledge for reviewing with the expert from who it was obtained A decision tree represents a collection of decisions made by the expert in a certain order Easy to verify

12 1. IF The customer's income is less than 25,000. THEN The customer's line of credit is denied. 2. IFThe customer's income is at least 25,000. ANDThe customer's credit rating is excellent. THEN The customer's line of credit is approved. 3. IF The customer's income is at least 25,000. ANDThe customer's credit rating is good. ANDThe customer has been in their present job less than 2.5 years. THEN The customer's line of credit is denied. 4. IF The customer's income is at least 25,000. ANDThe customer's credit rating is good. AND The customer has been in their present job at least 2.5 years. THEN The customer's line of credit is approved. 5. IF The customer's income is at least 25,000. AND The customer's credit rating is poor. THEN The customer's line of credit is denied. EXSYS Corvid variables values goal-variables PSEUDO CODE RULES PCR the language in the GLS!

13 CORVID Goals: gV1: The customer's line of credit is 1.approved. 2.denied. CORVID Variables and VALUES: 1.V2: The customer's credit rating is 1.excellent. 2.good. 3.poor. 2.V3: The customer has been in their present job 1.less than 2.5 years. 2.at least 2.5 years. 3.V4: The customer's income is 1.less than 25, at least 25, IF The customer's income is less than 25,000. THEN The customer's line of credit is denied. 2. IFThe customer's income is at least 25,000. and The customer's credit rating is excellent. THEN The customer's line of credit is approved. 3. IF The customer's income is at least 25,000. and The customer's credit rating is good. and The customer has been in their present job less than 2.5 years. THEN The customer's line of credit is denied. 4. IF The customer's income is at least 25,000. and The customer's credit rating is good. and The customer has been in their present job at least 2.5 years. THEN The customer's line of credit is approved. 5. IF The customer's income is at least 25,000. and The customer's credit rating is poor. THEN The customer's line of credit is denied. KBS Assistant: DICTIONARY/GLOSSARY!

14 Assign Reading: Corvid Quick Start Manual Class Activity: Illustrate Corvid Using the Credit Example?

15 CORVID Goals: gV1: The customer's line of credit is 1.approved. 2.denied. CORVID Variables and VALUES: 1.V2: The customer's credit rating is 1.excellent. 2.good. 3.poor. 2.V3: The customer has been in their present job 1.less than 2.5 years. 2.at least 2.5 years. 3.V4: The customer's income is 1.less than 25, at least 25, IF The customer's income is less than 25,000. THEN The customer's line of credit is denied. 2. IFThe customer's income is at least 25,000. and The customer's credit rating is excellent. THEN The customer's line of credit is approved. 3. IF The customer's income is at least 25,000. and The customer's credit rating is good. and The customer has been in their present job less than 2.5 years. THEN The customer's line of credit is denied. 4. IF The customer's income is at least 25,000. and The customer's credit rating is good. and The customer has been in their present job at least 2.5 years. THEN The customer's line of credit is approved. 5. IF The customer's income is at least 25,000. and The customer's credit rating is poor. THEN The customer's line of credit is denied. KBS Assistant: DICTIONARY/GLOSSARY!

16 Conventions for Constructing a KBS Decision Tree 1.Trees are constructed to read from top to bottom (or left to right) 2. Nodes are labeled with variables 3. Edges are labeled with variables-values. 4.Terminal nodes (leafs) are labeled with variable-value pairs which represent either goals or sub-goals 5.Each complete path from the root to a terminal node (leaf) comprises a rule. 1.The terminal node is the Then-Part of a rule 2.The path up to the terminal node is the If-Part of a rule 6.Rules in a tree will be numbered left to right, rule 1 - rule n. (or top to bottom) Var 1 Var 2 Var 3 val 1 val 2 gV4-val 1 gV4-val-2 V5-val 1 val 2 rule 1 rule 2 rule 3 rule 4 Root Leaf Sub-Goal

17 V4: income gV2: approved rule 2 gV1: denied rule 1 V2: credit rating V3: in job at least 25K excellentgoodpoor less then 2.5at least 2.5 less than 25K gV1: denied rule 3 gV2: approved rule 4 gV1: denied rule 5 KBS DECISION TREE 1-1 with rule-base (pseudo code) 1. IF The customer's income is less than 25,000. THEN The customer's line of credit is denied. 2. IFThe customer's income is at least 25,000. ANDThe customer's credit rating is excellent. THEN The customer's line of credit is approved. 3. IF The customer's income is at least 25,000. ANDThe customer's credit rating is good. ANDThe customer has been in their present job less than 2.5 years. THEN The customer's line of credit is denied. 4. IF The customer's income is at least 25,000. ANDThe customer's credit rating is good. AND The customer has been in their present job at least 2.5 years. THEN The customer's line of credit is approved. 5. IF The customer's income is at least 25,000. AND The customer's credit rating is poor. THEN The customer's line of credit is denied. Apply the definition!

18 HR Authorization Problem R1 - If the visitor’s hotel type is C then the price of the hotel type is less than $50 R2 - If the visitor’s hotel is B then the price of the hotel type is between $50 and $100 R3 - If the visitor’s hotel type is A then the price of the hotel is greater than $100. R4 - If the visitor’s hotel type is AA then the price of the hotel is greater than $100. R5 - If the visitor’s job title is director then the hotel reservation is approved R6 -If the visitor’s job title is senior manager and the price of the hotel is greater than $100 and the visitor’s department is Accounting then the hotel reservation is approved R7 - If the visitor’s job title is senior manager and the price of the hotel is greater than $100 and the visitor’s department is not Accounting then the hotel reservation is denied R8 - If the visitor’s job title is senior manager and the price of the hotel is between $50 and $100 then the hotel reservation is approved R9 - If (the visitor’s job title is senior manager or the visitor’s job title is junior manager and the price of the hotel is less than $50 then the hotel reservation is approved. R10 - If the visitor’s job title is junior manager and the price of the hotel is greater or equal $50 then the hotel reservation is denied Handout!

19 EXSYS Goal Variables and values: 1.The hotel reservation is approved. 2.The hotel reservation is denied. EXSYS Variables and Values 1.The visitors hotel type is 1.C 2.B 3.A 4.AA 2.The visitors job title is 1.director 2.senior manager 3.junior manager DICTIONARY/GLOSSARY! 3.The price of the hotel is 1.greater than $100 (> 100) 2.between $50 and $100 (> =50 and < =100) 3.greater than or = $50 (>=50) 4.less than $50 (< 50) 4.The visitors department is 1.accounting 2.not accounting

20 Example KBS Decision Tree Hotel Reservation Authorization Hotel type Hotel Price is < $50 R1 C R1 - If the visitor’s hotel type is C then the price of the hotel type is less than $50 R2 - If the visitor’s hotel is B then the price of the hotel type is between $50 and $100 R3 - If the visitor’s hotel type is A then the price of the hotel is greater than $100. R4 - If the visitor’s hotel type is AA then the price of the hotel is greater than $100. Hotel type B Hotel Price is > $50 and < $100 R2 Hotel type Hotel Price is > $100 R3 A Hotel type AA Hotel Price is > $100 R 4

21 HR Authorization Problem R1 - If the visitor’s hotel type is C then the price of the hotel type is less than $50 R2 - If the visitor’s hotel is B then the price of the hotel type is between $50 and $100 R3 - If the visitor’s hotel type is A then the price of the hotel is greater than $100. R4 - If the visitor’s hotel type is AA then the price of the hotel is greater than $100. R5 - If the visitor’s job title is director Then the hotel reservation is approved R6 -If the visitor’s job title is senior manager and the price of the hotel is greater than $100 and the visitor’s department is Accounting then the hotel reservation is approved R7 - If the visitor’s job title is senior manager and the price of the hotel is greater than $100 and the visitor’s department is not Accounting then the hotel reservation is denied R8 - If the visitor’s job title is senior manager and the price of the hotel is between $50 and $100 then the hotel reservation is approved R9 - If the visitor’s job title is senior manager or the visitor’s job title is junior manager and the price of the hotel is less than $50 then the hotel reservation is approved. R10 - If the visitor’s job title is junior manager and the price of the hotel is greater or equal $50 then the hotel reservation is denied

22 EXSYS Goal Variables and values: 1.The hotel reservation is approved. 2.The hotel reservation is denied. EXSYS Variables and Values 1.The visitors hotel type is 1.C 2.B 3.A 4.AA 2.The visitors job title is 1.director 2.senior manager 3.junior manager DICTIONARY/GLOSSARY! 3.The price of the hotel is 1.greater than $100 (> 100) 2.between $50 and $100 (> =50 and < =100) 3.greater than or = $50 (>=50) 4.less than $50 (< 50) 4.The visitors department is 1.accounting 2.not accounting

23 Reverse Engineering: From Rules to Decision Tree R5: If the visitor’s job title is director Then the hotel reservation is approved Job Title HR is approved R5 Director

24 Reverse Engineering: From Rules to Decision Tree Hotel Price Senior Manager >100 Visitor Dept. Accounting HR is approved R6 R6: If the visitor’s job title is senior manager and the price of the hotel is greater than $100 and the visitor’s department is Accounting Then the hotel reservation is approved Job Title HR is approved R5 Director

25 Reverse Engineering: From Rules to Decision Tree Job Title HR is approved R5 Director Hotel Price Senior Manager >100 Visitor Dept. Accounting HR is approved R6 R7: If the visitor’s job title is senior manager and the price of the hotel is greater than $100 and the visitor’s department is not Accounting Then the hotel reservation is denied ot Accounting HR is denied R7

26 Reverse Engineering: From Rules to Decision Tree Job Title HR is approved Director Hotel Price Senior Manager >100 Visitor Dept. Accounting HR is approved R6 R8: If the visitor’s job title is senior manager and the price of the hotel is between $50 and $100 Then the hotel reservation is denied Not Accounting HR is denied R7 >=50 and <=100 HR is approved R8 HR is approved R5

27 Reverse Engineering: From Rules to Decision Tree Job Title HR is approved R5 Director Hotel Price Senior Manager >100 Visitor Dept. Accounting HR is approved R6 R9: If the visitor’s job title is senior manager and the price of the hotel is less than $50 Then the hotel reservation is approved Not Accounting HR is denied R7 >=50 and <=100 HR is approved R8 <50 HR is approved R9 R9 - If the visitor’s job title is senior manager the visitor’s job title is junior manager and the price of the hotel is less than $50 Then the hotel reservation is approved. OR

28 Reverse Engineering: From Rules to Decision Tree Job Title HR is approved R5 Director Hotel Price Senior Manager >100 Visitor Dept. Accounting HR is approved R6 Not Accounting HR is denied R7 >=50 and <=100 HR is approved R8 <50 HR is approved R9 <50 Junior Manager Hotel Price <50 HR is approved R10 >=50 HR is denied R11 R11 - If the visitor’s job title is junior manager and the price of the hotel is equal to or greater than $50 then the hotel reservation is denied R10 - If the visitor’s job title is junior manager and the price of the hotel is less than $50 then the hotel reservation is approved. Note: the Rule base has changed! R9 - If the visitor’s job title is senior manager OR the visitor’s job title is junior manager and the price of the hotel is less than $50 Then the hotel reservation is approved.

29 R1 - If the visitor’s hotel type is C then the price of the hotel type is less than $50 R2 - If the visitor’s hotel is B then the price of the hotel type is between $50 and $100 R3 - If the visitor’s hotel type is A then the price of the hotel is greater than $100. R4 - If the visitor’s hotel type is AA then the price of the hotel is greater than $100. R5 - If the visitor’s job title is director Then the hotel reservation is approved R6 -If the visitor’s job title is senior manager and the price of the hotel is greater than $100 and the visitor’s department is Accounting then the hotel reservation is approved Reverse Engineering: Revised From Rule to Decision Tree(s) R7 - If the visitor’s job title is senior manager and the price of the hotel is greater than $100 and the visitor’s department is not Accounting then the hotel reservation is denied R8 - If the visitor’s job title is senior manager and the price of the hotel is between $50 and $100 then the hotel reservation is approved R9 - If the visitor’s job title is senior manager and the price of the hotel is less than $50 then the hotel reservation is approved. R10 - If visitor’s job title is junior manager and the price of the hotel is less than $50 then the hotel reservation is approved. R11 - If the visitor’s job title is junior manager and the price of the hotel is greater or equal $50 then the hotel reservation is denied

30 Verifying the Acquired Knowledge Using the DT, the expert’s knowledge is easy to check Incompleteness in a knowledge-base Check whether there are some branches of a tree that are missing Minimal Quick Fix for an incomplete knowledge- base “This line of reasoning is under construction.”

31 Example KBS Decision Tree Hotel Reservation Authorization What if the Job Title is not Director, Senior Manager or Junior Manager? HR is undecided, call your supervisor Others Job Title HR is approved R5 Director Hotel Price Senior Manager >100 Visitor Dept. Accounting HR is approved R6 Not Accounting HR is denied R7 >=50 and <=100 HR is approved R8 <50 HR is approved R9 Junior Manager Hotel Price <50 HR is approved R10 >=50 HR is denied R11 Again, the rule base must change

32 Example KBS Decision Tree Hotel Reservation Authorization Other (BA) HR is denied Rule? Our Department has submitted a HR for a different type of Hotel, BA. How does the HRA handle this ? Hotel Hotel Price is $45 Rule 1 C B AA Hotel Price is $75 Rule 1 Hotel Price is $120 Rule 3 A Hotel Price is $250 Rule 4

33 Example KBS Decision Tree Hotel Reservation Authorization Lab 1: Enter this into EXSYS Corvid. Prep to Lab 1: Walk though how to use Corvid using the Credit example. Hotel type Hotel Price is $45 Rule 1 C B AA Hotel Price is $75 Rule 1 Hotel Price is $120 Rule 3 A Hotel Price is $250 Rule 4 Job Title HR is approved R5 Director Hotel Price Senior Manager Visitor Dept. Accounting HR is approved R6 Not Accounting HR is denied R7 >=50 and <=100 HR is approved R8 <50 HR is approved R9 Junior Manager Hotel Price <50 HR is approved R10 >=50 HR is denied R11 <=100