0% found this document useful (0 votes)
6 views

ai-unit4

The document provides an overview of Natural Language Processing (NLP), its components, advantages, disadvantages, and applications, as well as a detailed explanation of Expert Systems, including their architecture, characteristics, and development process. It covers key concepts such as Natural Language Understanding (NLU), Natural Language Generation (NLG), and various NLP tasks like sentiment analysis and machine translation. Additionally, it discusses the phases of NLP, syntactic processing, and the roles of experts and knowledge engineers in creating expert systems.

Uploaded by

murali.dtn2017
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

ai-unit4

The document provides an overview of Natural Language Processing (NLP), its components, advantages, disadvantages, and applications, as well as a detailed explanation of Expert Systems, including their architecture, characteristics, and development process. It covers key concepts such as Natural Language Understanding (NLU), Natural Language Generation (NLG), and various NLP tasks like sentiment analysis and machine translation. Additionally, it discusses the phases of NLP, syntactic processing, and the roles of experts and knowledge engineers in creating expert systems.

Uploaded by

murali.dtn2017
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 36

Natural Language Processing: Introduction, Syntactic Processing,

Semantic Analysis,

Discourse and Pragmatic Processing; Expert Systems: Architecture


and role of expert systems, two case studies of Expert Systems;

Introduction to Machine learning: Supervised learning, unsupervised


learning, reinforcement learning;

Neural Networks: Introduction,basics of NN, Deep Learning with


basics of CNN, RNN, LSTM and their applications.

What is NLP?

NLP stands for Natural Language Processing, which is a part


of Computer Science, Human language, and Artificial
Intelligence. It is the technology that is used by machines to
understand, analyse, manipulate, and interpret human's languages. It
helps developers to organize knowledge for performing tasks such
as translation, automatic summarization, Named Entity
Recognition (NER), speech recognition, relationship
extraction, and topic segmentation.

In the beginning of the year 1990s, NLP started growing faster and
achieved good process accuracy, especially in English Grammar. In
1990 also, an electronic text introduced, which provided a good
resource for training and examining natural language programs. Other
factors may include the availability of computers with fast CPUs and
more memory. The major factor behind the advancement of natural
language processing was the Internet.

Now, modern NLP consists of various applications, like speech


recognition, machine translation, and machine text reading. When
we combine all these applications then it allows the artificial
intelligence to gain knowledge of the world. Let's consider the
example of AMAZON ALEXA, using this robot you can ask the
question to Alexa, and it will reply to you.
Advantages of NLP

o NLP helps users to ask questions about any subject and get a
direct response within seconds.
o NLP offers exact answers to the question means it does not offer
unnecessary and unwanted information.
o NLP helps computers to communicate with humans in their
languages.
o It is very time efficient.
o Most of the companies use NLP to improve the efficiency of
documentation processes, accuracy of documentation, and
identify the information from large databases.

Disadvantages of NLP

A list of disadvantages of NLP is given below:

o NLP may not show context.


o NLP is unpredictable
o NLP may require more keystrokes.
o NLP is unable to adapt to the new domain, and it has a limited
function that's why NLP is built for a single and specific task
only.

Components of NLP

There are the following two components of NLP -


1. Natural Language Understanding (NLU)

Natural Language Understanding (NLU) helps the machine to


understand and analyse human language by extracting the metadata
from content such as concepts, entities, keywords, emotion, relations,
and semantic roles.

NLU mainly used in Business applications to understand the


customer's problem in both spoken and written language.

NLU involves the following tasks -

o It is used to map the given input into useful representation.


o It is used to analyze different aspects of the language.

2. Natural Language Generation (NLG)

Natural Language Generation (NLG) acts as a translator that converts


the computerized data into natural language representation. It mainly
involves Text planning, Sentence planning, and Text Realization.

Note: The NLU is difficult than NLG.

Difference between NLU and NLG

NLU NLG

NLU is the process of reading and NLG is the process of writing or


interpreting language. generating language.
It produces non-linguistic outputs from It produces constructing natural
natural language inputs. language outputs from non-linguistic
inputs.

Applications of NLP
There are the following applications of NLP -

1. Question Answering
Question Answering focuses on building systems that automatically
answer the questions asked by humans in a natural language.

2. Spam Detection

Spam detection is used to detect unwanted e-mails getting to a user's


inbox.

3. Sentiment Analysis

Sentiment Analysis is also known as opinion mining. It is used on the


web to analyse the attitude, behaviour, and emotional state of the
sender. This application is implemented through a combination of
NLP (Natural Language Processing) and statistics by assigning the
values to the text (positive, negative, or natural), identify the mood of
the context (happy, sad, angry, etc.)

4. Machine Translation
Machine translation is used to translate text or speech from one
natural language to another natural language.

Example: Google Translator

5. Spelling correction:Microsoft Corporation provides word


processor software like MS-word, PowerPoint for the spelling
correction.

6. Speech Recognition

Speech recognition is used for converting spoken words into text. It is


used in applications, such as mobile, home automation, video
recovery, dictating to Microsoft Word, voice biometrics, voice user
interface, and so on.

7. Chatbot

Implementing the Chatbot is one of the important applications of


NLP. It is used by many companies to provide the customer's chat
services.

8. Information extraction

Information extraction is one of the most important applications of


NLP. It is used for extracting structured information from
unstructured or semi-structured machine-readable documents.

9. Natural Language Understanding (NLU)


It converts a large set of text into more formal representations such as
first-order logic structures that are easier for the computer programs to
manipulate notations of the natural language processing.

Phases of NLP
There are the following five phases of NLP:

1. Lexical Analysis and Morphological

The first phase of NLP is the Lexical Analysis. This phase scans the
source code as a stream of characters and converts it into meaningful
lexemes. It divides the whole text into paragraphs, sentences, and
words.

2. Syntactic Analysis (Parsing)

Syntactic Analysis is used to check grammar, word arrangements, and


shows the relationship among the words.

Example: Agra goes to the Poonam


In the real world, Agra goes to the Poonam, does not make any sense,
so this sentence is rejected by the Syntactic analyzer.

3. Semantic Analysis

Semantic analysis is concerned with the meaning representation. It


mainly focuses on the literal meaning of words, phrases, and
sentences.

4. Discourse Integration

Discourse Integration depends upon the sentences that proceeds it and


also invokes the meaning of the sentences that follow it.

5. Pragmatic Analysis

Pragmatic is the fifth and last phase of NLP. It helps you to discover
the intended effect by applying a set of rules that characterize
cooperative dialogues.

For Example: "Open the door" is interpreted as a request instead of


an order.

Syntactic Processing
Syntactic processing is the process of analyzing the grammatical
structure of a sentence to understand its meaning. This involves
identifying the different parts of speech in a sentence, such as nouns,
verbs, adjectives, and adverbs, and how they relate to each other in
order to give proper meaning to the sentence.
Syntactic processing, is to understand the roles played by each of the
words in the sentence, and the relationship among words and to parse
the grammatical structure of sentences to understand the proper
meaning of the sentence.
How Does Syntactic Processing Work?
To understand the working of syntactic processing, lets again start
with an example.
For example, consider the sentence “The cat sat on the mat.”
Syntactic processing would involve identifying important components
in the sentence such as “cat” as a noun, “sat” as a verb, “on” as
a preposition, and “mat” as a noun. It would also involve
understanding that “cat” is the subject of the sentence and “mat” is
the object.

Syntactic processing involves a series of steps, including tokenization,


part-of-speech tagging, parsing, and semantic analysis.

Tokenization is the process of breaking up a sentence into individual


words or tokens. Part-of-speech (PoS) tagging involves identifying
the part of speech of each token. Parsing is the process of analysing
the grammatical structure of a sentence, including identifying the
subject, verb, and object. The semantic analysis involves
understanding the meaning of the sentence in context.
There are several different techniques used in syntactic processing,
including rule-based methods, statistical methods, and machine
learning algorithms. Each technique has its own strengths and
weaknesses, and the choice of technique depends on the specific task
and the available data.
Why Is Syntactic Processing Important in NLP?
Syntactic processing is a crucial component of many NLP tasks,
including machine translation, sentiment analysis, and question-
answering. Without accurate syntactic processing, it is difficult for
computers to understand the underlying meaning of human language.
Syntactic processing also plays an important role in text generation,
such as in chatbots or automated content creation. By understanding
the grammatical structure of a sentence, computers can generate more
natural and fluent textual content.

Expert System
An expert system is a computer program that is designed to solve
complex problems and to provide decision-making ability like a
human expert. It performs this by extracting knowledge from its
knowledge base using the reasoning and inference rules according to
the user queries.
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.
The performance of an expert system is based on the expert's
knowledge stored in its knowledge base. The more knowledge stored
in the KB, the more that system improves its performance. One of the
common examples of an ES is a suggestion of spelling errors while
typing in the Google search box.
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.
Below are some popular examples of the Expert System:
o DENDRAL: It was an artificial intelligence project that was
made as a chemical analysis expert system. It was used in
organic chemistry to detect unknown organic molecules with the
help of their mass spectra and knowledge base of chemistry.
o MYCIN: It was one of the earliest backward chaining expert
systems that was designed to find the bacteria causing infections
like bacteraemia and meningitis. It was also used for the
recommendation of antibiotics and the diagnosis of blood
clotting diseases.
o PXDES: It is an expert system that is used to determine the type
and level of lung cancer. To determine the disease, it takes a
picture from the upper body, which looks like the shadow. This
shadow identifies the type and degree of harm.
o CaDeT: The CaDet expert system is a diagnostic support
system that can detect cancer at early stages.
Characteristics of Expert System
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.
Components of Expert System
An expert system mainly consists of three components:
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.
2. Inference Engine(Rules of Engine)
o The inference engine is known as the brain of the expert system
as it is the main processing unit of the system. It applies
inference rules to the knowledge base to derive a conclusion or
deduce new information. It helps in deriving an error-free
solution of queries asked by the user.
o With the help of an inference engine, the system extracts the
knowledge from the knowledge base.
o There are two types of inference engine:
o Deterministic Inference engine: The conclusions drawn from
this type of inference engine are assumed to be true. It is based
on facts and rules.
o Probabilistic Inference engine: This type of inference engine
contains uncertainty in conclusions, and based on the
probability.
Inference engine uses the below modes to derive the solutions:
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.
Components of Knowledge Base
o Factual Knowledge: The knowledge which is based on facts
and accepted by knowledge engineers comes under factual
knowledge.
o Heuristic Knowledge: This knowledge is based on practice, the
ability to guess, evaluation, and experiences.
Knowledge Representation: It is used to formalize the knowledge
stored in the knowledge base using the If-else rules.
Knowledge Acquisitions: It is the process of extracting, organizing,
and structuring the domain knowledge, specifying the rules to acquire
the knowledge from various experts, and store that knowledge into the
knowledge base.
Development of Expert System
Here, we will explain the working of an expert system by taking a
case study of MYCIN ES. Below are some steps to build an
MYCIN:
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.

Participants in the development of Expert System


There are three primary participants in the building of Expert System:
1. Expert: The success of an ES much depends on the knowledge
provided by human experts. These experts are those persons
who are specialized in that specific domain.
2. Knowledge Engineer: Knowledge engineer is the person who
gathers the knowledge from the domain experts and then
codifies that knowledge to the system according to the
formalism.
3. End-User: This is a particular person or a group of people who
may not be experts, and working on the expert system needs the
solution or advice for his queries, which are complex.
Why Expert System?
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.

Capabilities of the Expert System


Below are some capabilities of an Expert System:
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.
Advantages of Expert System
o These systems are highly reproducible.
o They can be used for risky places where the human presence is
not safe.
o Error possibilities are less if the KB contains correct knowledge.
o The performance of these systems remains steady as it is not
affected by emotions, tension, or fatigue.
o They provide a very high speed to respond to a particular query.

Limitations of Expert System


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.
Applications of Expert System
o In designing and manufacturing domain
It can be broadly used for designing and manufacturing physical
devices such as camera lenses and automobiles.
o In the knowledge domain
These systems are primarily used for publishing the relevant
knowledge to the users. The two popular ES used for this
domain is an advisor and a tax advisor.
o In the finance domain
In the finance industries, it is used to detect any type of possible
fraud, suspicious activity, and advise bankers that if they should
provide loans for business or not.
o In the diagnosis and troubleshooting of devices
In medical diagnosis, the ES system is used, and it was the first
area where these systems were used.
o Planning and Scheduling
The expert systems can also be used for planning and scheduling
some particular tasks for achieving the goal of that task.

Machine Learning
In the real world, we are surrounded by humans who can learn
everything from their experiences with their learning capability, and
we have computers or machines which work on our instructions. But
can a machine also learn from experiences or past data like a human
does? So here comes the role of Machine Learning.

Introduction to Machine Learning


A subset of artificial intelligence known as machine learning focuses
primarily on the creation of algorithms that enable a computer to
independently learn from data and previous experiences.
Arthur Samuel first used the term "machine learning" in 1959. It
could be summarized as follows:
Without being explicitly programmed, machine learning enables
a machine to automatically learn from data, improve
performance from experiences, and predict things.
Machine learning algorithms create a mathematical model that,
without being explicitly programmed, aids in making predictions
or decisions with the assistance of sample historical data, or
training data.
For the purpose of developing predictive models, machine learning
brings together statistics and computer science. Algorithms that learn
from historical data are either constructed or utilized in machine
learning. The performance will rise in proportion to the quantity of
information we provide.
A machine can learn if it can gain more data to improve its
performance.
How does Machine Learning work?
A machine learning system builds prediction models, learns from
previous data, and predicts the output of new data whenever it
receives it. The amount of data helps to build a better model that
accurately predicts the output, which in turn affects the accuracy of
the predicted output.
Let's say we have a complex problem in which we need to make
predictions. Instead of writing code, we just need to feed the data to
generic algorithms, which build the logic based on the data and
predict the output. Our perspective on the issue has changed as a
result of machine learning. The Machine Learning algorithm's
operation is depicted in the following block diagram:
Features of Machine Learning:
o Machine learning uses data to detect various patterns in a given
dataset.
o It can learn from past data and improve automatically.
o It is a data-driven technology.
o Machine learning is much similar to data mining as it also deals
with the huge amount of the data.
Need for Machine Learning
The demand for machine learning is steadily rising. Because it is able
to perform tasks that are too complex for a person to directly
implement, machine learning is required. Humans are constrained by
our inability to manually access vast amounts of data; as a result, we
require computer systems, which is where machine learning comes in
to simplify our lives.
By providing them with a large amount of data and allowing them to
automatically explore the data, build models, and predict the required
output, we can train machine learning algorithms. The cost function
can be used to determine the amount of data and the machine learning
algorithm's performance. We can save both time and money by using
machine learning.
The significance of AI can be handily perceived by its utilization's
cases, Presently, AI is utilized in self-driving vehicles, digital
misrepresentation identification, face acknowledgment, and
companion idea by Facebook, and so on. Different top organizations,
for example, Netflix and Amazon have constructed AI models that are
utilizing an immense measure of information to examine the client
interest and suggest item likewise

.Following are some key points which show the importance of


Machine Learning:
o Rapid increment in the production of data
o Solving complex problems, which are difficult for a human
o Decision making in various sector including finance
o Finding hidden patterns and extracting useful information from
data.
These ML algorithms help to solve different business problems like
Regression, Classification, Forecasting, Clustering, and Associations,
etc.
Based on the methods and way of learning, machine learning is
divided into mainly four types, which are:
1. Supervised Machine Learning
2. Unsupervised Machine Learning
3. Semi-Supervised Machine Learning
4. Reinforcement Learning
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 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:
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
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 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.
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.
o

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 weak

Neural Networks
Neural Networks are computational models that mimic the complex
functions of the human brain. The neural networks consist of
interconnected nodes or neurons that process and learn from data,
enabling tasks such as pattern recognition and decision making in
machine learning.
OR
A neural network is a software solution that leverages machine
learning (ML) algorithms to ‘mimic’ the operations of a human brain.
Neural networks process data more efficiently and feature improved
pattern recognition and problem-solving capabilities when compared
to traditional computers. Neural networks are also known as artificial
neural networks (ANNs) or simulated neural networks (SNNs).
Neural networks are a subtype of machine learning and an essential
element of deep learning algorithms. Just like its functionality, the
architecture of a neural network is also based on the human brain. Its
highly interlinked structure allows it to imitate the signalling
processes of biological neurons

How does Neural Networks work?


Let’s understand with an example of how a neural network works:
Consider a neural network for email classification. The input layer
takes features like email content, sender information, and subject.
These inputs, multiplied by adjusted weights, pass through hidden
layers. The network, through training, learns to recognize patterns
indicating whether an email is spam or not. The output layer, with a
binary activation function, predicts whether the email is spam (1) or
not (0). As the network iteratively refines its weights through
backpropagation, it becomes adept at distinguishing between spam
and legitimate emails, showcasing the practicality of neural networks
in real-world applications like email filtering.
Working of a Neural Network
Neural networks are complex systems that mimic some features of the
functioning of the human brain. It is composed of an input layer, one
or more hidden layers, and an output layer made up of layers of
artificial neurons that are coupled. The two stages of the basic process
are called backpropagation and forward propagation.

The Architecture of a Neural Network.

The architecture of a neural network comprises node layers that are


distributed across an input layer, single or multiple hidden layers, and
an output layer. Nodes are ‘artificial neurons’ linked to each other and
are associated with a particular weight and threshold. Once the output
of a single node crosses its specified threshold, that particular node is
activated, and its data is transmitted to the next layer in the network.
If the threshold value of the node is not crossed, data is not transferred
to the next network layer.
Unlike traditional computers, which process data sequentially, neural
networks can learn and multitask. In other words, while conventional
computers only follow the instructions of their programming, neural
networks continuously evolve through advanced algorithms. It can be
said that neural computers ‘program themselves’ to derive solutions to
previously unseen problems.
Additionally, traditional computers operate using logic functions
based on a specific set of calculations and rules. Conversely, neural
computers can process logic functions and raw inputs such as images,
videos, and voice.
While traditional computers are ready to go out of the box, neural
networks must be ‘trained’ over time to increase their accuracy and
efficiency. Fine-tuning these learning machines for accuracy pays rich
dividends, giving users a powerful computing tool in artificial
intelligence (AI) and computer science applications.
Neural networks are capable of classifying and clustering data at high
speeds. This means, among other things, that they can complete the
recognition of speech and images within minutes instead of the hours
that it would take when carried out by human experts. The most
commonly used neural network today is Google search algorithms.

Deep Neural Networks (DNNs)


Deep Neural Networks (DNNs) are typically Feed
Forward Networks (FFNNs) in which data flows from
the input layer to the output layer without going
backward³ and the links between the layers are one way
which is in the forward direction and they never touch a
node again.
The outputs are obtained by supervised learning with
datasets of some information based on ‘what we want’
through back propagation.

Like you go to a restaurant and the chef gives you an idea


about the ingredients of your meal. FFNNs work in the
same way as you will have the flavor of those specific
ingredients while eating but just after finishing your meal
you will forget what you have eaten. If the chef gives you
the meal of same ingredients again you can’t recognize the
ingredients, you have to start from scratch as you don’t
have any memory of that. But the human brain doesn’t
work like that.

Recurrent Neural Network (RNN)


A Recurrent Neural Network (RNN) addresses this
issue which is a FFNN with a time twist. This neural
network isn’t stateless, has connections between passes
and connections through time. They are a class of artificial
neural network where connections between nodes form
a directed graph along a sequence like features links from
a layer to previous layers, allowing information to flow
back into the previous parts of the network thus each
model in the layers depends on past events, allowing
information to persist.

In this way, RNNs can use their internal state (memory) to


process sequences of inputs. This makes them applicable
to tasks such as unsegmented, connected handwriting
recognition or speech recognition. But they not only work
on the information you feed but also on the related
information from the past which means whatever you feed
and train the network matters, like feeding it ‘chicken’
then ‘egg’ may give different output in comparison to ‘egg’
then ‘chicken’. RNNs also have problems like vanishing
(or exploding) gradient/long-term dependency problem
where information rapidly gets lost over time. Actually, it’s
the weight which gets lost when it reaches a value of 0 or
1 000 000, not the neuron. But in this case, the previous
state won’t be very informative as it’s the weight which
stores the information from the past.

Long Short Term Memory (LSTM)


Thankfully, breakthroughs like Long Short Term
Memory (LSTM) don’t have this problem! LSTMs are a
special kind of RNN, capable of learning long-term
dependencies which make RNN smart at remembering
things that have happened in the past and finding patterns
across time to make its next guesses make
sense. LSTMs broke records for improved Machine
Translation, Language Modeling and Multilingual
Language Processing.

Convolutional Neural Network (CNN)


Convolutional Neural Network (CNN, or ConvNet)
is a class of deep neural networks which is most commonly
applied to analyzing visual imagery. Their other
applications include video understanding, speech
recognition and understanding natural language
processing.
LSTM combined with Convolutional Neural Networks
(CNNs) improved automatic image captioning like those
are seen in Facebook. Thus you can see that RNN is more
like helping us in data processing predicting our next step
whereas CNN helps us in visuals analyzing.

You might also like