CCE3 - KNOWLEDGE REPRESENTATION AND ML DL With Answer
CCE3 - KNOWLEDGE REPRESENTATION AND ML DL With Answer
Faculty)
IT - 34 : KNOWLEDGE REPRESENTATION AND
ARTIFICIAL INTELLIGENCE : ML, DL
(2020 Pattern) (Semester - III)
Time : 2½ Hours] [Max. Marks : 50
Instructions to the candidates:
1) All Questions are compulsory.
2) For MCQ select appropriate choice from options given.
3) From Q2 to Q5 having Internal choice.
4) Figures to right indicate full marks.
2
xviii) Which of the following is/are limitations of deep learning?
a) Data labeling
b) Obtain huge training data sets
c) Data labeling and obtain huge training data sets
d) None of these
xix) The FPGAs can be used to implement
a) a Software design
b) Hardware design
c) both Hardware & Software designs
d) none
xx) Which of the following most advanced form of AI?
a) Neural Network b) Machine learning
c) Data Science d) Deep learning
3
Stages Of Artificial Intelligence
While I was doing my research I found a lot of articles that stated that Artificial General Intelligence,
Artificial Narrow Intelligence, and Artificial Super Intelligence are the different types of AI. To be more
precise, Artificial Intelligence has three stages.
Types Of Learning In Artificial Intelligence
1. Artificial Narrow Intelligence
2. Artificial General Intelligence
3. Artificial Super Intelligence
These are the three stages through which AI can evolve, rather than the 3 types of Artificial Intelligence.
Artificial Narrow Intelligence (ANI)
Also known as Weak AI, ANI is the stage of Artificial Intelligence involving machines that can perform
only a narrowly defined set of specific tasks. At this stage, the machine does not possess any thinking
ability, it just performs a set of pre-defined functions.
Discuss the main branches of Artificial Intelligences
Branches Of Artifical Intelligence
Artificial Intelligence can be used to solve real-world problems by implementing the following
processes/ techniques:
1. Machine Learning
2. Deep Learning
3. Natural Language Processing
4. Robotics
5. Expert Systems
6. Fuzzy Logic
Machine Learning
Machine Learning is the science of getting machines to interpret, process and analyze data in order to
solve real-world problems.
Under Machine Learning there are three categories:
1. Supervised Learning
2. Unsupervised Learning
3. Reinforcement Learning
Deep Learning
Deep Learning is the process of implementing Neural Networks on high dimensional data to gain
insights and form solutions. Deep Learning is an advanced field of Machine Learning that can be used to
solve more advanced problems.
Deep Learning is the logic behind the face verification algorithm on Facebook, self-driving cars, virtual
assistants like Siri, Alexa and so on.
Natural Language Processing
Natural Language Processing (NLP) refers to the science of drawing insights from natural human
language in order to communicate with machines and grow businesses.
Twitter uses NLP to filter out terroristic language in their tweets, Amazon uses NLP to understand
customer reviews and improve user experience.
4
Robotics
Robotics is a branch of Artificial Intelligence which focuses on different branches and application of
robots. AI Robots are artificial agents acting in a real-world environment to produce results by taking
accountable actions.
Fuzzy Logic
Fuzzy logic is a computing approach based on the principles of “degrees of truth” instead of the usual
modern computer logic i.e. boolean in nature.
Fuzzy logic is used in the medical fields to solve complex problems that involve decision making. They
are also used in automatic gearboxes, vehicle environment control and so on.
Expert Systems
An expert system is an AI-based computer system that learns and reciprocates the decision-making
ability of a human expert.
Expert systems use if-then logical notations to solve complex problems. It does not rely on conventional
procedural programming. Expert systems are mainly used in information management, medical
facilities, loan analysis, virus detection and so on.
6
5. Fuzzy Logic
In the real world, sometimes we face a condition where it is difficult to recognize whether the condition
is true or not, their fuzzy logic gives relevant flexibility for reasoning that leads to inaccuracies and
uncertainties of any condition.
In simpler terms, Fuzzy logic is a technique that represents and modifies uncertain information by
measuring the degree to which the hypothesis is correct. Fuzzy logic is also used for reasoning about
naturally uncertain concepts. Fuzzy logic is convenient and flexible to implement machine learning
techniques and assist in imitating human thought logically.
It is simply the generalization of the standard logic where a concept exhibits a degree of truth between
0.0 to 1.0. If the concept is completely true, standard logic is 1.0 and 0.0 for the completely false
concept. But in fuzzy logic, there is also an intermediate value too which is partially true and partially
false.
6. Natural Language Processing
It is hard from the standpoint of the child, who must spend many years acquiring a language … It is
hard for the adult language learner, it is hard for the scientist who attempts to model the relevant
phenomena, and it is hard for the engineer who attempts to build systems that deal with natural
language input or output. These tasks are so hard that Turing could rightly make fluent conversation
in natural language the centerpiece of his test for intelligence. — Page 248, Mathematical Linguistics,
2010.
In layman words, NLP is the part of computer science and AI that can help in communicating between
computer and human by natural language. It is a technique of computational processing of human
languages. It enables a computer to read and understand data by mimicking human natural language.
NLP is a method that deals in searching, analyzing, understanding and deriving information from the
text form of data. In order to teach computers how to extract meaningful information from the text
data, NLP libraries are used by programmers. A common example of NLP is spam detection, computer
algorithms can check whether an email is a junk or not by looking at the subject of a line, or text of an
email.
Implementing NLP gives various benefits such as;
It improves the accuracy and efficiency of documents.
It has the ability to make automated readable summary text.
It is very advantageous for personal assistants such as Alexa,
It enables organizations to opt chatbots for customer support.
It makes sentiment analysis easier.
Some of the NLP applications are text translation, sentiment analysis, and speech recognition. For
example, Twitter uses NLP technique to filter terroristic language from various tweets, Amazon
implements NLP for interpreting customer reviews and enhancing their experience.
7
Show that “If I look into the sky and I am alert then, I will see a dim star or if I
am not alert then I will not see a dim star” is valid. [6]
Ans : No
OR
Write a FOL of following statements: [6]
i) None of my friends are perfect.
ii) Every student smiles.
iii) Every student walks or talks.
iv) Every student who loves Yash is Happy.
v) Anyone who loves everyone loves himself.
vi) Someone Dance and someone singing.
9
Universal Quantifier:
Universal quantifier is a symbol of logical representation, which specifies that the statement within its
range is true for everything or every instance of a particular thing.
The Universal quantifier is represented by a symbol ∀, which resembles an inverted A.
Note: In universal quantifier we use implication "→".
If x is a variable, then ∀x is read as:
o For all x
o For each x
o For every x.
Example:
All man drink coffee.
Let a variable x which refers to a cat so all x can be represented in UOD as below:
10
A knowledge-based system is a computer program that uses a knowledge base with an inference engine
in order to solve problems that usually require significant specialized human expertise. It embodies the
problem-solving knowledge of a human expert in a narrowly defined domain and it is able to extend
that body of knowledge through its inference engine or query system.
Knowledge-based systems (KBS) are computer programs that utilize artificial intelligence (AI) and a base
of knowledge in order to solve complex problems. KBS is a broad term that encompasses many different
systems, But, no matter the specific system, there are always two key features: a store of knowledge
and a reasoning system. The store of knowledge gives the relevant facts that allow the reasoning system
to ingest new knowledge and make decisions based on the sum of its knowledge. This type of system
often relies on if-then rules, but can also use other systems such as logic programming and constraint
handling rules. Typically, KBS are very focused on certain domains, but can quickly complete analyses
that are within their range.
There are two types of knowledge bases that may be used in a KBS. The knowledge-based system itself
has to do with the system architectures, it knows knowledge explicitly rather than as code to be
processed. Expert systems, on the other hand, refers to systems that can assist or replace a human
expert for complex tasks that generally require an expert knowledge level. Early knowledge based
systems were most often rule based expert systems that relied on human experts to assist in the
analysis, though as AI has expanded, the need for human experts has decreased.
The reasoning system in knowledge-based systems is generally an inference engine. Inference engines
were, in many ways, the precursor to modern personal computing, as they allowed access to expert
knowledge and problem solving. Inference engines provide logical rules based on existing knowledge
bases in order to understand and process new information. These engines can process big data in real
time to allow the most up-to-date information to be easily accessed. Inference engines can be used to
classify data, or to update information as it is processed.
Knowledge based systems include:
Medical diagnosis systems: There are systems, such as Mycin, one of the original KBS, that can
help with disease diagnoses. By inputting information or answering a series of questions, such
programs can identify likely diagnoses (and include a confidence rating around the diagnosis) as
well as make recommendations for treatment plans.
Eligibility analysis systems: By answering guided questions, it is possible to figure out if a person
is eligible for a particular service. When determining eligibility, a system would ask questions
until it receives an answer that is processed as disqualifying, and could then communicate it to
the individual, all without needing the involvement of a third-party person.
Blackboard systems: In comparison with other KBS, a blackboard system relies heavily on
updates from human experts. As part of solving a problem, a diverse group will work together to
find the best solution. As each person works on the problem, they will update the blackboard
with the partial solution, until it is finally completed.
Classification systems: KBS can also be used to analyze different data in order to figure out its
classification status. For example, information could be inputted to determine different chemical
compounds by analyzing their mass spectra and chemical components.
11
Interface engine: An interface engine processes data throughout the system. It acts similarly to a
search engine within the system by locating relevant information based on the requests.
User interface: The user interface is how the knowledge-based system appears to users on the
computer. This allows users to interact with the system and submit requests.
Properties a Good Knowledge Representation System Should Have
To be considered good, a KR system must have the following features:
1. Representational adequacy
It should be able to represent the different kinds of knowledge required.
2. Inferential adequacy
The KR system should be able to come up with new structures or knowledge that it can infer from the
original or existing structures.
3. Inferential efficiency
It should be able to integrate additional mechanisms to existing knowledge structures to direct them
toward promising directions.
4. Acquisitional efficiency
The KR system should be able to gain new knowledge through automated methods instead of relying on
human intervention. However, it should also allow for the injection of information by a knowledge
engineer.
To date, no single KR system has all of these properties.
Factors to Consider When Choosing a Knowledge Representation System
While finding the perfect KR system is not feasible for now, an effective one should have these
characteristics:
Comprehensive
As much as possible, KR systems must be extensive. All aspects that a KR system claims to consider must
be well-represented and easily decipherable.
Computable
KR systems must cover a wide range of standard computing procedures to ensure widespread
application.
Accessible
KR systems must be easily accessible. Each domain or system must have the means to identify events
and decipher how different components react.
Relevant
KR systems must not contain unnecessary details that may only complicate processes.
Transparent
All stakeholders must get an overview of processes and a clear understanding of the events that
surround a KR system’s implementation.
Concise
All KR system outputs must be timely and accurate.
12
Q3) a) Differentiate between supervised and unsupervised learning. [4]
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 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.
The main differences between Supervised and Unsupervised learning are given below:
13
Supervised Learning Unsupervised Learning
Supervised learning algorithms are trained using Unsupervised learning algorithms are trained
labeled data. using unlabeled data.
Supervised learning model takes direct feedback to Unsupervised learning model does not take any
check if it is predicting correct output or not. feedback.
Supervised learning model predicts the output. Unsupervised learning model finds the hidden
patterns in data.
In supervised learning, input data is provided to the In unsupervised learning, only input data is
model along with the output. provided to the model.
The goal of supervised learning is to train the model The goal of unsupervised learning is to find the
so that it can predict the output when it is given hidden patterns and useful insights from the
new data. unknown dataset.
Supervised learning needs supervision to train the Unsupervised learning does not need any
model. supervision to train the model.
Supervised learning can be categorized Unsupervised Learning can be classified
in Classification and Regression problems. in Clustering and Associations problems.
Supervised learning can be used for those cases Unsupervised learning can be used for those
where we know the input as well as corresponding cases where we have only input data and no
outputs. corresponding output data.
Supervised learning model produces an accurate Unsupervised learning model may give less
result. accurate result as compared to supervised
learning.
Supervised learning is not close to true Artificial Unsupervised learning is more close to the true
intelligence as in this, we first train the model for Artificial Intelligence as it learns similarly as a
each data, and then only it can predict the correct child learns daily routine things by his
output. experiences.
It includes various algorithms such as Linear It includes various algorithms such as Clustering,
Regression, Logistic Regression, Support Vector KNN, and Apriori algorithm.
Machine, Multi-class Classification, Decision tree,
Bayesian Logic, etc.
14
b) The values of independent variable x and dependent variable y are
given below.
x 0 1 2 3 4
y 2 3 5 4 6
Find the least square regression line y = ax + b. Estimate the value of
y
when x is 10. [6]
SOL
1. a) We use a table to calculate a and b.
x y xy x2
0 2 0 0
1 3 3 1
2 5 10 4
3 4 12 9
4 6 24 16
2
Σx = 10 Σy = 20 Σx y = 49 Σx = 30
We now calculate a and b using the least square regression formulas for a and b.
a = (nΣx y - ΣxΣy) / (nΣx2 - (Σx)2) = (5*49 - 10*20) / (5*30 - 102) = 0.9
b = (1/n)(Σy - a Σx) = (1/5)(20 - 0.9*10) = 2.2
b) Now that we have the least square regression line y = 0.9 x + 2.2, substitute x by 10 to find the
value of the corresponding y.
y = 0.9 * 10 + 2.2 = 11.2
LEAST SQUARE REGRESSION WITH PROBLEMS FOR REFERENCE
If the plot of n pairs of data (x , y) for an experiment appear to indicate a "linear relationship" between y
and x, then the method of least squares may be used to write a linear relationship between x and y.
The least squares regression line is the line that minimizes the sum of the squares (d1 + d2 + d3 + d4) of
the vertical deviation from each data point to the line (see figure below as an example of 4 points).
Figure 1. Linear regression where the sum of vertical distances d1 + d2 + d3 + d4 between observed and
predicted (line and its equation) values is minimized.
15
The least square regression line for the set of n data points is given by the equation of a line in slope
intercept form:
y=ax+b
where a and b are given by
Figure 2. Formulas for the constants a and b included in the linear regression .
Problem 1
Consider the following set of points: {(-2 , -1) , (1 , 1) , (3 , 2)}
a) Find the least square regression line for the given data points.
b) Plot the given points and the regression line in the same rectangular system of axes.
SOLUTIONS 1) Let us organize the data in a table.
x y xy x2
-2 -1 2 4
1 1 1 1
3 2 6 9
2
Σx = 2 Σy = 2 Σxy = 9 Σx = 14
We now use the above formula to calculate a and b as follows
a = (nΣx y - ΣxΣy) / (nΣx2 - (Σx)2) = (3*9 - 2*2) / (3*14 - 22) = 23/38
b = (1/n)(Σy - a Σx) = (1/3)(2 - (23/38)*2) = 5/19
b) We now graph the regression line given by y = a x + b and the given points.
16
Problem 3
a) Find the least square regression line for the following set of data
{(-1 , 0),(0 , 2),(1 , 4),(2 , 5)}
b) Plot the given points and the regression line in the same rectangular system of axes.
SOLUTIONS
a) We use a table as follows
x y xy x2
-1 0 0 1
0 2 0 0
1 4 4 1
2 5 10 4
2
Σx = 2 Σy = 11 Σx y = 14 Σx = 6
17
Problem 3
The sales of a company (in million dollars) for each year are shown in the table below.
x (year) 2005 2006 2007 2008 2009
y (sales) 12 19 29 37 45
a) Find the least square regression line y = a x + b.
b) Use the least squares regression line as a model to estimate the sales of the company in 2012.
SOLUTIONS
a) We first change the variable x into t such that t = x - 2005 and therefore t represents the number of
years after 2005. Using t instead of x makes the numbers smaller and therefore manageable. The table
of values becomes.
t (years after 2005) 0 1 2 3 4
y (sales) 12 19 29 37 45
We now use the table to calculate a and b included in the least regression line formula.
t y ty t2
0 12 0 0
1 19 19 1
2 29 58 4
3 37 111 9
4 45 180 16
2
Σx = 10 Σy = 142 Σxy = 368 Σx = 30
We now calculate a and b using the least square regression formulas for a and b.
a = (nΣt y - ΣtΣy) / (nΣt2 - (Σt)2) = (5*368 - 10*142) / (5*30 - 102) = 8.4
b = (1/n)(Σy - a Σx) = (1/5)(142 - 8.4*10) = 11.6
b) In 2012, t = 2012 - 2005 = 7
The estimated sales in 2012 are: y = 8.4 * 7 + 11.6 = 70.4 million dollars.
OR
a) To evaluate the performance of trained model confusion matrix
plotted which is given below. [6]
0 1
True label
0 61 3
1 3 104
Predicated label
18
What is a Confusion Matrix?
The million-dollar question – what, after all, is a confusion matrix?
A Confusion matrix is an N x N matrix used for evaluating the performance of a classification model,
where N is the number of target classes. The matrix compares the actual target values with those
predicted by the machine learning model. This gives us a holistic view of how well our classification
model is performing and what kinds of errors it is making.
For a binary classification problem, we would have a 2 x 2 matrix as shown below with 4 values:
Understanding True Positive, True Negative, False Positive and False Negative in a Confusion Matrix
True Positive (TP)
The predicted value matches the actual value
The actual value was positive and the model predicted a positive value
True Negative (TN)
The predicted value matches the actual value
The actual value was negative and the model predicted a negative value
False Positive (FP) – Type 1 error
The predicted value was falsely predicted
The actual value was negative but the model predicted a positive value
Also known as the Type 1 error
False Negative (FN) – Type 2 error
The predicted value was falsely predicted
19
The actual value was positive but the model predicted a negative value
Also known as the Type 2 error
Let me give you an example to better understand this. Suppose we had a classification dataset with
1000 data points. We fit a classifier on it and get the below confusion matrix:
20
The sum of incorrect predictions for a class goes into the expected row for that class value and
the predicted column for that specific class value.
Other Important Terms using a Confusion matrix
Positive Predictive Value(PVV): This is very much near to precision. One significant difference
between the two-term is that PVV considers prevalence. In the situation where the classes are
perfectly balanced, the positive predictive value is the same as precision.
Null Error Rate: This term is used to define how many times your prediction would be wrong if
you can predict the majority class. You can consider it as a baseline metric to compare your
classifier.
F Score: F1 score is a weighted average score of the true positive (recall) and precision.
Roc Curve: Roc curve shows the true positive rates against the false positive rate at various cut
points. It also demonstrates a trade-off between sensitivity (recall and specificity or the true
negative rate).
Precision: The precision metric shows the accuracy of the positive class. It measures how likely
the prediction of the positive class is correct.
The maximum score is 1 when the classifier perfectly classifies all the positive values. Precision alone is
not very helpful because it ignores the negative class. The metric is usually paired with Recall metric.
Recall is also called sensitivity or true positive rate.
Sensitivity: Sensitivity computes the ratio of positive classes correctly detected. This metric gives
how good the model is to recognize a positive class.
21
Computational finance (credit scoring, algorithmic trading)
Computer vision (facial recognition, motion tracking, object detection)
Computational biology (DNA sequencing, brain tumor detection, drug discovery)
Automotive, aerospace, and manufacturing (predictive maintenance)
Natural language processing (voice recognition)
In this topic, we will provide a detailed description of the types of Machine Learning along with their
respective algorithms:
1. Supervised Machine Learning
As its name suggests, Supervised machine learning is based on supervision. It means in the supervised
learning technique, we train the machines using the "labelled" dataset, and based on the training, the
machine predicts the output. Here, the labelled data specifies that some of the inputs are already
mapped to the output. More preciously, we can say; first, we train the machine with the input and
corresponding output, and then we ask the machine to predict the output using the test dataset.
Let's understand supervised learning with an example. Suppose we have an input dataset of cats and
dog images. So, first, we will provide the training to the machine to understand the images, such as
the shape & size of the tail of cat and dog, Shape of eyes, colour, height (dogs are taller, cats are
22
smaller), etc. After completion of training, we input the picture of a cat and ask the machine to identify
the object and predict the output. Now, the machine is well trained, so it will check all the features of
the object, such as height, shape, colour, eyes, ears, tail, etc., and find that it's a cat. So, it will put it in
the Cat category. This is the process of how the machine identifies the objects in Supervised Learning.
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.
Categories of Supervised Machine Learning
Supervised machine learning can be classified into two types of problems, which are given below:
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.
Some popular classification algorithms are given below:
o Random Forest Algorithm
o Decision Tree Algorithm
o Logistic Regression Algorithm
o Support Vector Machine Algorithm
b) Regression
Regression algorithms are used to solve regression problems in which there is a linear relationship
between input and output variables. These are used to predict continuous output variables, such as
market trends, weather prediction, etc.
Some popular Regression algorithms are given below:
o Simple Linear Regression Algorithm
o Multivariate Regression Algorithm
o Decision Tree Algorithm
o Lasso Regression
Advantages and Disadvantages of Supervised Learning
Advantages:
o Since supervised learning work with the labelled dataset so we can have an exact idea about the
classes of objects.
o These algorithms are helpful in predicting the output on the basis of prior experience.
Disadvantages:
o These algorithms are not able to solve complex tasks.
o It may predict the wrong output if the test data is different from the training data.
o It requires lots of computational time to train the algorithm.
Applications of Supervised Learning
Some common applications of Supervised Learning are given below:
23
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.
2. Unsupervised Machine Learning
Unsupervised learning is different from the Supervised learning technique; as its name suggests, there is
no need for supervision. It means, in unsupervised machine learning, the machine is trained using the
unlabeled dataset, and the machine predicts the output without any supervision.
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.
The main aim of the unsupervised learning algorithm is to group or categories the unsorted dataset
according to the similarities, patterns, and differences. Machines are instructed to find the hidden
patterns from the input dataset.
Let's take an example to understand it more preciously; suppose there is a basket of fruit images, and
we input it into the machine learning model. The images are totally unknown to the model, and the task
of the machine is to find the patterns and categories of the objects.
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.
Categories of Unsupervised Machine Learning
Unsupervised Learning can be further classified into two types, which are given below:
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.
Some of the popular clustering algorithms are given below:
o K-Means Clustering algorithm
o Mean-shift algorithm
o DBSCAN Algorithm
o Principal Component Analysis
24
o Independent Component Analysis
2) Association
Association rule learning is an unsupervised learning technique, which finds interesting relations among
variables within a large dataset. The main aim of this learning algorithm is to find the dependency of
one data item on another data item and map those variables accordingly so that it can generate
maximum profit. This algorithm is mainly applied in Market Basket analysis, Web usage mining,
continuous production, etc.
Some popular algorithms of Association rule learning are Apriori Algorithm, Eclat, FP-growth algorithm.
Advantages and Disadvantages of Unsupervised Learning Algorithm
Advantages:
o These algorithms can be used for complicated tasks compared to the supervised ones because
these algorithms work on the unlabeled dataset.
o Unsupervised algorithms are preferable for various tasks as getting the unlabeled dataset is
easier as compared to the labelled dataset.
Disadvantages:
o The output of an unsupervised algorithm can be less accurate as the dataset is not labelled, and
algorithms are not trained with the exact output in prior.
o Working with Unsupervised learning is more difficult as it works with the unlabelled dataset that
does not map with the output.
Applications of Unsupervised Learning
o Network Analysis: Unsupervised learning is used for identifying plagiarism and copyright in
document network analysis of text data for scholarly articles.
o Recommendation Systems: Recommendation systems widely use unsupervised learning
techniques for building recommendation applications for different web applications and e-
commerce websites.
o Anomaly Detection: Anomaly detection is a popular application of unsupervised learning, which
can identify unusual data points within the dataset. It is used to discover fraudulent transactions.
o Singular Value Decomposition: Singular Value Decomposition or SVD is used to extract
particular information from the database. For example, extracting information of each user
located at a particular location.
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.
Although Semi-supervised learning is the middle ground between supervised and unsupervised learning
and operates on the data that consists of a few labels, it mostly consists of unlabeled data. As labels are
costly, but for corporate purposes, they may have few labels. It is completely different from supervised
and unsupervised learning as they are based on the presence & absence of labels.
To overcome the drawbacks of supervised learning and unsupervised learning algorithms, the concept
of Semi-supervised learning is introduced. The main aim of semi-supervised learning is to effectively
use all the available data, rather than only labelled data like in supervised learning. Initially, similar data
is clustered along with an unsupervised learning algorithm, and further, it helps to label the unlabeled
25
data into labelled data. It is because labelled data is a comparatively more expensive acquisition than
unlabeled data.
We can imagine these algorithms with an example. Supervised learning is where a student is under the
supervision of an instructor at home and college. Further, if that student is self-analysing the same
concept without any help from the instructor, it comes under unsupervised learning. Under semi-
supervised learning, the student has to revise himself after analyzing the same concept under the
guidance of an instructor at college.
Advantages and disadvantages of Semi-supervised Learning
Advantages:
o It is simple and easy to understand the algorithm.
o It is highly efficient.
o It is used to solve drawbacks of Supervised and Unsupervised Learning algorithms.
Disadvantages:
o Iterations results may not be stable.
o We cannot apply these algorithms to network-level data.
o Accuracy is low.
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.
In reinforcement learning, there is no labelled data like supervised learning, and agents learn from their
experiences only.
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.
A reinforcement learning problem can be formalized using Markov Decision Process(MDP). In MDP, the
agent constantly interacts with the environment and performs actions; at each action, the environment
responds and generates a new state.
Categories of Reinforcement Learning
Reinforcement learning is categorized mainly into two types of methods/algorithms:
o Positive Reinforcement Learning: Positive reinforcement learning specifies increasing the
tendency that the required behaviour would occur again by adding something. It enhances the
strength of the behaviour of the agent and positively impacts it.
o Negative Reinforcement Learning: Negative reinforcement learning works exactly opposite to
the positive RL. It increases the tendency that the specific behaviour would occur again by
avoiding the negative condition.
26
Real-world Use cases of Reinforcement Learning
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.
Advantages and Disadvantages of Reinforcement Learning
Advantages
o It helps in solving complex real-world problems which are difficult to be solved by general
techniques.
o The learning model of RL is similar to the learning of human beings; hence most accurate results
can be found.
o Helps in achieving long term results.
Disadvantage
o RL algorithms are not preferred for simple problems.
o RL algorithms require huge data and computations.
o Too much reinforcement learning can lead to an overload of states which can weaken the
results.
The curse of dimensionality limits reinforcement learning for real physical systems.
Max Pooling
1. Max pooling is a pooling operation that selects the maximum element from the region of the feature
map covered by the filter. Thus, the output after max-pooling layer would be a feature map
containing the most prominent features of the previous feature map.
Average Pooling
1. Average pooling computes the average of the elements present in the region of feature map
covered by the filter. Thus, while max pooling gives the most prominent feature in a particular patch
of the feature map, average pooling gives the average of features present in a patch.
Global Pooling
1. Global pooling reduces each channel in the feature map to a single value. Thus, an nh x nw x
nc feature map is reduced to 1 x 1 x nc feature map. This is equivalent to using a filter of
dimensions nh x nw i.e. the dimensions of the feature map.
Further, it can be either global max pooling or global average pooling.
Code #3 : Performing Global Pooling using keras
28
b) How ReLU activation function works in CNN? [6]
The ReLU function is f(x)=max(0,x).�(�)=max(0,�). Usually this is applied element-wise to the output
of some other function, such as a matrix-vector product. In MLP usages, rectifier units replace all other
activation functions except perhaps the readout layer. But I suppose you could mix-and-match them if
you'd like.
One way ReLUs improve neural networks is by speeding up training. The gradient computation is very
simple (either 0 or 1 depending on the sign of x�). Also, the computational step of a ReLU is easy: any
negative elements are set to 0.0 -- no exponentials, no multiplication or division operations.
Gradients of logistic and hyperbolic tangent networks are smaller than the positive portion of the ReLU.
This means that the positive portion is updated more rapidly as training progresses. However, this
comes at a cost. The 0 gradient on the left-hand side is has its own problem, called "dead neurons," in
which a gradient update sets the incoming values to a ReLU such that the output is always zero;
modified ReLU units such as ELU (or Leaky ReLU, or PReLU, etc.) can ameliorate this.
Why do we use ReLUs? We use ReLUs for the same reason we use any other non-linear activation
function: To achieve a non-linear transformation of the data.
Why do we need non-linear transformations? We apply non-linear transformations in the hope that
the transformed data will be (close to) linear (for regression) or (close to) linearly separable (for
classification). Drawing a linear function through non-linearly transformed data is equivalent to drawing
a non-linear function through original data.
Why are ReLUs better than other activation functions? They are simple, fast to compute, and don't
suffer from vanishing gradients, like sigmoid functions (logistic, tanh, erf, and similar). The simplicity of
implementation makes them suitable for use on GPUs, which are very common today due to being
optimised for matrix operations (which are also needed for 3D graphics).
Why do we need matrix operations in neural networks?: It's a compact and computationally efficient
way of propagating the signals between the layers (multiplying the output of the previous layer with the
weight matrix).
Isn't softmax activation function for neural networks? Softmax is not really an activation function of a
single neuron, but a way of normalising outputs of multiple neurons. It is usually used in the output
layer, to enforce the sum of outputs to be one, so that they can be interpreted as probabilities.
You could also use it in hidden layers, to enforce the outputs to be in a limited range, but other
approaches, like batch normalisation, are better suited for that purpose.
29
In deep learning, a computer model learns to perform classification tasks directly
from images, text, or sound. Deep learning models can achieve state-of-the-art
accuracy, sometimes exceeding human-level performance. Models are trained by
using a large set of labeled data and neural network architectures that contain many
layers.
Automated Driving: Automotive researchers are using deep learning to automatically detect
objects such as stop signs and traffic lights. In addition, deep learning is used to detect
pedestrians, which helps decrease accidents.
Aerospace and Defense: Deep learning is used to identify objects from satellites that locate areas
of interest, and identify safe or unsafe zones for troops.
Medical Research: Cancer researchers are using deep learning to automatically detect cancer
cells. Teams at UCLA built an advanced microscope that yields a high-dimensional data set used
to train a deep learning application to accurately identify cancer cells.
Industrial Automation: Deep learning is helping to improve worker safety around heavy
machinery by automatically detecting when people or objects are within an unsafe distance of
machines.
Electronics: Deep learning is being used in automated hearing and speech translation. For
example, home assistance devices that respond to your voice and know your preferences are
powered by deep learning applications.
30
magnifying them 20X or 40X. The deep CNN models then demarcate various cellular features within the
sample and detect carcinogenic elements.
2. Personalized Marketing
Personalized marketing is a concept that has seen much action in the recent few years. Marketers are
now aiming their advertising campaigns at the pain points of individual consumers, offering them
exactly what they need. And Deep Learning is playing a significant role in this.
Today, consumers are generating a lot of data thanks to their engagement with social media platforms,
IoT devices, web browsers, wearables and the ilk. However, most of the data generated from these
sources are disparate (text, audio, video, location data, etc.).
To cope with this, businesses use customisable Deep Learning models to interpret data from different
sources and distil them to extract valuable customer insights. They then use this information to predict
consumer behaviour and target their marketing efforts more efficiently.
So now you understand how those online shopping sites know what products to recommend to you.
3. Financial Fraud Detection
Virtually no sector is exempt from the evil called “fraudulent transactions” or “financial fraud”.
However, it is the financial corporations (banks, insurance firms, etc.) that have to bear the brunt of this
menace the most. Not a day goes by when criminals attack financial institutions. There are a plethora of
ways to usurp financial resources from them.
Thus, for these organizations, detecting and predicting financial fraud is critical, to say the least. And
this is where Deep Learning comes into the picture.
Financial organizations are now using the concept of anomaly detection to flag inappropriate
transactions. They employ deep learning algorithms, such as logistic regression (credit card fraud
detection is a prime use case), decision trees, random forest, etc., to analyze the patterns common to
valid transactions. Then, these models are put into action to flag financial transactions that seem
potentially fraudulent.
Some examples of fraud detection being deterred by Deep Learning include:
identity theft
insurance fraud
investment fraud
fund misappropriation
4. Natural Language Processing
NLP or Natural Language Processing is another prominent area where Deep Learning is showing
promising results.
Natural Language Processing, as the name suggests, is all about enabling machines to analyze and
understand human language. The premise sounds simple, right? Well, the thing is, human language is
punishingly complex for machines to interpret. It is not just the alphabet and words but also the
context, the accents, the handwriting and whatnot that discourage machines from processing or
generating human language accurately.
Deep Learning-based NLP is doing away with many of the issues related to understanding human
language by training machines (Autoencoders and Distributed Representation) to produce appropriate
responses to linguistic inputs.
One such example is the personal assistants we use on our smartphones. These applications come
embedded with Deep Learning imbued NLP models to understand human speech and return
31
appropriate output. It is, thus, no wonder why Siri and Alexa sound so much like how people talk in real
life.
Another use case of Deep Learning-based NLP is how websites written in one human language
automatically get translated to the user-specified language.
5. Autonomous Vehicles
The concept of building automated or self-governing vehicles goes back 45 years when the Tsukuba
Mechanical Engineering Laboratory unveiled the world’s first semi-automatic car. The car, a
technological marvel then, carried a pair of cameras and an analogue computer to steer itself on a
specially designed street.
However, it wasn’t until 1989 when ALVINN (Autonomous Land Vehicle in a Neural Network), a
modified military ambulance, used neural networks to navigate by itself on roads.
Since then, deep learning and autonomous vehicles have enjoyed a strong bond, with the former
enhancing the latter’s performance exponentially.
Autonomous vehicles use cameras, sensors – LiDARs, RADARs, motion sensors – and external
information such as geo-mapping to perceive their environment and collect relevant data. They use this
equipment both individually and in tandem for documenting the data.
This data is then fed to deep learning algorithms that direct the vehicle to perform appropriate actions
such as
accelerating, steering and braking
identifying or planning routes
traversing the traffic
detecting pedestrians and other vehicles at a distance as well as in proximity
recognising traffic signs
Deep learning is playing a huge role in realizing the perceived motives of self-driving vehicles of reducing
road accidents, helping the disabled drive, eliminating traffic jams, etc.
And although still in nascent stages, the day is not far when we will see deep learning-powered vehicles
form a majority of the road traffic.
6. Fake News Detection
The concept of spreading fake news to tip the scales in one’s favour is not old. However, due to the
explosive popularity of the internet, and social media platforms, in particular, fake news has become
ubiquitous.
Fake news, apart from misinforming the citizens, can be used to alter political campaigns, vilify certain
situations and individuals, and commit other similar morally illegible acts. As such, curbing any and all
fake news becomes a priority.
Deep Learning proposes a way to deal with the menace of fake news by using complex language
detection techniques to classify fraudulent news sources. This method essentially works by gathering
information from trusty sources and juxtaposing them against a piece of news to verify its validity.
This paper explains how a combination of Convolutional Neural Networks (CNNs) and Recurrent Neural
Networks (RNNs) can validate digital news with high accuracy.
7. Facial Recognition
Facial Recognition is the technological method of identifying individuals from images and videos by
documenting their faces. It uses advanced biometric technology to record a person’s face and match it
against a database to extract their identity.
32
Facial Recognition is an old technology, first conceptualized in the 1960s. However, it is the integration
of neural networks in facial recognition that exponentially increased its detection accuracy.
Deep Learning enforced Facial Recognition works by recording face embeddings and using a trained
model to map them against a huge database of millions of images.
For instance, DeepFace is a facial recognition method that uses Deep Learning (hence the name) to
identify persons with a recorded 97% accuracy rate. It uses a nine-layer neural network for its purpose
and has been trained using four million images of about 4000 individuals.
8. Recommendation Systems
Have you ever stopped to think about how Spotify knows which genres you listen to or, how Netflix
recommends shows that match your preferences exactly? The short answer is Deep Learning. And the
long answer, well, it is still deep learning but with some added explanation.
As discussed earlier, Deep Learning models process user data acquired from different sources and
compile them to extract consumer info. This information then goes into deep learning-based
recommender systems to generate appropriate suggestions for the users.
Deep Learning empowered suggestions, although widely used by audio/video streaming services, are
not just limited to them. Social media networks use similar systems to recommend relevant posts,
videos, accounts and more to users in their feeds.
9. Smart Agriculture
Artificial Intelligence and its subsets are fortifying a lot of industries and sectors, and agriculture is no
different.
Of late, smart farming has become an active agricultural movement to improve upon the various
aspects of traditional agriculture. Farmers are now using IoT devices, satellite-based soil-composition
detection, GPS, remote sensing, etc., to monitor and enhance their farming methods.
Deep Learning algorithms capture and analyse agriculture data from the above sources to improve crop
health and soil health, predict the weather, detect diseases, etc.
Deep learning also finds uses in the field of crop genomics. Experts use neural networks to determine
the genetic makeup of different crop plants and use it for purposes like
increasing resilience to natural phenomena and diseases
increase crop yield per unit area
breeding high-quality hybrids
10. Space Travel
For most of us, space travel is something we associate with the most advanced technology available to
humankind. We think of humanoid robots, hyper-intelligent AIs, hi-tech equipment, etc., working
relentlessly in space to assist the astronauts in their painstaking endeavours.
However, while most of this stuff is over-the-top, it does signal one aspect of space flight – that it is
technologically demanding.
Scientists and engineers need to implement the latest and most efficient technologies – both hardware
and software – to ensure the safety, integrity and success of space missions.
Thus, it goes without saying that AI, Machine Learning and Deep Learning are crucial components of
everything astronomy.
For instance, ESA states that Deep Learning can be (and is, to some extent) used in
automating the landing of rockets
building space flight systems that can make intelligent decisions without human intervention
33
b) Why we need Back propagation? Explain Back propagation
Algorithm.[6]
Backpropagation is the essence of neural network training. It is the method of fine-tuning the weights
of a neural network based on the error rate obtained in the previous epoch (i.e., iteration). Proper
tuning of the weights allows you to reduce error rates and make the model reliable by increasing its
generalization.
Backpropagation in neural network is a short form for “backward propagation of errors.” It is a standard
method of training artificial neural networks. This method helps calculate the gradient of a loss function
with respect to all the weights in the network.
Why We Need Backpropagation?
Most prominent advantages of Backpropagation are:
Backpropagation is fast, simple and easy to program
It has no parameters to tune apart from the numbers of input
It is a flexible method as it does not require prior knowledge about the network
It is a standard method that generally works well
It does not need any special mention of the features of the function to be learned.
What is a Feed Forward Network?
A feedforward neural network is an artificial neural network where the nodes never form a cycle. This
kind of neural network has an input layer, hidden layers, and an output layer. It is the first and simplest
type of artificial neural network.
Types of Backpropagation Networks
Two Types of Backpropagation Networks are:
Static Back-propagation
Recurrent Backpropagation
Static back-propagation:
It is one kind of backpropagation network which produces a mapping of a static input for static output.
It is useful to solve static classification issues like optical character recognition.
Recurrent Backpropagation:
Recurrent Back propagation in data mining is fed forward until a fixed value is achieved. After that, the
error is computed and propagated backward.
The main difference between both of these methods is: that the mapping is rapid in static back-
propagation while it is nonstatic in recurrent backpropagation.
Backpropagation Key Points
Simplifies the network structure by elements weighted links that have the least effect on the
trained network
You need to study a group of input and activation values to develop the relationship between
the input and hidden unit layers.
It helps to assess the impact that a given input variable has on a network output. The knowledge
gained from this analysis should be represented in rules.
Backpropagation is especially useful for deep neural networks working on error-prone projects,
such as image or speech recognition.
34
Backpropagation takes advantage of the chain and power rules allows backpropagation to
function with any number of outputs.
Backpropagation Algorithm Works
The Back propagation algorithm in neural network computes the gradient of the loss function for a
single weight by the chain rule. It efficiently computes one layer at a time, unlike a native direct
computation. It computes the gradient, but it does not define how the gradient is used. It generalizes
the computation in the delta rule.
Consider the following Back propagation neural network example diagram to understand:
How
Backpropagation Algorithm Works
1. Inputs X, arrive through the preconnected path
2. Input is modeled using real weights W. The weights are usually randomly selected.
3. Calculate the output for every neuron from the input layer, to the hidden layers, to the output
layer.
4. Calculate the error in the outputs
ErrorB= Actual Output – Desired Output
5. Travel back from the output layer to the hidden layer to adjust the weights such that the error is
decreased.
Keep repeating the process until the desired output is achieved
35
Q5) Write a short notes on [10]
Application of AI.
Artificial Intelligence has various applications in today's society. It is becoming essential for today's time
because it can solve complex problems with an efficient way in multiple industries, such as Healthcare,
entertainment, finance, education, etc. AI is making our daily life more comfortable and fast.
Following are some sectors which have the application of Artificial Intelligence:
1. AI in Astronomy
o Artificial Intelligence can be very useful to solve complex universe problems. AI technology can
be helpful for understanding the universe such as how it works, origin, etc.
2. AI in Healthcare
o In the last, five to ten years, AI becoming more advantageous for the healthcare industry and
going to have a significant impact on this industry.
o Healthcare Industries are applying AI to make a better and faster diagnosis than humans. AI can
help doctors with diagnoses and can inform when patients are worsening so that medical help
can reach to the patient before hospitalization.
3. AI in Gaming
o AI can be used for gaming purpose. The AI machines can play strategic games like chess, where
the machine needs to think of a large number of possible places.
4. AI in Finance
o AI and finance industries are the best matches for each other. The finance industry is
implementing automation, chatbot, adaptive intelligence, algorithm trading, and machine
learning into financial processes.
36
5. AI in Data Security
o The security of data is crucial for every company and cyber-attacks are growing very rapidly in
the digital world. AI can be used to make your data more safe and secure. Some examples such
as AEG bot, AI2 Platform,are used to determine software bug and cyber-attacks in a better way.
6. AI in Social Media
o Social Media sites such as Facebook, Twitter, and Snapchat contain billions of user profiles,
which need to be stored and managed in a very efficient way. AI can organize and manage
massive amounts of data. AI can analyze lots of data to identify the latest trends, hashtag, and
requirement of different users.
7. AI in Travel & Transport
o AI is becoming highly demanding for travel industries. AI is capable of doing various travel
related works such as from making travel arrangement to suggesting the hotels, flights, and best
routes to the customers. Travel industries are using AI-powered chatbots which can make
human-like interaction with customers for better and fast response.
8. AI in Automotive Industry
o Some Automotive industries are using AI to provide virtual assistant to their user for better
performance. Such as Tesla has introduced TeslaBot, an intelligent virtual assistant.
o Various Industries are currently working for developing self-driven cars which can make your
journey more safe and secure.
9. AI in Robotics:
o Artificial Intelligence has a remarkable role in Robotics. Usually, general robots are programmed
such that they can perform some repetitive task, but with the help of AI, we can create
intelligent robots which can perform tasks with their own experiences without pre-programmed.
o Humanoid Robots are best examples for AI in robotics, recently the intelligent Humanoid robot
named as Erica and Sophia has been developed which can talk and behave like humans.
10. AI in Entertainment
o We are currently using some AI based applications in our daily life with some entertainment
services such as Netflix or Amazon. With the help of ML/AI algorithms, these services show the
recommendations for programs or shows.
11. AI in Agriculture
o Agriculture is an area which requires various resources, labor, money, and time for best result.
Now a day's agriculture is becoming digital, and AI is emerging in this field. Agriculture is
applying AI as agriculture robotics, solid and crop monitoring, predictive analysis. AI in
agriculture can be very helpful for farmers.
12. AI in E-commerce
o AI is providing a competitive edge to the e-commerce industry, and it is becoming more
demanding in the e-commerce business. AI is helping shoppers to discover associated products
with recommended size, color, or even brand.
13. AI in education:
o AI can automate grading so that the tutor can have more time to teach. AI chatbot can
communicate with students as a teaching assistant.
o AI in the future can be work as a personal virtual tutor for students, which will be accessible
easily at any time and any place.
37
LSTM
LSTM stands for long short-term memory networks, used in the field of Deep Learning. It is a variety
of recurrent neural networks (RNNs) that are capable of learning long-term dependencies, especially in
sequence prediction problems. LSTM has feedback connections, i.e., it is capable of processing the
entire sequence of data, apart from single data points such as images. This finds application in speech
recognition, machine translation, etc. LSTM is a special kind of RNN, which shows outstanding
performance on a large variety of problems.
The Logic Behind LSTM
The central role of an LSTM model is held by a memory cell known as a ‘cell state’ that maintains its
state over time. The cell state is the horizontal line that runs through the top of the below diagram. It
can be visualized as a conveyor belt through which information just flows, unchanged.
Information can be added to or removed from the cell state in LSTM and is regulated by gates. These
gates optionally let the information flow in and out of the cell. It contains a pointwise multiplication
operation and a sigmoid neural net layer that assist the mechanism.
The sigmoid layer gives out numbers between zero and one, where zero means ‘nothing should be let
through,’ and one means ‘everything should be let through.’
LSTM vs RNN
Consider, you have the task of modifying certain information in a calendar. To do this, an RNN
completely changes the existing data by applying a function. Whereas, LSTM makes small modifications
on the data by simple addition or multiplication that flow through cell states. This is how LSTM forgets
and remembers things selectively, which makes it an improvement over RNNs.
38
Now consider, you want to process data with periodic patterns in it, such as predicting the sales of
colored powder that peaks at the time of Holi in India. A good strategy is to look back at the sales
records of the previous year. So, you need to know what data needs to be forgotten and what needs to
be stored for later reference. Else, you need to have a really good memory. Recurrent neural
networks seem to be doing a good job at this, theoretically. However, they have two downsides,
exploding gradient and vanishing gradient, that make them redundant.
Here, LSTM introduces memory units, called cell states, to solve this problem. The designed cells may be
seen as differentiable memory.
Process Automation
Artificial intelligence can play a major role in automating processes within a business that were
previously conducted by human beings. Both digital and physical tasks can be included under this umbrella,
with back-office administration and financial activities particularly prominent.
Robotic process automation technologies enable machines to act much as a human being would when
inputting and consuming information from IT systems. This means that machines can cover some of the
technological donkey work within an office setting, freeing up employees to engage in more edifying, fulfilling,
and productive work.
Underlining just how sophisticated such systems already are, NASA has recently launched a pilot of robotic
process automation in its accounts payable, IT spending and invoicing, and human resources departments. It
is expected that AI will play a big role in these areas in future businesses.
Cognitive Insight
Algorithms are central to the artificial intelligence experience, and this second key business usage of AI
certainly takes advantage of this technology. Cognitive insight uses algorithms in order to examine data and
detect patterns, providing critical analysis for businesses. This is proving increasingly valuable in a culture in
which vast amounts of big data is being produced.
Such machine learning can be used in order to predict what customers are likely to purchase, identify fraud in
real-time, and target consumers with digital adverts. This can be done in a far more sophisticated, intuitive,
and accurate fashion than traditional analytics, thanks to the rapid calculation of computers, coupled with their
new learning capabilities.
40
General Electric has already utilized cognitive insight in order to integrate its supplier data, while Deloitte is
similarly using this technique in order to extract important terms from contracts. As understanding of the
potential of AI in cognitive insight increases, so will the number of companies using this technology.
Cognitive Engagement
Another key area in which AI is already assisting businesses is in directly engaging with customers. Cognitive
engagement is possible via chatbots, intelligent agents, and machine learning, and many companies are
already taking advantage of this technology for customer service purposes.
Intelligence can also be utilized in this area in order to interact with internal stakeholders, and it is arguably
more effective in this arena. Companies such as The Vanguard Group are piloting intelligent agents that
assist customer service staff with answering frequently answered questions. A key innovation in this area is
the avatar Amelia, developed to play a major supportive role for help-desks, in various businesses across the
globe.
One example of a company that has decided to take matters into its own hands and assist others with
implementing such systems is Napal Innovation. They specialize in ascertaining whether AI would bring an
improvement to your company, and if so, how to best implement it, through several series of consultations.
Their technology experts accompany you on all your technological endeavors, whether it is a Big Data PoC,
an MVP for a fintech, or the operation and support of your business application.
As artificial intelligence technology becomes more sophisticated, it seems certain that it will be used in a
cognitive engagement capacity with both internal and external human resources.
NLP
Natural language processing (NLP) refers to the branch of computer science—and more
specifically, the branch of artificial intelligence or AI—concerned with giving computers the ability
to understand text and spoken words in much the same way human beings can.
NLP drives computer programs that translate text from one language to another, respond to
spoken commands, and summarize large volumes of text rapidly—even in real time. There’s a
good chance you’ve interacted with NLP in the form of voice-operated GPS systems, digital
assistants, speech-to-text dictation software, customer service chatbots, and other consumer
conveniences. But NLP also plays a growing role in enterprise solutions that help streamline
business operations, increase employee productivity, and simplify mission-critical business
processes.
Several NLP tasks break down human text and voice data in ways that help the computer make
sense of what it's ingesting. Some of these tasks include the following:
Speech recognition, also called speech-to-text, is the task of reliably converting voice data into
text data. Speech recognition is required for any application that follows voice commands or
answers spoken questions. What makes speech recognition especially challenging is the way
people talk—quickly, slurring words together, with varying emphasis and intonation, in different
accents, and often using incorrect grammar.
Part of speech tagging, also called grammatical tagging, is the process of determining the part of
speech of a particular word or piece of text based on its use and context. Part of speech identifies
‘make’ as a verb in ‘I can make a paper plane,’ and as a noun in ‘What make of car do you own?’
41
Word sense disambiguation is the selection of the meaning of a word with multiple
meanings through a process of semantic analysis that determine the word that makes the most
sense in the given context. For example, word sense disambiguation helps distinguish the meaning
of the verb 'make' in ‘make the grade’ (achieve) vs. ‘make a bet’ (place).
Named entity recognition, or NEM, identifies words or phrases as useful entities. NEM
identifies ‘Kentucky’ as a location or ‘Fred’ as a man's name.
Co-reference resolution is the task of identifying if and when two words refer to the same entity.
The most common example is determining the person or object to which a certain pronoun refers
(e.g., ‘she’ = ‘Mary’), but it can also involve identifying a metaphor or an idiom in the text (e.g.,
an instance in which 'bear' isn't an animal but a large hairy person).
Sentiment analysis attempts to extract subjective qualities—attitudes, emotions, sarcasm,
confusion, suspicion—from text.
Natural language generation is sometimes described as the opposite of speech recognition or
speech-to-text; it's the task of putting structured information into human language.
Limitations of AI.
Disadvantages of Artificial Intelligence
1. High Costs
The ability to create a machine that can simulate human intelligence is no small feat. It requires plenty
of time and resources and can cost a huge deal of money. AI also needs to operate on the latest
hardware and software to stay updated and meet the latest requirements, thus making it quite costly.
2. No creativity
A big disadvantage of AI is that it cannot learn to think outside the box. AI is capable of learning over
time with pre-fed data and past experiences, but cannot be creative in its approach. A classic example is
the bot Quill who can write Forbes earning reports. These reports only contain data and facts already
provided to the bot. Although it is impressive that a bot can write an article on its own, it lacks the
human touch present in other Forbes articles.
3. Unemployment
One application of artificial intelligence is a robot, which is displacing occupations and increasing
unemployment (in a few cases). Therefore, some claim that there is always a chance of unemployment
as a result of chatbots and robots replacing humans.
For instance, robots are frequently utilized to replace human resources in manufacturing businesses in
some more technologically advanced nations like Japan. This is not always the case, though, as it creates
additional opportunities for humans to work while also replacing humans in order to increase efficiency.
4. Make Humans Lazy
AI applications automate the majority of tedious and repetitive tasks. Since we do not have to
memorize things or solve puzzles to get the job done, we tend to use our brains less and less. This
addiction to AI can cause problems to future generations.
5. No Ethics
Ethics and morality are important human features that can be difficult to incorporate into an AI. The
rapid progress of AI has raised a number of concerns that one day, AI will grow uncontrollably, and
eventually wipe out humanity. This moment is referred to as the AI singularity.
6. Emotionless
Since early childhood, we have been taught that neither computers nor other machines have feelings.
Humans function as a team, and team management is essential for achieving goals. However, there is
42
no denying that robots are superior to humans when functioning effectively, but it is also true that
human connections, which form the basis of teams, cannot be replaced by computers.
7. No Improvement
Humans cannot develop artificial intelligence because it is a technology based on pre-loaded facts and
experience. AI is proficient at repeatedly carrying out the same task, but if we want any adjustments or
improvements, we must manually alter the codes. AI cannot be accessed and utilized akin to human
intelligence, but it can store infinite data.
Machines can only complete tasks they have been developed or programmed for; if they are asked to
complete anything else, they frequently fail or provide useless results, which can have significant
negative effects. Thus, we are unable to make anything conventional.
Linear Regression.
Linear regression is one of the easiest and most popular Machine Learning algorithms. It is a statistical
method that is used for predictive analysis. Linear regression makes predictions for continuous/real or
numeric variables such as sales, salary, age, product price, etc.
Linear regression algorithm shows a linear relationship between a dependent (y) and one or more
independent (y) variables, hence called as linear regression. Since linear regression shows the linear
relationship, which means it finds how the value of the dependent variable is changing according to the
value of the independent variable.
The linear regression model provides a sloped straight line representing the relationship between the
variables. Consider the below image:
43
Y= Dependent Variable (Target Variable)
X= Independent Variable (predictor Variable)
a0= intercept of the line (Gives an additional degree of freedom)
a1 = Linear regression coefficient (scale factor to each input value).
ε = random error
The values for x and y variables are training datasets for Linear Regression model representation.
Types of Linear Regression
Linear regression can be further divided into two types of the algorithm:
o Simple Linear Regression:
If a single independent variable is used to predict the value of a numerical dependent variable,
then such a Linear Regression algorithm is called Simple Linear Regression.
o Multiple Linear regression:
If more than one independent variable is used to predict the value of a numerical dependent
variable, then such a Linear Regression algorithm is called Multiple Linear Regression.
44
Data center.
A data center is a facility that centralizes an organization’s shared IT operations and equipment for the
purposes of storing, processing, and disseminating data and applications. Because they house an
organization's most critical and proprietary assets, data centers are vital to the continuity of daily
operations. Consequently, the security and reliability of data centers and their information are among
any organization’s top priorities.
In the past, data centers were highly controlled physical infrastructures, but the public cloud has since
changed that model. Except where regulatory restrictions require an on-premises data center without
internet connections, most modern data center infrastructures have evolved from on-premises physical
servers to virtualized infrastructure that supports applications and workloads across multi-cloud
environments.
The Role of the Data Center
Data centers are an integral part of the enterprise, designed to support business applications and
provide services such as:
Data storage, management, backup and recovery
Productivity applications, such as email
High-volume e-commerce transactions
Powering online gaming communities
Big data, machine learning and artificial intelligence
Core Components of a Data Center
Data center architectures and requirements can differ significantly. For example, a data center built for
a cloud service provider like Amazon satisfies facility, infrastructure and security requirements that
significantly differ from a completely private data center, such as one built for a government facility that
is dedicated to securing classified data.
Regardless of classification, an effective data center operation is achieved through a balanced
investment in the facility and the equipment it houses. In addition, since data centers often house an
organization's business-critical data and applications, it's essential that both facility and equipment are
secured against intruders and cyberattacks.
The primary elements of a data center break down as follows:
Facility – the usable space available for IT equipment. Providing round-the-clock access to
information makes data centers some of the world’s most energy-consuming facilities. Design to
optimize space and environmental control to keep equipment within specific
temperature/humidity ranges are both emphasized.
Core components – equipment and software for IT operations and storage of data and
applications. These may include storage systems; servers; network infrastructure, such as
switches and routers; and various information security elements, such as firewalls.
Support infrastructure – equipment contributing to securely sustaining the highest availability
possible. The Uptime Institute has defined four tiers of data centers, with availability ranging
from 99.671% to 99.995%. Some components for supporting infrastructure include:
o Uninterruptible Power Sources (UPS) – battery banks, generators and redundant power
sources.
o Environmental control – computer room air conditioners (CRAC); heating, ventilation
and air conditioning (HVAC) systems; and exhaust systems.
o Physical security systems – biometrics and video surveillance systems.
Operations staff – personnel available to monitor operations and maintain IT and infrastructure
equipment around the clock.
45
Chat bot.
A chatbot is a computer program that uses artificial intelligence (AI) and natural language
processing (NLP) to understand customer questions and automate responses to them, simulating
human conversation.
Chatbots can make it easy for users to find the information they need by responding to their questions
and requests—through text input, audio input, or both—without the need for human intervention.
Chatbot technology is almost everywhere these days, from the smart speakers at home to messaging
applications in the workplace. The latest AI chatbots are often referred to as “virtual assistants” or
“virtual agents.” They can use audio input, such as Apple's Siri, Google Assistant and Amazon Alexa, or
interact with you via SMS text messaging. Either way, you’re able to ask questions about what you need
in a conversational way, and the chatbot can help refine your search through responses and follow-up
questions.
How chatbots work
Historically, chatbots were text-based, and programmed to reply to a limited set of simple queries with
answers that had been pre-written by the chatbot’s developers. They operated like an interactive FAQ,
and while they worked well for those specific questions and answers on which they had been trained,
they failed when presented with a complex question or one that hadn’t been predicted by the
developers.
Over time, chatbots have integrated more rules and natural language processing, so end users can
experience them in a conversational way. In fact, the latest types of chatbots are contextually aware
and able to learn as they’re exposed to more and more human language.
Today’s AI chatbots use natural language understanding (NLU) to discern the user’s need. Then they use
advanced AI tools to determine what the user is trying to accomplish. These technologies rely
on machine learning and deep learning—elements of AI, with some nuanced differences—to develop an
increasingly granular knowledge base of questions and responses that are based on user interactions.
This improves their ability to predict user needs accurately and respond correctly over time.
For example, if a user asks about tomorrow's weather, a traditional chatbot can respond plainly
whether it will rain. An AI chatbot, however, might also inquire if the user wants to set an earlier alarm
to adjust for the longer morning commute (due to rain).
46