Ai Day 39

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 64

Professional Elective-Artificial Intelligence

Department of Mechatronics Engineering


Acharya Institute of Technology
MODULE-4
Expert Systems Architectures:
• Introduction ,
• Rule-Based System Architectures ,
• Non- Production system Architectures:
• Semantic Network Architectures, Frame Architectures ,
• Decision Tree Architectures, Blackboard System Architectures,
• Analogical Reasoning Architectures, Neural Network Architectures.
FORWARD & BACKWARD CHAINING
• The process of Inferencing that starts with the available data and uses
the inference rules to conclude more data until the desired goal is
reached is called as Forward chaining. And is known as data driven
search.

• The process of inferencing that starts with a list of goals and works
backwards to see if there is data which will allow it to conclude any of
these goals is called as Backward Chaining. It is a reverse process of
Inferencing.
rule based
NON PRODUCTION SYSTEM ARCHITECTURES
NON PRODUCTION SYSTEM
ARCHITECTURES
• 1.Associative or Semantic Network Architectures: It's a network made up of
nodes connected by directed arcs.
The nodes represent objects ,attributes, concepts or other basic entities ,and the
arcs ,which are labelled ,describe the relationship between the two nodes they
connect .
Associative network representation are especially useful in depicting hierarchical
Knowledge Structures, where property inheritance is common .Objects belonging
to a class of other objects may inherit many of the characteristics of the class .
Inheritance can also be treated as a form of Default reasoning which facilitates
the storage of information when shared by many objects as well as the
Inferencing Process.
Associative or Semantic Network
Architectures
• These Network Representations are used in Natural Language
Processing or Computer Vision Systems or in conjunction with some
other form of Representation.
• Expert System based on Associative or Semantic Network
Architecture is CASNET –Casual Associational Network developed by
Rutgers University during 1970’s .CASNET is used to Diagnose and
recommend treatment for Glaucoma ,one of the leading causes of
Blindness.
• Three Planes:1.Patient Observation (tests, symptoms ,other signs)
• 2.Pathophysiological States. 3.Disease Categories.
Associative or Semantic Network
Architectures
2.Frame Architecture
• Frame Architecture: Frames are structured set of closely related
knowledge ,such as an object or concept name ,the objects main
attributes and their corresponding values and possibly some attached
procedures(If –added, If-needed , If –Removed Procedures).
• The attributes ,values and Procedures are stored in specified slots and
slot facets of the frame .
• Individual Frames are linked together as a network much like the
nodes in an Associative Network. Thus frames have many of the
features of Associative Network like property inheritance and default
reasoning.
2.Frame Architecture
• An Example of a Frame based system is the PIP System (Present illness
Program) developed at MIT during late 1970’s and 1980’s.
• This system was used to diagnose patients using low cost ,easily
obtained information ,the type of information obtained by a general
practitioner during an office examination.
• The medical Knowledge in PIP is organized in frame structures ,where
each frame is composed of categories of slots with names such as
Typical Findings, Logical Decision Criteria ,Complimentary Relations to
other frames ,Differential Diagnosis and Scoring.
2.Frame Architecture
• The patient findings are matched against frames ,and when close
match is found ,a trigger status occurs .
• A trigger is a finding that is so strongly related to a disorder that the
system regards it as an active Hypothesis ,one to be pursued further .
• A special is sufficient slot is used to confirm the presence of a disease
when key findings correlate with the slot contents.
3.Decision Tree Architecture

• Knowledge for Expert System may be stored in the form of a Decision tree
when the knowledge can be structured in a top to bottom manner.
• For example the identification of objects (Equipment Faults ,physical
objects, diseases and the like)can be made through a Decision Tree until
the path leads to unique leaf nodewhich corresponds to the unknown
objects identity.
• Initial and Intermediate nodes in the tree corresponds to object attributes
,and terminating nodes correspond to the identities of objects.
• Attribute values for an object determine a path to a leaf node in the tree
which contains the objects identification .
3.Decision Tree Architecture
4.Blackboard System Architectures
• This refers to a Knowledge based system which uses a form of
opportunistic reasoning. Which differs from pure forward chaining &
Backward chaining in production system and either directions may be
chosen dynamically at each stage in the problem solution process.
• There are a number of Knowledge Sources which are separate and
independent sets of coded Knowledge.
• A globally accessible data base structure called a black board contains
the current problem state and information needed by Knowledge
Source which makes changes to the blackboard that incrementally
lead to a solution.
4.Blackboard System Architectures
• Control Information may be contained within the sources on
blackboard or separate module. The control knowledge monitors the
changes to the blackboard and determines what the immediate focus
of attention should be in solving the problem.
4.Blackboard System Architectures
5.Analogical Reasoning Architecture
• Expert System based on analogical architecture solve new problems
like Humans by finding a similar problem solution that is known and
applying the known solution to the new problem, possibly with some
modifications.
• For Example if we know a method of proving that the product of two
even integers is even ,we can successfully prove that the product of
two odd integers is odd through much the same proof steps.
• They require a large knowledge base having numerous problem
solutions. And other previously encountered situations or episodes.
• What is Artificial Neural Network?
• The term "Artificial Neural Network"
is derived from Biological neural
networks that develop the structure
of a human brain. Similar to the
human brain that has neurons
interconnected to one another,
artificial neural networks also have
neurons that are interconnected to
one another in various layers of the
networks. These neurons are known
as nodes.
The typical Artificial Neural Network looks something like the given figure.

Dendrites from Biological Neural Network


represent inputs in Artificial Neural Networks, cell
nucleus represents Nodes, synapse represents
Weights, and Axon represents Output.

Relationship between Biological neural network


and artificial neural network:

Biological Neural Network Artificial Neural Network


Dendrites Inputs
Cell nucleus Nodes
Synapse Weights
Axon Output
An Artificial Neural Network in the field of Artificial intelligence where it attempts to
mimic the network of neurons makes up a human brain so that computers will have an
option to understand things and make decisions in a human-like manner. The artificial
neural network is designed by programming computers to behave simply like
interconnected brain cells.

There are around 1000 billion neurons in the human brain. Each neuron has an
association point somewhere in the range of 1,000 and 100,000. In the human brain,
data is stored in such a manner as to be distributed, and we can extract more than one
piece of this data when necessary from our memory parallelly.

We can understand the artificial neural network with an example, consider an example of
a digital logic gate that takes an input and gives an output. "OR" gate, which takes two
inputs. If one or both the inputs are "On," then we get "On" in output. If both the inputs
are "Off," then we get "Off" in output. Here the output depends upon input. Our brain
does not perform the same task. The outputs to inputs relationship keep changing
because of the neurons in our brain, which are "learning."
The architecture of an artificial neural network:

Input Layer:

As the name suggests, it accepts inputs in several different


formats provided by the programmer.

Hidden Layer:

The hidden layer presents in-between input and output


layers. It performs all the calculations to find hidden
features and patterns.

Output Layer:

The input goes through a series of transformations using


the hidden layer, which finally results in output that is
conveyed using this layer.
NEURAL NETWORK STRUCTURE
Advantages of Artificial Neural Network (ANN)
• Parallel processing capability:
Artificial neural networks have a numerical value that can perform more than one task simultaneously.
• Storing data on the entire network:
Data that is used in traditional programming is stored on the whole network, not on a database. The
disappearance of a couple of pieces of data in one place doesn't prevent the network from working.
• Capability to work with incomplete knowledge:
After ANN training, the information may produce output even with inadequate data. The loss of
performance here relies upon the significance of missing data.
• Having a memory distribution:
For ANN is to be able to adapt, it is important to determine the examples and to encourage the network
according to the desired output by demonstrating these examples to the network. The succession of the
network is directly proportional to the chosen instances, and if the event can't appear to the network in all its
aspects, it can produce false output
Having fault tolerance:
Extortion of one or more cells of ANN does not prohibit it from generating output, and this feature makes the
network fault-tolerance.
Disadvantages of Artificial Neural Network:
• Assurance of proper network structure:
There is no particular guideline for determining the structure of artificial neural
networks. The appropriate network structure is accomplished through experience, trial,
and error.
• Unrecognized behavior of the network:
It is the most significant issue of ANN. When ANN produces a testing solution, it does
not provide insight concerning why and how. It decreases trust in the network.
• Hardware dependence:
Artificial neural networks need processors with parallel processing power, as per their
structure. Therefore, the realization of the equipment is dependent.
• Difficulty of showing the issue to the network:
ANNs can work with numerical data. Problems must be converted into numerical
values before being introduced to ANN. The presentation mechanism to be resolved
here will directly impact the performance of the network. It relies on the user's abilities.
What are Artificial Neural Networks?

• Artificial Neural Networks are the computing system that is designed to simulate
the way the human brain analyzes and processes the information.
• Artificial Neural Networks have self-learning capabilities that enable it to produce a
better result as more data become available. So, if the network is trained on more
data, it will be more accurate because these neural networks learn from the
examples. The neural network can be configured for specific applications like data
classification, pattern recognition, etc.

• With the help of the neural network, we can actually see that a lot of technology
has been evolved from translating webpages to other languages to having a virtual
assistant to order groceries online. All of these things are possible because of
neural networks. So, an artificial neural network is nothing but a network of various
artificial neurons.
Importance of Neural Network:

Without Neural Network: Let's have a look at the example given below. Here we have a machine, such that we have
trained it with four types of cats, as you can see in the image below. And once we are done with the training, we will
provide a random image to that particular machine that has a cat. Since this cat is not similar to the cats through which
we have trained our system, so without the neural network, our machine would not identify the cat in the picture.
Basically, the machine will get confused in figuring out where the cat is.

With Neural Network: However, when we talk about the case with a neural network,
even if we have not trained our machine with that particular cat. But still, it can
identify certain features of a cat that we have trained on, and it can match those
features with the cat that is there in that particular image and can also identify the cat.
So, with the help of this example, you can clearly see the importance of the concept of
a neural network.
Working of Artificial Neural Networks

Instead of directly getting into the working of Artificial Neural Networks, lets breakdown and try to understand
Neural Network's basic unit, which is called a Perceptron.

So, a perceptron can be defined as a neural network with a single layer that classifies the linear data. It further
constitutes four major components, which are as follows;
• Inputs
• Weights and Bias
• Summation Functions
• Activation or transformation function

The main logic behind the concept of Perceptron is as follows:

The inputs (x) are fed into the input layer, which undergoes multiplication with the allotted weights (w)
followed by experiencing addition in order to form weighted sums. Then these inputs weighted sums with their
corresponding weights are executed on the pertinent activation function.
Weights and Bias
As and when the input variable is fed into the network, a random value is given as a weight of that particular
input, such that each individual weight represents the importance of that input in order to make correct
predictions of the result.

However, bias helps in the adjustment of the curve of activation function so as to accomplish a precise output.

Summation Function
After the weights are assigned to the input, it then computes the product of each input and weights. Then the
weighted sum is calculated by the summation function in which all of the products are added.

Activation Function
The main objective of the activation function is to perform a mapping of a weighted sum upon the output. The
transformation function comprises of activation functions such as tanh, ReLU, sigmoid, etc.

The activation function is categorized into two main parts:


• Linear Activation Function
• Non-Linear Activation Function
Linear Activation Function
• In the linear activation function, the
output of functions is not restricted in
between any range.
• Its range is specified from -infinity to
infinity. For each individual neuron, the
inputs get multiplied with the weight
of each respective neuron, which in
turn leads to the creation of output
signal proportional to the input.
• If all the input layers are linear in
nature, then the final activation of the
last layer will actually be the linear
function of the initial layer's input.
Non- linear function
• These are one of the most widely used activation
function. It helps the model in generalizing and
adapting any sort of data in order to perform
correct differentiation among the output.
• Since the non-linear function comes up with
derivative functions, so the problems related to
backpropagation has been successfully solved.
• For the creation of deep neural networks, it
permits the stacking up of several layers of the
neurons.
A Multi Layer Neural Network
A Multi Layer Neural Network
Multi Layer network illustrates three layers of a number of
interconnected nodes , the first layer serve as input layer ,Receiving
inputs from some set of Stimuli .

The second layer called Hidden layer receives inputs from the first layer
and produces a pattern of inputs to the third layer ,the output layer.

The pattern of outputs from the final layer are the networks responses
to the input stimuli patterns ,Input links are layers j(j=1,2,3) have
weights Wij for i=1,2,………….n
A Multi Layer Neural Network
A neural network can be a Black Box that transforms the input vector X to
the output vector Y, where the transformation performed is the result of
the pattern of connections and weights ,according to the values of weight
matrix W.
In Multi Layer network having N nodes in each of M layers will have weights
represented as an nxm matrix W. nodes having no interconnecting links will
have a weight value of Zero.
VECTOR PRODUCT = X *W =∑xi * wi = |x| |w| cos Ω
Product is maximum when Ω=0 and both vectors point in same direction,is
minimum when both point in opposite directions Ω=180 degrees.
• Supervised and Unsupervised
learning are the two techniques
of machine learning. But both
the techniques are used in
different scenarios and with
different datasets. Below the
explanation of both learning
methods along with their
difference table is given.
Supervised Machine Learning:
Supervised learning is a machine learning method in which models are trained using
labeled data. In supervised learning, models need to find the mapping function to
map the input variable (X) with the output variable (Y).

Supervised learning needs supervision to train the model, which is similar to as a


student learns things in the presence of a teacher. Supervised learning can be used for
two types of problems: Classification and Regression.

Example: Suppose we have an image of different types of fruits. The task of our
supervised learning model is to identify the fruits and classify them accordingly. So to
identify the image in supervised learning, we will give the input data as well as output
for that, which means we will train the model by the shape, size, color, and taste of
each fruit. Once the training is completed, we will test the model by giving the new
set of fruit. The model will identify the fruit and predict the output using a suitable
algorithm.
Unsupervised Machine Learning:
Unsupervised learning is another machine learning method in which patterns inferred from
the unlabeled input data. The goal of unsupervised learning is to find the structure and
patterns from the input data. Unsupervised learning does not need any supervision.
Instead, it finds patterns from the data by its own.

Unsupervised learning can be used for two types of problems: Clustering and Association.

Example: To understand the unsupervised learning, we will use the example given above.
So unlike supervised learning, here we will not provide any supervision to the model. We
will just provide the input dataset to the model and allow the model to find the patterns
from the data. With the help of a suitable algorithm, the model will train itself and divide
the fruits into different groups according to the most similar features between them.
Learning Pattern Weights
Two Types
1.Supervised Learning: Learning is performed by repeatedly presenting
the network with an input pattern and a desired output response.
 Vector Pairs=(x,y’) ,x=input pattern and y’ is desired output response
pattern.
The weights are then adjusted until the difference D between actual
response y and desired response y’ are the same D=y-y’.
Weights Wnew = Wold +a*D*x/|x|^2.where a is a learning constant
0<a<1 determines the rate of learning.
Learning Pattern Weights
• 2.UNSUPERVISED LEARNING: consists of input vector x only and no
desired response y’ is available to guide the system ,instead learning
process must find the weights Wij with no knowledge of the desired
output response.
Simple Neural Network DIAGNOSTIC
Expert System
Neural Net DIAGNOSTIC Expert System
• This system diagnoses and recommends treatment for acute sarcophagal
disease. The system is illustrated in figure above.
• From six symptom variables u1,u2,…………u6 one of two possible disease can
be diagnosed ,u7 or u8 .from resultant diagnosis ,one of three treatments
u9,u10 or u11 can be recommended.
• When a given symptom is present ,corresponding variable is given a value of
+1-true,negative symptoms are given an input value of -1-false.and
unknown symptoms are given the value 0.
• Input symptom values are multiplied by their corresponding weights
Wij ,numbers within the nodes are initial bias weights Wi0.and numbers on
the links are other node input weights .
Neural Net DIAGNOSTIC Expert System
• When sum of the weighted product of the input exceeds 0 ,an output will be
present on the corresponding output node output and serve as an input to the
next layer of nodes.
• Suppose the patient has an swollen feet u1=+1 but not red ears u2=-1 nor hair
loss u3=-1,this gives a value of u7=+1 .
• since 0+2*1+-2*-1+3*-1=1 suggesting the patient has superciliosis.
• When other symptoms of patient are false u4=u5=u6=-1
• The intermediate triangular shaped nodes were added by the training algorithm
,these additional nodes are needed so that weight assignments can be made
which permit the computation to work correctly for all training instances. And
deductions can be made when only partial information is available.
System Explanation How or Why ?
• System can Explain how or why a conclusion was reached.
ANN ARCHITECTURE
ANN MODEL
Opportunities for Expert System
Expert system elements may be implemented with ANN.

Areas such as Speech & Vision are done better with ANN.

Expert systems are used for training Neural Networks.

Knowledge Acquisition & Knowledge Engineering Problems can be


addressed using ANN.
APPLICATION OF NEURAL NETS
APPLICATIONS OF ANN
1.SIGNAL PROCESSING: Adaptive Echo Cancellation
2.PATTERN RECOGNITION: Character Recognition ,
Finger Print Recognition.
3.SPEECH SYNTHESIS: Text to Speech & Recognition.
4.Forecasting & Prediction.
5.Control and Automation.-ROBOTICS
6.RADAR Interpretation.
7.Interpreting BRAIN scans.
8.Stock Market Predictions and Optimization of Algorithms Developed.
ASSIGNMENT -3 QUESTIONS
• 1.Define an Expert System and Discuss How Expert Systems differ from conventional computer
systems in several important ways.
• 2.List different Expert Systems and Discuss there Applications and Importance.
• 3.Explain Rule Based System Architectures with neat diagram and relevant details.
• 4.Explain Associative or Semantic Network Architectures with an example of CASNET.
• 5.Explain Frame Architecture and Decision Tree Architectures with relevant Details.
• 6.Explain Blackboard system architectures with neat diagram.
• 7.Explain Analogical Reasoning Architectures with relevant details.
• 8.Explain Neural Network Architecture with a single neuron model and a multilayer neural
network with learning pattern weights.
• 9.Explain a Neural Net Expert System with neat diagram and appropriate details.
LINK FOR VIDEOS
• https://youtu.be/6QzXlE_TbuQ

• https://youtu.be/bVQUSndDllU

• https://youtu.be/aircAruvnKk

• https://youtu.be/qTimfH9vHk8

• https://youtu.be/oJNHXPs0XDk
Text Books:
1. Artificial Intelligence, Elaine Rich & Kevin Knight,
M/H 2004.

2. Introduction to AI & ES, Dan W. Patterson,


Prentice Hall of India, 2012.

3. Artificial Intelligence A Practical Approach, Er.Rajiv Chopra,


S.Chand & Company Ltd,2012.
• THANK YOU
How do artificial neural networks work?
ARTIFICIAL NEURAL NETWORKS-
ANN
An artificial neural network (ANN) is the piece of a computing
system designed to simulate the way the human brain analyzes and
processes information.
It is the foundation of artificial intelligence (AI) and solves problems
that would prove impossible or difficult by human or statistical
standards.
 ANNs have self-learning capabilities that enable them to produce
better results as more data becomes available.
ANN CONTD………..
ARTIFICIAL NEURAL NETWORKS-
ANN
• Neural Networks are large networks of simple processing elements or
nodes which process information dynamically in response to external
inputs.
• The nodes are simplified models of neurons and Knowledge in a
neural network is distributed throughout the network in the form of
internode connections and weighted links which form the inputs to
the nodes.
• The link weights serve to enhance or inhibit the input stimuli values
which are then added together at the nodes.
ARTIFICIAL NEURAL NETWORKS-
ANN
• If the sum of all the inputs to a node exceeds some threshold value T,
the node executes and produces an output which is passed on to
other nodes or is used to produce some output response.
• In the simplest case ,no output is produced if the total input is less
than T & In more complex models ,the output will depend on a
nonlinear activation function.
• Neural Networks were inspired as being models of the Human
Nervous System and Neurons are fairly complex processors and
Neural Networks exhibit many intelligent abilities such as
learning ,generalization and abstraction.
ARTIFICIAL NEURAL NETWORKS-
ANN
• A single node is illustrated in figure below.
• The inputs to the node are the values x1,x2,…….xn which typically take on values of -
1,0,1 or real values within the range (-1,1).
• The weights w1,w2,…………..wn correspond to the synaptic strength of a neuron. They
serve to increase or decrease the effects of the corresponding xi input values .
• The sum of the products Xi*Wi,i=1,2,…………….n serve as the total combined input to
the node.
• If this sum is large enough to exceed the threshold amount T ,the node fires and
produces an output Y an activation function value placed on the nodes output links .
• This output may then be the input to other nodes or the final output response from
the network.
Model of a Single Neuron

You might also like