Neural Networks
Neural Networks
Introduction
Neural networks form a base of deep learning, a subfield of
machine learning where algorithms are inspired by the
structure of the human brain. Neural networks take input
data ,train themselves to recognize the patterns in this data
and then predict the output for a new set of similar data.
Why do we use Neural Networks?
Neural networks are a series of algorithms used to recognize hidden
patterns in raw data , cluster and classify it, continuously learn and
improve. They are used in a variety of applications in stock markets, sales
and marketing trends, risk assessment and fraud detection.
To summarize the need to use neural networks:
It can extract data features automatically without the input from the
developer.
It is fast and efficient way to solve problems with large datasets, such as
images.
It is essentially a system of machine learning algorithms to perform
certain tasks.
The larger neural networks tend to perform better with larger amounts
of data whereas the traditional machine learning algorithm stops
improving after a certain saturation point.
Applications of Neural Networks
Facial Recognition: Cameras on smart phones these days
can estimate the age of the person based on their facial
features. First differentiating the face from the background
and then correlating the lines and spots on your face to a
possible age.
For example: Facebook uses facial recognition powered by
artificial neural networks to suggest to you whom you should
tag in the post.
Applications of Neural Networks
Forecasting: Neural networks are trained to understand the
patterns and detect the possibility of rainfall or rise in stock
prices with high accuracy.
Music Composition: Neural networks can even learn
patterns in music and train themselves enough to compose
fresh tunes.
Online shopping: Amazon shows you recommendations
depending on the behaviour of the individual interests ,
Amazon makes use of Artificial Neural Networks(ANN)to
train its algorithms to learn the pattern and behaviour of its
users.
Advantages of Neural Network
Some of the advantages of neural networks are as follows:
Parallel processing capability: Artificial neural networks
is a very powerful system that can perform more than one
job at the same time.
Data is stored on the entire network: Since the data is
available on the entire network so if any node is down or
unavailable the whole system will not stop working.
Capable of learning from non-linear and complex
data: The input can be complex and non-linear for ANN to
use it to generate the desired output.
AI models
There are mainly three types of AI models that are Regression,
Classification and Clustering.
Regression : It is an example of rule based AI models.In regression,
the algorithm generates a mapping function from the given data, as
shown by the solid line in the given graph.
The blue dots shown in the graph are the data values and the solid line
here represents the mapping done for them. With the help of this
mapping function, we can predict the future data. It works on
continuous data.
Regression
Example: Suppose we want to do weather forecasting, so
for this, we will use the Regression algorithm. In weather
prediction, the model is trained on the past data, and once
the training is completed, it can easily predict the weather for
future days.
Classification
It is rule based AI model.
It is a systematic grouping of observations in categories, something like
categorising plants, animals in different taxonomies by biologists.
In classification you teach the machine to perform with labelled data.
The algorithm is able to determine which set a given point belongs to by
means of a classification function represented by the dotted line.
Example:The best example to understand the Classification problem is
Email Spam Detection. The model is trained on the basis of millions of
emails on different parameters, and whenever it receives a new email, it
identifies whether the email is spam or not. If the email is spam, then it
is moved to the Spam folder.
In this problem statement, the target variables are discrete.
Clustering
Clustering is a machine learning approach where the
machine partitions the dataset into different clusters or
categories based on machine generated algorithms.
The data fed to such a model is usually unlabelled or random
and thus developer feeds in the data directly into the machine
and instructs it to build its own algorithm.
The machine then forms a pattern or cluster based on the
training data and groups those that follows the same pattern.
The best clustering is the one which minimizes the error.
Clustering works on discrete dataset.
Human Nervous System
The human nervous system is made up of a
complex network of specialised nerve cells known
as Neurons.
Neurons are the building blocks of the
nervous system and are responsible for
communicating messages throughout the
body.
A neuron is made up of a cell body, an axon
and dendrites. The cell body has genetic
information, maintains the neuron’s
structure, and provides energy during the
transmission of signals.
An Axon is an elongated structure which joins the cell body.
Dendrites are fibrous roots that branch out from the cell body.
Synapse: During the transmission the nerve impulse travels in the form of electrical
signals from the axon of one neuron to another neuron through a joint called Synapse.
The dendrites of another neuron receives an impulse which travels through the cell
body and performs an activation function on the impulse received and then gives it to
the output axon which passes the same to the next neuron in the system.
Relation between the NEURAL
NETWORK AND NERVOUS SYSTEM
Just like the human brain where all neurons are
interconnected to one another, Artificial neural networks also
have a large number of artificial neurons(nodes) that are
interconnected to one another in a sequence of layers of the
networks.
Just like dendrites in human brain perform the functionality,
similarly , the artificial neurons(nodes) take input data and
perform simple operations on the data. The result of these
operations is passed to other artificial neurons(nodes) which
are arranged in a sequence of layers.
Neural network is divided into different layers and each layer is
divided into a block that accomplish its own task and then passes
to the next layer.
The first layer of neural network is known as input layer that
acquires the data and feed it to the neural network. Some hidden
layers are there which are not visible but all processing occurs in
these layers.
These hidden layers have its own machine learning algorithm
which is executes on the data received from the input layer. Then
the processed output is fed to subsequent hidden layer. Similarly,
at the last hidden layer passes the final processed data to the
output layer.
Supervised Learning
Consider yourself as a student sitting in a classroom wherein your teacher is supervising you, “how
you can solve the problem” or “whether you are doing correctly or not”. Likewise, in Supervised
Learning input is provided as a labelled dataset, a model can learn from it to provide the result of the
problem easily.
Supervised Learning deals with two types of problem- classification problems and regression
problems.
It's used in Risk Evaluation and Forecast Sales.
Unsupervised Learning
This learning algorithm is completely opposite to Supervised Learning. In short, there is no complete and clean
labelled dataset in unsupervised learning. Unsupervised learning is self-organized learning. Its main aim is to
explore the underlying patterns and predicts the output. Here we basically provide the machine with data and ask to
look for hidden features and cluster the data in a way that makes sense.
It is used in recommendation system and anomaly detection.
Example: Suppose the unsupervised learning algorithm is given an input dataset containing images of
different types of cats and dogs. The algorithm is never trained upon the given dataset, which means it does
not have any idea about the features of the dataset. The task of the unsupervised learning algorithm is to
identify the image features on their own. Unsupervised learning algorithm will perform this task by clustering
the image dataset into the groups according to similarities between images.
Reinforcement Learning
It is used in Self Driving Cars, Gaming and Healthcare.
The above image shows the robot, diamond, and fire. The goal of the robot is to get the reward that is the
diamond and avoid the hurdles that are fired. The robot learns by trying all the possible paths and then
choosing the path which gives him the reward with the least hurdles. Each right step will give the robot a reward
and each wrong step will subtract the reward of the robot. The total reward will be calculated when it reaches
the final reward that is the diamond.
• Reinforcement learning is all about making decisions sequentially. In simple words, we can say that the
output depends on the state of the current input and the next input depends on the output of the previous
input