Shayak
Shayak
Shayak
Name-Shayak Ray
Roll-18731120003
Stream-Computer Science and Business System
Subject-Machine Learning
Subject code-ESC CSBS 502
Introduction
Neural networks reflect the behaviour of the human brain, allowing computer programs to
recognize patterns and solve common problems in the fields of AI, machine learning, and
deep learning.
Neural networks, also known as artificial neural networks (ANNs) or simulated neural networks
(SNNs), are a subset of machine learning and are at the heart of deep learning algorithms. Their name
and structure are inspired by the human brain, mimicking the way that biological neurons signal to
one another.
Artificial neural networks (ANNs) are comprised of a node layers, containing an input layer,
one or more hidden layers, and an output layer. Each node, or artificial neuron, connects to
another and has an associated weight and threshold. If the output of any individual node is
above the specified threshold value, that node is activated, sending data to the next layer of
the network. Otherwise, no data is passed along to the next layer of the network.
Neural networks rely on training data to learn and improve their accuracy over time.
However, once these learning algorithms are fine-tuned for accuracy, they are powerful tools
in computer science and artificial intelligence, allowing us to classify and cluster data at a
high velocity. Tasks in speech recognition or image recognition can take minutes versus
hours when compared to the manual identification by human experts. One of the most well-
known neural networks is Google’s search algorithm.
Neural networks are just one of many tools and approaches used in machine learning
algorithms. The neural network itself may be used as a piece in many different machine
learning algorithms to process complex data inputs into a space that computers can
understand. Neural networks are being applied to many real-life problems today, including
speech and image recognition, spam email filtering, finance, and medical diagnosis, to name
a few.
How do neural networks work?
Think of each individual node as its own linear regression model, composed of input data,
weights, a bias (or threshold), and an output. The formula would look something like this:
Mathematical formula used to determine summation
Once an input layer is determined, weights are assigned. These weights help determine the
importance of any given variable, with larger ones contributing more significantly to the
output compared to other inputs. All inputs are then multiplied by their respective weights
and then summed. Afterward, the output is passed through an activation function, which
determines the output. If that output exceeds a given threshold, it “fires” (or activates) the
node, passing data to the next layer in the network. This results in the output of one node
becoming in the input of the next node. This process of passing data from one layer to the
next layer defines this neural network as a feedforward network.
Let’s break down what one single node might look like using binary values. We can apply
this concept to a more tangible example, like whether you should go surfing (Yes: 1, No: 0).
The decision to go or not to go is our predicted outcome, or y-hat. Let’s assume that there are
three factors influencing your decision-making:
Are the waves good? (Yes: 1, No: 0)
Is the line-up empty? (Yes: 1, No: 0)
Has there been a recent shark attack? (Yes: 0, No: 1)
Then, let’s assume the following, giving us the following inputs:
X1 = 1, since the waves are pumping
X2 = 0, since the crowds are out
X3 = 1, since there hasn’t been a recent shark attack
Now, we need to assign some weights to determine importance. Larger weights signify that
particular variables are of greater importance to the decision or outcome.
W1 = 5, since large swells don’t come around often
W2 = 2, since you’re used to the crowds
W3 = 4, since you have a fear of sharks
Finally, we’ll also assume a threshold value of 3, which would translate to a bias value of –3.
With all the various inputs, we can start to plug in values into the formula to get the desired
output. Y-hat = (1*5) + (0*2) + (1*4) – 3 = 6
If we use the activation function from the beginning of this section, we can determine that the
output of this node would be 1, since 6 is greater than 0. In this instance, you would go
surfing; but if we adjust the weights or the threshold, we can achieve different outcomes from
the model. When we observe one decision, like in the above example, we can see how a
neural network could make increasingly complex decisions depending on the output of
previous decisions or layers.
In the example above, we used perceptrons to illustrate some of the mathematics at play here,
but neural networks leverage sigmoid neurons, which are distinguished by having values
between 0 and 1. Since neural networks behave similarly to decision trees, cascading data
from one node to another, having x values between 0 and 1 will reduce the impact of any
given change of a single variable on the output of any given node, and subsequently, the
output of the neural network.
As we start to think about more practical use cases for neural networks, like image
recognition or classification, we’ll leverage supervised learning, or labeled datasets, to train
the algorithm. As we train the model, we’ll want to evaluate its accuracy using a cost (or loss)
function. This is also commonly referred to as the mean squared error (MSE). In the equation
below, i represents the index of the sample, y-hat is the predicted outcome, y is the actual
value, and m is the number of samples. Mathematical formula used to determine cost function
2
Ultimately, the goal is to minimize our cost function to ensure correctness of fit for any given
observation. As the model adjusts its weights and bias, it uses the cost function and
reinforcement learning to reach the point of convergence, or the local minimum. The process
in which the algorithm adjusts its weights is through gradient descent, allowing the model to
determine the direction to take to reduce errors (or minimize the cost function). With each
training example, the parameters of the model adjust to gradually converge at the minimum.
Most deep neural networks are feedforward, meaning they flow in one direction only, from
input to output. However, you can also train your model through backpropagation; that is,
move in the opposite direction from output to input. Backpropagation allows us to calculate
and attribute the error associated with each neuron, allowing us to adjust and fit the
parameters of the model(s) appropriately.
How neural networks learn :-
Typically, an ANN is initially trained or fed large amounts of data. Training consists of
providing input and telling the network what the output should be. For example, to build a
network that identifies the faces of actors, the initial training might be a series of pictures,
including actors, non-actors, masks, statuary and animal faces. Each input is accompanied by
the matching identification, such as actors' names or "not actor" or "not human" information.
Providing the answers allows the model to adjust its internal weightings to learn how to do its
job better.
Types of Neural Network:- Neural networks are sometimes described in terms of their
depth, including how many layers they have between input and output, or the model's so-
called hidden layers. This is why the term neural network is used almost synonymously with
deep learning. They can also be described by the number of hidden nodes the model has or in
terms of how many inputs and outputs each node has . The types are as follows:-
1. Feed-forward neural networks: one of the simplest variants of neural networks. They
pass information in one direction, through various input nodes, until it makes it to the
output node .
2. Recurrent neural networks: more complex. They save the output of processing nodes
and feed the result back into the model. This is how the model is said to learn to
predict the outcome of a layer.
3. Convolutional neural networks: one of the most popular models used today. This
neural network computational model uses a variation of multilayer perceptron’s and
contains one or more convolutional layers that can be either entirely connected or
pooled.
4. Deconvolutional neural networks: utilize a reversed CNN model process. They aim to
find lost features or signals that may have originally been considered unimportant to
the CNN system's task.
5. Modular neural networks: contain multiple neural networks working separately from
one another. The networks do not communicate or interfere with each other's
activities during the computation process.
Parallel processing abilities mean the network can perform more than one job at a
time.
The ability to learn and model nonlinear, complex relationships helps model the
real-life relationships between input and output.
Fault tolerance means the corruption of one or more cells of the ANN will not
stop the generation of output.
Disadvantages of artificial neural networks
The disadvantages of ANNs include:
1)The lack of rules for determining the proper network structure means the
appropriate artificial neural network architecture can only be found through trial
and error and experience.
2)The requirement of processors with parallel processing abilities makes neural
networks hardware-dependent
Conclusion
These are just a few specific areas to which neural networks are being applied
today. Prime uses involve any process that operates according to strict rules or
patterns and has large amounts of data. If the data involved is too large for a
human to make sense of in a reasonable amount of time, the process is likely a
prime candidate for automation through artificial neural networks.
References
2) Techtarget