Presentation is loading. Please wait.

Presentation is loading. Please wait.

Expert Systems. What are Expert Systems? “An expert systems is a computer system that operates by applying an inference mechanism to a body of specialist.

Similar presentations


Presentation on theme: "Expert Systems. What are Expert Systems? “An expert systems is a computer system that operates by applying an inference mechanism to a body of specialist."— Presentation transcript:

1 Expert Systems

2 What are Expert Systems? “An expert systems is a computer system that operates by applying an inference mechanism to a body of specialist expertise represented in the form of knowledge that manipulates this knowledge to perform efficient and effective problem solving in a narrow problem domain.” “An expert systems is a computer system that operates by applying an inference mechanism to a body of specialist expertise represented in the form of knowledge that manipulates this knowledge to perform efficient and effective problem solving in a narrow problem domain.”

3 Emphasis is on Knowledge not Methods 1. Most difficult and interesting problems do not have tractable algorithmic solutions 2. Human experts achieve outstanding performance because they are knowledgeable 3. Knowledge is a scarce (and therefore, valuable) resource It is better to call these systems: Knowledge-Based Systems

4 Knowledge consists of descriptions, relationships, and procedures in some domainKnowledge consists of descriptions, relationships, and procedures in some domain Knowledge takes many forms and is often hard to categorizeKnowledge takes many forms and is often hard to categorize Fundamental Concepts

5 Changing Focus in AI HIGH P r o g r a m P o w e r LOW Time Frame Find general methods for problem-solving and use them to create general-purpose programs

6 Changing Focus in AI HIGH P r o g r a m P o w e r LOW Time Frame Find general methods to improve representation and search and use them to create specialized programs

7 Changing Focus in AI HIGH P r o g r a m P o w e r LOW Time Frame Use extensive, high-quality, specific knowledge about some narrow problem area to create very specialized programs

8 Development of Knowledge-Based Systems Dendral Dendral Internist InternistCasnet Mycin MycinHearsay Puff PuffProspector Teiresias Teiresias Xcon(R1) Xcon(R1) Time Frame

9 Heuristics vs. Algorithms It is great if we have algorithms but often a heuristic will work almost as well at much less cost Prevent Skyjacking AlgorithmHeuristic

10 Types of Knowledge Type most commonly representedType most commonly represented Often called Shallow Knowledge since it involves just a basic understanding of domainOften called Shallow Knowledge since it involves just a basic understanding of domain Knowledge of how to perform physical actionsKnowledge of how to perform physical actions Comes from persistent practice of taskComes from persistent practice of task Not suited for knowledge-based domainNot suited for knowledge-based domain Input/Output Motor Skills

11 Types of Knowledge (cont.) Often called deep knowledgeOften called deep knowledge Basic understanding of underlying principles of domainBasic understanding of underlying principles of domain Knowledge associated with engineers, scientists, and physiciansKnowledge associated with engineers, scientists, and physicians Example: diagnosis of diseaseExample: diagnosis of disease  requires an understanding of the process of disease  Without this it is difficult to diagnose Theoretical

12 Why should we not use human expertise? Human ExpertiseArtificial Expertise PerishablePermanent Difficult to transfer Easy to transfer Difficult to documentEasy to document Unpredictable Consistent Expensive Affordable

13 Why should we keep using humans? Human ExpertiseArtificial Expertise Creative Uninspired Adaptive Needs to be told Sensory experience Symbolic input Broad focus Narrow focus Commonsense knowledge Technical knowledge knows certain things are true while others are not knows limits of knowledge

14 Knowledge Engineering The process of building an expert system Expert System Domain Expert Knowledge Engineer

15 Views of an Expert System: End-user User Interface Intelligent Program Data Base

16 Views of an Expert System: Knowledge Engineer Intelligent Program Knowledge Base Inference Engine Rules, Semantic Networks, Frames, and Facts General Problem Solving Knowledge:

17 Views of an Expert System: Knowledge Engineer Intelligent Program Knowledge Base Inference Engine Development Shell Knowledge Acquisition Tool Test Case Data Base Developer’s Interface

18 People Involved Expert System Building Tool Expert System - Inference Engine - Knowledge Base Knowledge Engineer Domain Expert

19 Forms of Inference Process of drawing conclusions based on facts known or thought to be trueProcess of drawing conclusions based on facts known or thought to be true We commonly use three different type:We commonly use three different type:  Deduction  Abduction  Induction

20 Deduction Reasoning from a known principle to an unknown, from the general to the specific, or from a premise to a logical conclusion Modus Ponens Modus Tolens > rules, theorems, models

21 Deduction - Example Suppose that we know:  X, swimming(X) -> wet(X)  X, swimming(X) -> wet(X) If we are now told: swimming(andy) swimming(andy) Then we can derive (using Modus Ponens): wet(andy) wet(andy)

22 Used when generating explanations Is an form of reasoning Is an unsound form of reasoning If we know: Can we state: Abduction  X, swimming(X) -> wet(X) wet(alex) swimming(alex) ?

23 Reasoning from particular facts or individual cases to a general conclusion This is the basis of scientific discovery Key technique in machine learning and knowledge acquisition IF THEN > generalization, observation Induction

24 Example - Family Relationships child_of(alex, nicole). child_of(alina, nicole). child_of(nicholas, leah). child_of(phillip, leah). child_of(melanie, cathy). child_of(leslie, cathy). child_of(sarah, cathy). child_of(angela, cathy). male(alex). male(phillip). male(nicholas). female(alina). female(leah). female(nicole). female(angela). female(sarah). female(leslie). female(melanie). female(cathy). Basic domain facts:

25 Example - Family Relationships (cont.) sisters(nicole, leah). sisters(X, Z) :- child_of(X, Y), child_of(Z, Y), female(X), female(Z). brothers(X, Z) :- child_of(X, Y), child_of(Z, Y), male(X), male(Z). Rules:

26 Machine Learning (Induction from Examples)

27 What is learning? “changes in a system that enable a system to do the same task more efficiently the next time” -- Herbert Simon“changes in a system that enable a system to do the same task more efficiently the next time” -- Herbert Simon “constructing or modifying representations of what is being experienced” -- Ryszard Michalski“constructing or modifying representations of what is being experienced” -- Ryszard Michalski “making useful changes in our minds” -- Marvin Minsky“making useful changes in our minds” -- Marvin Minsky

28 What is learning? Shorter Oxford Dictionary defines learning as:Shorter Oxford Dictionary defines learning as:  … to get knowledge of (a subject) or skill (in art, etc) by study, experience or teaching. Also to commit to memory … so learning involvesso learning involves  acquiring NEW knowledge  improving the use of EXISTING knowledge i.e., performancei.e., performance

29 Why learn? understand and improve human learningunderstand and improve human learning  learn to teach discover new thingsdiscover new things  data mining fill in skeletal information about a domainfill in skeletal information about a domain  incorporate new information in real time  make systems less “finicky” or “brittle” by making them better able to generalize

30 Why learn? learning is considered to be a KEY element of AIlearning is considered to be a KEY element of AI any autonomous system MUST be able to learn and adaptany autonomous system MUST be able to learn and adapt sometimes it is easier to `teach’ or `explain’ than to `program’sometimes it is easier to `teach’ or `explain’ than to `program’  e.g., consider the difference in explaining tic-tac-toe and writing a program to play the game  e.g., consider the difference in using a few example pictures to explain the difference between a lion and a tiger, and getting a computer to do likewise any system that makes the same mistake twice is pretty STUPIDany system that makes the same mistake twice is pretty STUPID  all systems (e.g., o/s, database) should have some integral learning component

31 State of the Art modest achievementsmodest achievements mostly isolated solutions to datemostly isolated solutions to date but canbut can  assist automatic knowledge acquisition  extract relevant knowledge from very large knowledge bases  abstract higher-level concepts out of data sets  … etc. recent trend to integrated systemsrecent trend to integrated systems  combine various learning methods induction, deduction, analogy, abductioninduction, deduction, analogy, abduction symbolic ML, neural networks, genetic algorithms,...symbolic ML, neural networks, genetic algorithms,...

32 Components of a learning system

33 Evaluating Performance several possible criteriaseveral possible criteria  predictive accuracy of classifier  speed of learner  speed of classifier  space requirements Most common criterion is Predictive AccuracyMost common criterion is Predictive Accuracy

34 Symbolic vs. Numeric ML has traditionally concerned itself with symbolic representationsML has traditionally concerned itself with symbolic representations  e.g., [color = orange] rather than [wavelength = 600nm] concepts are inherently symbolicconcepts are inherently symbolic required for human understanding and recognitionrequired for human understanding and recognition  we think in linguistic terms (i.e., symbols) and not in numbers  e.g., bird := has-wings & flies & has-beak & lays-eggs &... the relationship between symbolic & numerical representations is still an open debatethe relationship between symbolic & numerical representations is still an open debate

35 Learning as Search to learn a concept description, need to search through a `hypothesis’ spaceto learn a concept description, need to search through a `hypothesis’ space  the space of possible concept descriptions need a language to describe the conceptsneed a language to describe the concepts  the choice of language defines a large (possibly infinite) set of potential concept descriptions (i.e., rules) the task of the learning algorithm is to search this space in an efficient mannerthe task of the learning algorithm is to search this space in an efficient manner the difficulty is how to ignore the vast majority of invalid descriptions without missing the useful one(s)the difficulty is how to ignore the vast majority of invalid descriptions without missing the useful one(s) usually requires heuristic methods to prune the searchusually requires heuristic methods to prune the search

36 Summary Decision Trees are widely usedDecision Trees are widely used  easy to understand rationale  can out-perform humans  fast, simple to implement  handles noisy data well WeaknessesWeaknesses  univariate (uses only 1 variable at a time)  batch (non-incremental)

37 Induction systems The power behind an intelligent system isknowledge. We can trace the system success or failure to the quality of its knowledge. Difficult task: 1. Extracting the knowledge. 2. Encoding the knowledge. 3. Inability to express the knowledge formally.

38 Induction inducing general rules from knowledge contained in a finite set of examples. Induction is the process of reasoning from a given set of facts to conclude general principles or rules. Induction looks for patterns in available information to infer reasonable conclusions.

39 Induction as search Induction can be viewed as a search through a problem space for a solution to a problem. The problem space is composed of the problem’s major concepts linked together by an inductive process that uses examples of the problem.

40 The choice of representation for the desired function is probably the most important issue. As well as affecting the nature of the algorithm, it can affect whether the problem is feasible at all. Is the desired function representable in the representation language? An example is described by the values of the attributes and the value of the goal predicate. We call the value of the goal predicate the classification of the example. The complete set of examples is called the training set. Induction

41 Induction - first example Determine an appropriate gift on the basis of available money and the person’s age. Money and age will represent our decision factors (problem attributes). MoneyAgeGift MuchAdultCar MuchChildComputer LittleAdultToaster LittleChildCalculator Money Age

42 Induction - decision trees A decision tree takes as input an object or situation described by a set of properties, and outputs a yes/no “decision.” Decision trees therefore represent Boolean functions. Each internal node in the tree corresponds to a test of the value of one of the properties, and the branches from the node are labeled with the possible values of the test. Each leaf node in the tree specifies the Boolean value to be returned if that leaf is reached.

43 Decision trees are implicitly limited to talking about a single object. That is, the decision tree language is essentially propositional, with each attribute test being a proposition. We cannot use decision trees to represent tests that refer to two or more different objects. Decision trees are fully expressive within the class of propositional languages, that is, any Boolean function can be written as a decision tree. Have each row in the truth table for the function correspond to a path in the tree. The truth table is exponentially large in the number of attributes. Induction - decision trees

44 Supervised Concept Learning given a training set of positive and negative examples of a concept – –construct a description that will accurately classify future examples. – –Learn some good estimate of function f given a training set: { (x1,y1), (x2,y2),... (xn,yn)} where each yi is either + (positive) or - (negative) inductive learning generalizes from specific facts – –cannot be proven true, but can be proven false falsity preserving – –is like searching an Hypothesis Space H of possible f functions – –bias allows us to pick which h is preferable – –need to define a metric for comparing f functions to find the best

45 Inductive learning framework raw input is a feature vector, x, that describes the relevant attributes of an example each x is a list of n (attribute, value) pairs – –x = (person=Sue, major=CS, age=Young, Gender=F) attributes have discrete values – –all examples have all attributes. each example is a point in n-dimensional feature space maintain a library of previous cases when a new problem arises – –find the most similar case(s) in the library – –adapt the similar cases to solving the current problem

46 Learning Decision Trees Goal: Build a decision tree for classifying examples as positive or negative instances of a concept Supervised – –batch processing of training examples – –using a preference bias

47 Induction - decision trees - second example

48

49 If there are some positive and some negative examples, then choose the best attribute to split them. If all the remaining examples are positive (or all negative), then we are done: we can answer Yes or No. If there are no examples left, it means that no such example has been observed, and we return a default value calculated from the majority classification at the node’s parent. If there are no attributes left, but both positive and negative examples, we have a problem. It means that these examples have exactly the same description, but different classifications. This happens when some of the data are incorrect; we say there is noise in the data. It also happens when the attributes do not give enough information to fully describe the situation, or when the domain is truly nondeterministic. Induction - decision trees - second example

50

51

52 Induction - decision trees - choice of attributes Information theory Mathematical model for choosing the best attribute and at methods for dealing with noise in the data. The scheme used in decision tree learning for selecting attributes is designed to minimize the depth of the final tree. The idea is to pick the attribute that goes as far as possible toward providing an exact classification of the examples. A perfect attribute divides the examples into sets that are all positive or all negative. The measure should have its maximum value when the attribute is perfect and its minimum value when the attribute is of no use at all.

53 Induction - third example

54 Induction - example ExampleHeightHairEyesClass E1talldarkblue1 E2shortdarkblue1 E3tallblondblue2 E4tallredblue2 E5tallblondbrown1 E6shortblondblue2 E7shortblondbrown1 E8tall darkbrown1

55

56 Induction - example ExampleHeightHairEyesClass E1talldarkblue1 E2shortdarkblue1 E3tallblondblue2 E4tallredblue2 E5tallblondbrown1 E6shortblondblue2 E7shortblondbrown1 E8tall darkbrown1

57 Induction - example ExampleHeightHairEyesClass E1talldarkblue1 E2shortdarkblue1 E3tallblondblue2 E4tallredblue2 E5tallblondbrown1 E6shortblondblue2 E7shortblondbrown1 E8tall darkbrown1

58 Induction - example ExampleHeightHairEyesClass E1talldarkblue1 E2shortdarkblue1 E3tallblondblue2 E4tallredblue2 E5tallblondbrown1 E6shortblondblue2 E7shortblondbrown1 E8tall darkbrown1

59 Induction - example

60 ExampleHeightHairEyesClass E3tallblondblue2 E5tallblondbrown1 E6shortblondblue2 E7shortblondbrown1

61 ExampleHeightHairEyesClass E3tallblondblue2 E5tallblondbrown1 E6shortblondblue2 E7shortblondbrown1 Induction - example

62 hair E4 – class 2 E1 – class 1 E2 – class 1 E8 – class 1 E3 – class 2 E5 – class 1 E6 – class 2 E7 – class 1 red dark blond E3 – class 2 E6 – class 2 E5 – class 1 E7 – class 1 blue brown Eyes

63 Induction systems Determine objective - a search through a decision tree will reach one of a finite set of decisions on the basis of the path taken through the tree. Determine decision factors - represent the attribute nodes of the decision tree. Determine decision factor values - represent the attribute values of the decision tree. Determine solutions - list of final decisions that the system can make - the leaf nodes in the tree. Form example set. Create decision tree. Test the system. Revise the system.

64 Induction systems - example Football game prediction system Predict the outcome of a football game (will our team win or lose). Decision factors - location, weather, team record, opponent record. Decision factor values - LocationWeatherOwn RecordOpponent Record HomeRainPoorPoor AwayColdAverageAverage ModerateGoodGood Hot Solutions - win or lose

65 Induction systems - example (cont’d) Examples -

66 Induction systems - example (cont’d) Decision tree - Weather Own rec Location rain Win moderate Loss cold hot home away poor good average Win Loss No-data Test the system - predict the future games. Get the values for the decision factors for the upcoming game and see on which team to bet.

67 Induction systems - example (test)

68

69

70 Sensitivity study - Location

71 Induction systems - pros. and cons. Discovers rules from examples - potential unknown rules could be induced. Avoids knowledge elicitation problems - system knowledge can be acquired through past examples. Can produce new knowledge. Can uncover critical decision factors. Can eliminate irrelevant decision factors. Can uncover contradictions. Difficult to choose good decision factors. Difficult to understand rules. Applicable only for classification problems.

72 Induction systems - implemented AQ11 - diagnosing soybean diseases. Identifies 15 different diseases. The knowledge was derived from 630 examples and used 35 decision rules. Willard - forecasting thunderstorms. 140 examples, hierarchy of 30 modules, each with a decision tree. Rulemaster - detecting signs of transformer faults. Stock market predictions.


Download ppt "Expert Systems. What are Expert Systems? “An expert systems is a computer system that operates by applying an inference mechanism to a body of specialist."

Similar presentations


Ads by Google