Unit 4
Unit 4
Unit 4
Based on the methods and way of learning, machine learning is divided into mainly
four types, which are:
The main goal of the supervised learning technique is to map the input
variable(x) with the output variable(y). Some real-world applications of supervised
learning are Risk Assessment, Fraud Detection, Spam filtering, etc.
o Classification
o Regression
a) Classification
Classification algorithms are used to solve the classification problems in which the
output variable is categorical, such as "Yes" or No, Male or Female, Red or Blue,
etc. The classification algorithms predict the categories present in the dataset. Some
real-world examples of classification algorithms are Spam Detection, Email
filtering, etc.
AD
b) Regression
Disadvantages:
o Image Segmentation:
Supervised Learning algorithms are used in image segmentation. In this
process, image classification is performed on different image data with pre-
defined labels.
o Medical Diagnosis:
Supervised algorithms are also used in the medical field for diagnosis
purposes. It is done by using medical images and past labelled data with
labels for disease conditions. With such a process, the machine can identify a
disease for the new patients.
o Fraud Detection - Supervised Learning classification algorithms are used for
identifying fraud transactions, fraud customers, etc. It is done by using historic
data to identify the patterns that can lead to possible fraud.
o Spam detection - In spam detection & filtering, classification algorithms are
used. These algorithms classify an email as spam or not spam. The spam
emails are sent to the spam folder.
o Speech Recognition - Supervised learning algorithms are also used in speech
recognition. The algorithm is trained with voice data, and various
identifications can be done using the same, such as voice-activated
passwords, voice commands, etc.
In unsupervised learning, the models are trained with the data that is neither
classified nor labelled, and the model acts on that data without any supervision.
AD
So, now the machine will discover its patterns and differences, such as colour
difference, shape difference, and predict the output when it is tested with the test
dataset.
o Clustering
o Association
1) Clustering
The clustering technique is used when we want to find the inherent groups from the
data. It is a way to group the objects into a cluster such that the objects with the
most similarities remain in one group and have fewer or no similarities with the
objects of other groups. An example of the clustering algorithm is grouping the
customers by their purchasing behaviour.
AD
2) Association
Some popular algorithms of Association rule learning are Apriori Algorithm, Eclat,
FP-growth algorithm.
Disadvantages:
3. Semi-Supervised Learning
Semi-Supervised learning is a type of Machine Learning algorithm that lies
between Supervised and Unsupervised machine learning. It represents the
intermediate ground between Supervised (With Labelled training data) and
Unsupervised learning (with no labelled training data) algorithms and uses the
combination of labelled and unlabeled datasets during the training period.
Disadvantages:
AD
4. Reinforcement Learning
Reinforcement learning works on a feedback-based process, in which an AI
agent (A software component) automatically explore its surrounding by hitting
& trail, taking action, learning from experiences, and improving its
performance. Agent gets rewarded for each good action and get punished for each
bad action; hence the goal of reinforcement learning agent is to maximize the
rewards.
The reinforcement learning process is similar to a human being; for example, a child
learns various things by experiences in his day-to-day life. An example of
reinforcement learning is to play a game, where the Game is the environment, moves
of an agent at each step define states, and the goal of the agent is to get a high
score. Agent receives feedback in terms of punishment and rewards.
Due to its way of working, reinforcement learning is employed in different fields such
as Game theory, Operation Research, Information theory, multi-agent systems.
o Video Games:
RL algorithms are much popular in gaming applications. It is used to gain
super-human performance. Some popular games that use RL algorithms
are AlphaGO and AlphaGO Zero.
o Resource Management:
The "Resource Management with Deep Reinforcement Learning" paper
showed that how to use RL in computer to automatically learn and schedule
resources to wait for different jobs in order to minimize average job
slowdown.
o Robotics:
RL is widely being used in Robotics applications. Robots are used in the
industrial and manufacturing area, and these robots are made more powerful
with reinforcement learning. There are different industries that have their
vision of building intelligent robots using AI and Machine learning technology.
o Text Mining
Text-mining, one of the great applications of NLP, is now being implemented
with the help of Reinforcement Learning by Salesforce company.
Disadvantage
The curse of dimensionality limits reinforcement learning for real physical systems.
In supervised learning, the training data provided to the machines work as the
supervisor that teaches the machines to predict the output correctly. It applies the
same concept as a student learns in the supervision of the teacher.
In the real-world, supervised learning can be used for Risk Assessment, Image
classification, Fraud Detection, spam filtering, etc.
and diagram:
o If the given shape has four sides, and all the sides are equal, then it will be labelled as
a Square.
o If the given shape has three sides, then it will be labelled as a triangle.
o If the given shape has six equal sides then it will be labelled as hexagon.
Now, after training, we test our model using the test set, and the task of the model is
to identify the shape.
The machine is already trained on all types of shapes, and when it finds a new shape,
it classifies the shape on the bases of a number of sides, and predicts the output.
AD
1. Regression
Regression algorithms are used if there is a relationship between the input variable
and the output variable. It is used for the prediction of continuous variables, such as
Weather forecasting, Market Trends, etc. Below are some popular Regression
algorithms which come under supervised learning:
o Linear Regression
o Regression Trees
o Non-Linear Regression
o Bayesian Linear Regression
o Polynomial Regression
2. Classification
Classification algorithms are used when the output variable is categorical, which
means there are two classes such as Yes-No, Male-Female, True-false, etc.
Spam Filtering,
o Random Forest
o Decision Trees
o Logistic Regression
o Support vector Machines
Below are some assumptions that we made while using the decision tree:
At the beginning, we consider the whole training set as the root.
Feature values are preferred to be categorical. If the values are
continuous then they are discretized prior to building the model.
On the basis of attribute values, records are distributed recursively.
We use statistical methods for ordering attributes as root or the internal
node.
As you can see from the above image the Decision Tree works on the Sum of
Product form which is also known as Disjunctive Normal Form. In the above
image, we are predicting the use of computer in the daily life of people. In the
Decision Tree, the major challenge is the identification of the attribute for the root
node at each level. This process is known as attribute selection. We have two
popular attribute selection measures:
1. Information Gain
2. Gini Index
1. Information Gain:
When we use a node in a decision tree to partition the training instances into
smaller subsets the entropy changes. Information gain is a measure of this change
in entropy.
Suppose S is a set of instances,
A is an attribute
Sv is the subset of S
v represents an individual value that the attribute A can take and Values
(A) is the set of all possible values of A, then
Example:
For the set X = {a,a,a,b,b,b,b,b}
Total instances: 8
Instances of b: 5
Instances of a: 3
1 1 1 I
1 1 0 I
0 0 1 II
1 0 0 II
Here, we have 3 features and 2 output classes. To build a decision tree using
Information gain. We will take each of the features and calculate the information
for each feature.
From the above images, we can see that the information gain is maximum when we
make a split on feature Y. So, for the root node best-suited feature is feature Y.
Now we can see that while splitting the dataset by feature Y, the child contains a
pure subset of the target variable. So we don’t need to further split the dataset. The
final tree for the above dataset would look like this:
2. Gini Index
Gini Index is a metric to measure how often a randomly chosen element
would be incorrectly identified.
It means an attribute with a lower Gini index should be preferred.
Sklearn supports “Gini” criteria for Gini Index and by default, it takes
“gini” value.
The Formula for the calculation of the Gini Index is given below.
The Formula for Gini Index is given by :
Gini Impurity
The goal of the SVM algorithm is to create the best line or decision boundary that
can segregate n-dimensional space into classes so that we can easily put the new
data point in the correct category in the future. This best decision boundary is called
a hyperplane.
SVM chooses the extreme points/vectors that help in creating the hyperplane. These
extreme cases are called as support vectors, and hence algorithm is termed as
Support Vector Machine. Consider the below diagram in which there are two
different categories that are classified using a decision boundary or hyperplane:
Example: SVM can be understood with the example that we have used in the KNN
classifier. Suppose we see a strange cat that also has some features of dogs, so if we
want a model that can accurately identify whether it is a cat or dog, so such a model
can be created by using the SVM algorithm. We will first train our model with lots of
images of cats and dogs so that it can learn about different features of cats and
dogs, and then we test it with this strange creature. So as support vector creates a
decision boundary between these two data (cat and dog) and choose extreme cases
(support vectors), it will see the extreme case of cat and dog. On the basis of the
support vectors, it will classify it as a cat. Consider the below diagram:
SVM algorithm can be used for Face detection, image classification, text
categorization, etc.
Types of SVM
SVM can be of two types:
o Linear SVM: Linear SVM is used for linearly separable data, which means if a
dataset can be classified into two classes by using a single straight line, then
such data is termed as linearly separable data, and classifier is used called as
Linear SVM classifier.
o Non-linear SVM: Non-Linear SVM is used for non-linearly separated data,
which means if a dataset cannot be classified by using a straight line, then
such data is termed as non-linear data and classifier used is called as Non-
linear SVM classifier.
We always create a hyperplane that has a maximum margin, which means the
maximum distance between the data points.
Support Vectors:
The data points or vectors that are the closest to the hyperplane and which affect the
position of the hyperplane are termed as Support Vector. Since these vectors support
the hyperplane, hence called a Support vector.
The working of the SVM algorithm can be understood by using an example. Suppose
we have a dataset that has two tags (green and blue), and the dataset has two
features x1 and x2. We want a classifier that can classify the pair(x1, x2) of
coordinates in either green or blue. Consider the below image:
So as it is 2-d space so by just using a straight line, we can easily separate these two
classes. But there can be multiple lines that can separate these classes. Consider the
below image:
Hence, the SVM algorithm helps to find the best line or decision boundary; this best
boundary or region is called as a hyperplane. SVM algorithm finds the closest point
of the lines from both the classes. These points are called support vectors. The
distance between the vectors and the hyperplane is called as margin. And the goal
of SVM is to maximize this margin. The hyperplane with maximum margin is called
the optimal hyperplane.
Non-Linear SVM:
If data is linearly arranged, then we can separate it by using a straight line, but for
non-linear data, we cannot draw a single straight line. Consider the below image:
AD
So to separate these data points, we need to add one more dimension. For linear
data, we have used two dimensions x and y, so for non-linear data, we will add a
third dimension z. It can be calculated as:
z=x2 +y2
By adding the third dimension, the sample space will become as below image:
So now, SVM will divide the datasets into classes in the following way. Consider the
below image:
Since we are in 3-d Space, hence it is looking like a plane parallel to the x-axis. If we
convert it in 2d space with z=1, then it will become as:
Now we will implement the SVM algorithm using Python. Here we will use the same
dataset user_data, which we have used in Logistic regression and KNN classification.
AD
Till the Data pre-processing step, the code will remain the same. Below is the code:
After executing the above code, we will pre-process the data. The code will give the
dataset as:
Fitting the SVM classifier to the training set:
Now the training set will be fitted to the SVM classifier. To create the SVM classifier,
we will import SVC class from Sklearn.svm library. Below is the code for it:
In the above code, we have used kernel='linear', as here we are creating SVM for
linearly separable data. However, we can change it for non-linear data. And then we
fitted the classifier to the training dataset(x_train, y_train)
Output:
Out[8]:
SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
decision_function_shape='ovr', degree=3, gamma='auto_deprecated',
kernel='linear', max_iter=-1, probability=False, random_state=0,
shrinking=True, tol=0.001, verbose=False)
After getting the y_pred vector, we can compare the result of y_pred and y_test to
check the difference between the actual value and predicted value.
Output: Below is the output for the prediction of the test set:
Output:
As we can see in the above output image, there are 66+24= 90 correct predictions
and 8+2= 10 correct predictions. Therefore we can say that our SVM model
improved as compared to the Logistic regression model.
Output:
As we can see, the above output is appearing similar to the Logistic regression
output. In the output, we got the straight line as hyperplane because we have used a
linear kernel in the classifier. And we have also discussed above that for the 2d
space, the hyperplane in SVM is a straight line.
Output:
As we can see in the above output image, the SVM classifier has divided the users
into two regions (Purchased or Not purchased). Users who purchased the SUV are in
the red region with the red scatter points. And users who did not purchase the SUV
are in the green region with green scatter points. The hyperplane has divided the two
classes into Purchased and not purchased variable.
Unsupervised learning is a type of machine learning in which models are trained using unlabeled
dataset and are allowed to act on that data without any supervision.
o Unsupervised learning is helpful for finding useful insights from the data.
o Unsupervised learning is much similar as a human learns to think by their own
experiences, which makes it closer to the real AI.
o Unsupervised learning works on unlabeled and uncategorized data which make
unsupervised learning more important.
o In real-world, we do not always have input data with the corresponding output so to
solve such cases, we need unsupervised learning.
Here, we have taken an unlabeled input data, which means it is not categorized and
corresponding outputs are also not given. Now, this unlabeled input data is fed to
the machine learning model in order to train it. Firstly, it will interpret the raw data to
find the hidden patterns from the data and then will apply suitable algorithms such
as k-means clustering, Decision tree, etc.
Once it applies the suitable algorithm, the algorithm divides the data objects into
groups according to the similarities and difference between the objects.
AD
Types of Unsupervised Learning Algorithm:
The unsupervised learning algorithm can be further categorized into two types of
problems:
o Clustering: Clustering is a method of grouping the objects into clusters such that
objects with most similarities remains into a group and has less or no similarities with
the objects of another group. Cluster analysis finds the commonalities between the
data objects and categorizes them as per the presence and absence of those
commonalities.
o Association: An association rule is an unsupervised learning method which is used
for finding the relationships between variables in the large database. It determines
the set of items that occurs together in the dataset. Association rule makes marketing
strategy more effective. Such as people who buy X item (suppose a bread) are also
tend to purchase Y (Butter/Jam) item. A typical example of Association rule is Market
Basket Analysis.
AD
Note: We will learn these algorithms in later chapters.
o K-means clustering
o KNN (k-nearest neighbors)
o Hierarchal clustering
o Anomaly detection
o Neural Networks
o Principle Component Analysis
o Independent Component Analysis
o Apriori algorithm
o Singular value decomposition
AD
o
o Artificial Neural Network Tutorial provides basic and advanced concepts of
ANNs. Our Artificial Neural Network tutorial is developed for beginners as well
as professions.
o The term "Artificial neural network" refers to a biologically inspired sub-field
of artificial intelligence modeled after the brain. An Artificial neural network is
usually a computational network based on biological neural networks that
construct the structure of the human brain. Similar to a human brain has
neurons interconnected to each other, artificial neural networks also have
neurons that are linked to each other in various layers of the networks. These
neurons are known as nodes.
o Artificial neural network tutorial covers all the aspects related to the artificial
neural network. In this tutorial, we will discuss ANNs, Adaptive resonance
theory, Kohonen self-organizing map, Building blocks, unsupervised learning,
Genetic algorithm, etc.
o What is Artificial Neural Network?
o 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.
o
o The given figure illustrates the typical diagram of Biological Neural
Network.
o The typical Artificial Neural Network looks something like the given
figure.
o
o Dendrites from Biological Neural Network represent inputs in Artificial Neural
Networks, cell nucleus represents Nodes, synapse represents Weights, and
Axon represents Output.
o Relationship between Biological neural network and artificial neural network:
Dendrites Inputs
Synapse Weights
Axon Output
o Input Layer:
o As the name suggests, it accepts inputs in several different formats provided
by the programmer.
o Hidden Layer:
o The hidden layer presents in-between input and output layers. It performs all
the calculations to find hidden features and patterns.
O AD
o Output Layer:
o The input goes through a series of transformations using the hidden layer,
which finally results in output that is conveyed using this layer.
o The artificial neural network takes input and computes the weighted sum of
the inputs and includes a bias. This computation is represented in the form of
a transfer function.
o
o It determines weighted total is passed as an input to an activation function to
produce the output. Activation functions choose whether a node should fire
or not. Only those who are fired make it to the output layer. There are
distinctive activation functions available that can be applied upon the sort of
task we are performing.
o Advantages of Artificial Neural Network
(ANN)
o Parallel processing capability:
O AD
o Artificial neural networks have a numerical value that can perform more than
one task simultaneously.
o Storing data on the entire network:
o 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.
o Capability to work with incomplete knowledge:
o After ANN training, the information may produce output even with
inadequate data. The loss of performance here relies upon the significance of
missing data.
o Having a memory distribution:
o 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.
o Having fault tolerance:
o Extortion of one or more cells of ANN does not prohibit it from generating
output, and this feature makes the network fault-tolerance.
O AD
o Sigmoidal Hyperbolic:
o The Sigmoidal Hyperbola function is generally seen as an "S" shaped curve.
Here the tan hyperbolic function is used to approximate output from the
actual net input. The function is defined as:
o F(x) = (1/1 + exp(-????x))
o Where ???? is considered the Steepness parameter.
o Types of Artificial Neural Network:
o There are various types of Artificial Neural Networks (ANN) depending upon
the human brain neuron and network functions, an artificial neural network
similarly performs tasks. The majority of the artificial neural networks will have
some similarities with a more complex biological partner and are very effective
at their expected tasks. For example, segmentation or classification.
o Feedback ANN:
o In this type of ANN, the output returns into the network to accomplish the
best-evolved results internally. As per the University of Massachusetts,
Lowell Centre for Atmospheric Research. The feedback networks feed
information back into itself and are well suited to solve optimization issues.
The Internal system error corrections utilize feedback ANNs.
o Feed-Forward ANN:
o A feed-forward network is a basic neural network comprising of an input layer,
an output layer, and at least one layer of a neuron. Through assessment of its
output by reviewing its input, the intensity of the network can be noticed
based on group behavior of the associated neurons, and the output is
decided. The primary advantage of this network is that it figures out how to
evaluate and recognize input patterns.
o Prerequisite
o No specific expertise is needed as a prerequisite before starting this tutorial.
o Audience
o Our Artificial Neural Network Tutorial is developed for beginners as well as
professionals, to help them understand the basic concept of ANNs.
o Problems
o We assure you that you will not find any problem in this Artificial Neural
Network tutorial. But if there is any problem or mistake, please post the
problem in the contact form so that we can further improve it.
At its core, NLP aims to equip machines with the ability to comprehend and
generate natural language text or speech, similar to how humans do. This involves
a range of tasks, from simple tasks like language translation and sentiment analysis
to more complex tasks like language generation and understanding context.
NLP algorithms and models are often based on machine learning techniques like
deep learning, which involve training large neural networks on vast amounts of
textual data. These models learn to recognize patterns and make predictions about
language, enabling tasks like language translation, text summarization, question
answering, and more.
In earlier days, robotic applications were very limited, but now they have become
smarter and more efficient by combining with Artificial Intelligence. AI has played a
crucial role in the industrial sector by replacing humans in terms of productivity and
quality. In this article, 'Robotics and Artificial Intelligence, we will discuss Robots &
Artificial Intelligence and their various applications, advantages, differences, etc. Let's
start with the definition of Artificial Intelligence (AI) and Robots.
What is a robot?
A robot is a machine that looks like a human, and is capable of performing out
of box actions and replicating certain human movements automatically by
means of commands given to it using programming. Examples: Drug
Compounding Robot, Automotive Industry Robots, Order Picking Robots, Industrial
Floor Scrubbers and Sage Automation Gantry Robots, etc.
Components of Robot
Several components construct a robot, these components are as follows:
o Actuators: Actuators are the devices that are responsible for moving and
controlling a system or machine. It helps to achieve physical movements by
converting energy like electrical, hydraulic and air, etc. Actuators can create
linear as well as rotary motion.
o Power Supply: It is an electrical device that supplies electrical power to an
electrical load. The primary function of the power supply is to convert
electrical current to power the load.
o Electric Motors: These are the devices that convert electrical energy into
mechanical energy and are required for the rotational motion of the machines.
o Pneumatic Air Muscles: Air Muscles are soft pneumatic devices that are
ideally best fitted for robotics. They can contract and extend and operate by
pressurized air filling a pneumatic bladder. Whenever air is introduced, it can
contract up to 40%.
o Muscles wire: These are made up of nickel-titanium alloy called Nitinol and
are very thin in shape. It can also extend and contract when a specific amount
of heat and electric current is supplied into it. Also, it can be formed and bent
into different shapes when it is in its martensitic form. They can contract by
5% when electrical current passes through them.
o Piezo Motors and Ultrasonic Motors: Piezoelectric motors or Piezo motors
are the electrical devices that receive an electric signal and apply a directional
force to an opposing ceramic plate. It helps a robot to move in the desired
direction. These are the best suited electrical motors for industrial robots.
o Sensor: They provide the ability like see, hear, touch and movement like
humans. Sensors are the devices or machines which help to detect the events or
changes in the environment and send data to the computer processor. These
devices are usually equipped with other electronic devices. Similar to human
organs, the electrical sensor also plays a crucial role in Artificial Intelligence &
robotics. AI algorithms control robots by sensing the environment, and it
provides real-time information to computer processors.
Applications of Robotics
Robotics have different application areas. Some of the important applications
domains of robotics are as follows:
AD
Computer Vision
Robots can also see, and this is possible by one of the popular Artificial Intelligence
technologies named Computer vision. Computer Vision plays a crucial role in all
industries like health, entertainment, medical, military, mining, etc.
Computer Vision is an important domain of Artificial Intelligence that helps in
extracting meaningful information from images, videos and visual inputs and take
action accordingly.
Similarly, in the health care sector, robots powered by Natural Language Processing
may help physicians to observe the decease details and automatically fill in EHR.
Besides recognizing human language, it can learn common uses, such as learn the
accent, and predict how humans speak.
Edge Computing
Edge computing in robots is defined as a service provider of robot integration,
testing, design and simulation. Edge computing in robotics provides better data
management, lower connectivity cost, better security practices, more reliable and
uninterrupted connection.
For example, the deployment of an airbag in a car is a complex event based on the
data from multiple sensors in real-time. This idea is used in Robotics, for example,
Event-Processing in Autonomous Robot Programming.
Transfer learning reuses the pre-trained model for a related problem, and only the
last layer of the model is trained, which is relatively less time consuming and cheaper.
In robotics, transfer learning can be used to train one machine with the help of other
machines.
Reinforcement Learning
Reinforcement learning is a feedback-based learning method in machine learning
that enables an AI agent to learn and explore the environment, perform actions and
learn automatically from experience or feedback for each action. Further, it is also
having feature of autonomously learn to behave optimally through hit-and-trail
action while interacting with the environment. It is primarily used to develop the
sequence of decisions and achieve the goals in uncertain and potentially complex
environment. In robotics, robots explore the environment and learn about it through
hit and trial. For each action, he gets rewarded (positive or negative). Reinforcement
learning provides Robotics with a framework to design and simulate sophisticated
and hard-to-engineer behaviours.
Affective computing
Affective computing is a field of study that deals with developing systems that can
identify, interpret, process, and simulate human emotions. Affective computing aims
to endow robots with emotional intelligence to hope that robots can be endowed
with human-like capabilities of observation, interpretation, and emotion expression.
AD
Mixed Reality
Mixed Reality is also an emerging domain. It is mainly used in the field of
programming by demonstration (PbD). PbD creates a prototyping mechanism for
algorithms using a combination of physical and virtual objects.
o The major advantages of artificially intelligent robots are social care. They can
guide people, especially come to aid for older people, with chatbot like social
skills and advanced processors.
o Robotics also helps in Agricultural industry with the help of developing AI
based robots. These robots reduce the farmer's workload.
o In Military industry, Military bots can spy through speech and vision detectors,
along with saving lives by replacing infantry
o Robotics also employed in volcanoes, deep oceans, extremely cold places, or
even in space where normally humans can't survive.
o Robotics is also used in medical and healthcare industry as it can also perform
complex surgeries that have a higher risk of a mistake by humans, but with a
pre-set of instructions and added Intelligence. AI integrated robotics could
reduce the number of casualties greatly.
AD
AD
1. AI Programs
Usually, we use to operate them in computer-simulated worlds.
2. Robots
Generally, we use robots to operate in the real physical world.
Inputs are given in the form of the analogue signal or in the form of the speech
waveform.
Also, to operate this, special hardware with sensors and effectors are needed.
The expert system is a part of AI, and the first ES was developed in the year 1970,
which was the first successful approach of artificial intelligence. It solves the most
complex issue as an expert by extracting the knowledge stored in its knowledge
base. The system helps in decision making for compsex problems using both facts
and heuristics like a human expert. It is called so because it contains the expert
knowledge of a specific domain and can solve any complex problem of that
particular domain. These systems are designed for a specific domain, such
as medicine, science, etc.
Below is the block diagram that represents the working of an expert system:
Note: It is important to remember that an expert system is not used to replace the
human experts; instead, it is used to assist the human in making a complex
decision. These systems do not have human capabilities of thinking and work on
the basis of the knowledge base of the particular domain.
o High Performance: The expert system provides high performance for solving any
type of complex problem of a specific domain with high efficiency and accuracy.
o Understandable: It responds in a way that can be easily understandable by the user.
It can take input in human language and provides the output in the same way.
o Reliable: It is much reliable for generating an efficient and accurate output.
o Highly responsive: ES provides the result for any complex query within a very short
period of time.
AD
o User Interface
o Inference Engine
o Knowledge Base
1. User Interface
With the help of a user interface, the expert system interacts with the user, takes
queries as an input in a readable format, and passes it to the inference engine. After
getting the response from the inference engine, it displays the output to the user. In
other words, it is an interface that helps a non-expert user to communicate with
the expert system to find a solution.
o Forward Chaining: It starts from the known facts and rules, and applies the inference
rules to add their conclusion to the known facts.
o Backward Chaining: It is a backward reasoning method that starts from the goal and
works backward to prove the known facts.
3. Knowledge Base
o The knowledgebase is a type of storage that stores knowledge acquired from the
different experts of the particular domain. It is considered as big storage of
knowledge. The more the knowledge base, the more precise will be the Expert
System.
o It is similar to a database that contains information and rules of a particular domain
or subject.
o One can also view the knowledge base as collections of objects and their attributes.
Such as a Lion is an object and its attributes are it is a mammal, it is not a domestic
animal, etc.
o Firstly, ES should be fed with expert knowledge. In the case of MYCIN, human experts
specialized in the medical field of bacterial infection, provide information about the
causes, symptoms, and other knowledge in that domain.
o The KB of the MYCIN is updated successfully. In order to test it, the doctor provides a
new problem to it. The problem is to identify the presence of the bacteria by
inputting the details of a patient, including the symptoms, current condition, and
medical history.
o The ES will need a questionnaire to be filled by the patient to know the general
information about the patient, such as gender, age, etc.
o Now the system has collected all the information, so it will find the solution for the
problem by applying if-then rules using the inference engine and using the facts
stored within the KB.
o In the end, it will provide a response to the patient by using the user interface.
Before using any technology, we must have an idea about why to use that
technology and hence the same for the ES. Although we have human experts in
every field, then what is the need to develop a computer-based system. So below are
the points that are describing the need of the ES:
1. No memory Limitations: It can store as much data as required and can memorize it
at the time of its application. But for human experts, there are some limitations to
memorize all things at every time.
2. High Efficiency: If the knowledge base is updated with the correct knowledge, then
it provides a highly efficient output, which may not be possible for a human.
3. Expertise in a domain: There are lots of human experts in each domain, and they all
have different skills, different experiences, and different skills, so it is not easy to get a
final output for the query. But if we put the knowledge gained from human experts
into the expert system, then it provides an efficient output by mixing all the facts and
knowledge
4. Not affected by emotions: These systems are not affected by human emotions such
as fatigue, anger, depression, anxiety, etc.. Hence the performance remains constant.
5. High security: These systems provide high security to resolve any query.
6. Considers all the facts: To respond to any query, it checks and considers all the
available facts and provides the result accordingly. But it is possible that a human
expert may not consider some facts due to any reason.
7. Regular updates improve the performance: If there is an issue in the result
provided by the expert systems, we can improve the performance of the system by
updating the knowledge base.
AD
o Advising: It is capable of advising the human being for the query of any domain
from the particular ES.
o Provide decision-making capabilities: It provides the capability of decision making
in any domain, such as for making any financial decision, decisions in medical science,
etc.
o Demonstrate a device: It is capable of demonstrating any new products such as its
features, specifications, how to use that product, etc.
o Problem-solving: It has problem-solving capabilities.
o Explaining a problem: It is also capable of providing a detailed description of an
input problem.
o Interpreting the input: It is capable of interpreting the input given by the user.
o Predicting results: It can be used for the prediction of a result.
o Diagnosis: An ES designed for the medical field is capable of diagnosing a disease
without using multiple components as it already contains various inbuilt medical
tools.
o The response of the expert system may get wrong if the knowledge base contains the
wrong information.
o Like a human being, it cannot produce a creative output for different scenarios.
o Its maintenance and development costs are very high.
o Knowledge acquisition for designing is much difficult.
o For each domain, we require a specific ES, which is one of the big limitations.
o It cannot learn from itself and hence requires manual updates.
An Expert System is a type of artificial intelligence (AI) program designed to mimic and replicate the
decision-making abilities of a human expert in a specific domain or field. It is a computer-based
system that uses knowledge, reasoning, and decision-making methodologies to solve problems that
normally require human expertise.
2. **Inference Engine**: The inference engine is the core component of the expert system that
processes the information stored in the knowledge base. It uses various reasoning techniques (such
as forward chaining or backward chaining) to derive new facts or make decisions based on the
provided input and the rules encoded in the knowledge base.
3. **User Interface**: Expert systems include a user interface that allows users to interact with the
system, provide input, ask questions, and receive recommendations or solutions. This interface can
be text-based, graphical, or even voice-driven depending on the application.
4. **Explanation Facility**: Many expert systems are equipped with an explanation facility that can
explain how a particular conclusion or recommendation was reached. This is important for users to
understand the reasoning behind the system's output and build trust in its recommendations.
5. **Integration with External Systems**: In some applications, expert systems may need to
integrate with external data sources or systems to gather additional information or to act upon the
decisions made by the system.
Expert systems are used in various fields such as medicine, finance, engineering, customer support,
and more, where they can assist in complex decision-making, problem-solving, diagnosis,
troubleshooting, and knowledge sharing. They excel in situations where access to human experts is
limited, where consistency and accuracy are critical, and where the domain knowledge can be
explicitly defined and codified. However, expert systems also have limitations, particularly in handling
uncertainties, adapting to new situations, and dealing with unstructured data beyond their defined
knowledge base.