Lecture 1. Introduction To Expert System
Lecture 1. Introduction To Expert System
MODULE IV
Expert System and Learning
B.Tech.(CSE), VII
Artificial Intelligence (CSE 401)
Introduction of Expert System and it’s Architecture
Content of Module IV
2
What is an expert system?
3
Learning outcomes
4
Amity School of Engineering and Technology
6
An Expert System (ES) is a computer-based system (mainly
software) that uses knowledge and facts, and apply an appropriate
reasoning technique (inferencing) to solve problems in a given
field (domain) that normally require the services of human
experts.
7
Amity School of Engineering and Technology
The explanation
subsystem and
case-specific data
are optional
The knowledge
base editor is only
included if non
KBEs will be
editing the KB
Amity School of Engineering and Technology
Characteristics
Components
Amity School of Engineering and Technology
Predicting results
Amity School of Engineering and Technology
Knowledge Base
Inference Engine
User Interface
Explanation module
Characteristics of Expert System
16
17
Basic Concept of ES
18
19
Designing Expert System
20
Component of Expert System
21
1. Knowledge Base
22
Knowledge Base
23
Using the Knowledge Base
24
Reasoning Engine
25
Rule based system architecture
• The most common form of architecture used in expert and other types of
knowledge based system is the production system, also called the rule-based
system.
• This type of system uses knowledge encoded in the form of production rules,
that
is, if ….then rules.
• Each rule represents a small chunk of knowledge relating to the given domain
of expertise.
• When the known facts support the conditions in the rule’s left side, the
conclusion or action part of the rule is then accepted as known.
26
Rule based system architecture
• Inference in the production systems is accomplished by a process of
chaining through the rules recursively, either in a forward or backward
direction, until a conclusion is reached or until failure occurs.
27
Rule based system architecture
28
Forward chaining is data
driven
Backward chaining is goal
Explanation
30
User interface
31
Expert System Components And
Human Interfaces
• Expert systems have a number of major system components
and interface with individuals who interact with the system in
various roles.
32
CONTROL SYSTEM with Failure Detection and
Reconfiguration
Executive control
Aircraft
Controlle Dynamic
r s
ESTIMATO
R SENSOR
MEASUREMEN
TS
Reconfiguration
control signals
38
3. Inference Engine
39
4. Explanation facility
40
5. Knowledge Acquisition facility
41
6. External interface
This provides the communication link between the ES and the external
environment.
42
Knowledge Acquisition
43
Knowledge Acquisition
44
Amity School of Engineering and Technology
Knowledge Acquisition
Knowledge Acquisition
Amity School of Engineering and Technology
Knowledge Acquisition
Concept of Learning
58
Amity School of Engineering and Technology
Automation Learning
Concept of Learning
Inductive Learning Algorithm (ILA)
61
Basic Idea
• There are basically two methods for
knowledge extraction
– from domain experts
– With machine learning.
• Collecting knowledge form expert has issues
like
– Huge in amount
– Often biased for reliable
– Difficult to fetch desired information
62
Deductive learning
• Deductive learning is a method of ML in which a model is
built using a series of logical principles and steps.
• In DL, the model is specifically designed to adhere to a set of
guidelines and processes in order to produce predictions based
on brand-new, unexplored data.
• In rule-based systems, expert systems, and knowledge-based
systems, where the rules and processes are clearly set by
domain experts, deductive learning is frequently utilized.
• The model is trained to adhere to the guidelines and processes
in order to derive judgments or predictions from the input
data.
63
• Deductive learning begins with a set of rules
and processes and utilizes these rules to
generate predictions on incoming data, in
contrast to inductive learning, which learns
from particular examples. Making a model that
can precisely adhere to a set of guidelines and
processes in order to generate predictions is
the aim of deductive learning.
64
• So we move towards the machine learning
approach for this work.
– to replicate the experts logic in the form of
algorithms but this work is very tedious, time
taking and expensive.
– So we move towards the inductive algorithms
which itself generate the strategy for performing a
task and need not instruct separately at each step.
65
Inductive learning
• An technique of machine learning called
inductive learning trains a model to generate
predictions based on examples or observations.
• During inductive learning, the model picks up
knowledge from particular examples or
instances and generalizes it such that it can
predict outcomes for brand-new data.
66
• When using inductive learning, a rule or
method is not explicitly programmed into the
model.
• Instead, the model is trained to spot trends and
connections in the input data and then utilize
this knowledge to predict outcomes from fresh
data.
• Making a model that can precisely anticipate
the result of subsequent instances is the aim of
inductive learning. 67
Example no. Place type weather location decision
68
THE ILA ALGORITHM:
General requirements for the algorithm:-
69
• Step 1: divide the table ‘T’ containing m
examples into n sub-tables (t1, t2,…..tn). One
table for each possible value of the class
attribute. (repeat steps 2-8 for each sub-table)
70
s.no place type weather location decision
71
s.no place type weather location decision
72
• Step 2: Initialize the attribute combination count ‘ j ‘ = 1.
• Step 3: For the sub-table on which work is going on, divide the attribute
list into distinct combinations, each combination with ‘j ‘ distinct
attributes.
• Step 4: For each combination of attributes, count the number of
occurrences of attribute values that appear under the same combination of
attributes in unmarked rows of the sub-table under consideration, and at
the same time, not appears under the same combination of attributes of
other sub-tables. Call the first combination with the maximum number of
occurrences the max-combination ‘ MAX’.
73
• Step 5: If ‘MAX’ = = null , increase ‘ j ‘ by 1 and go to Step
3.
• Step 6: Mark all rows of the sub-table where working, in
which the values of ‘MAX’ appear, as classified.
• Step 7: Add a rule (IF attribute = “XYZ” –> THEN decision is
YES/ NO) to R whose left-hand side will have attribute names
of the ‘MAX’ with their values separated by AND, and its
right-hand side contains the decision attribute value associated
with the sub-table.
• Step 8: If all rows are marked as classified, then move on to
process another sub-table and go to Step 2. else, go to Step 4.
If no sub-tables are available, exit with the set of rules
obtained till then.
74
step (2-8) at iteration 1 row 3 & 4 column weather is selected
and row 3 & 4 are marked. the rule is added to R IF weather is
warm then a decision is yes.
at iteration 2 row 1 column place type is selected and row 1 is
marked. the rule is added to R IF place type is hilly then the
decision is yes.
at iteration 3 row 2 column location is selected and row 2 is
marked. the rule is added to R IF location is Shimla then the
decision is yes.
at iteration 4 row 5&6 column location is selected and row 5&6
are marked. the rule is added to R IF location is Mumbai then a
decision is no.
at iteration 5 row 7 column place type & the weather is selected
and row 7 is marked. rule is added to R IF place type is beach
75
AND weather is windy then the decision is
finally we get the rule set :- Rule Set
• Rule 1: IF the weather is warm THEN the decision is yes.
• Rule 2: IF place type is hilly THEN the decision is yes.
• Rule 3: IF location is Shimla THEN the decision is yes.
• Rule 4: IF location is Mumbai THEN the decision is no.
• Rule 5: IF place type is beach AND the weather is windy
THEN the decision is no.
76
Amity School of Engineering and Technology
Advantages of ES
They can be used for risky places where the human presence is
not safe.
Limitations of AI
The response of the expert system may get wrong if the knowledge base
contains the wrong information.
Like a human being, it cannot produce a creative output for different scenarios.
For each domain, we require a specific ES, which is one of the big limitations.
Applications of ES
In Knowledge Domain
In Finance Domain
80