Machine Learning With Artificial Neural Networks
Machine Learning With Artificial Neural Networks
Machine Learning With Artificial Neural Networks
With
Neural Networks
Anuj Saxena
Software Consultant
Knoldus Software LLP
Knolx Etiquettes
1) Respect Knolx session timings, you are requested not to
join sessions after a 5 minutes threshold post the session
start time
2) Make sure to submit a constructive feedback for all
sessions as it is very helpful for the presenter
3) Keep your mobile devices in silent mode, feel free to
move out of session in case you need to attend an urgent
call
4) Avoid unwanted chit chat during the session
Artificial Intelligence: Brief History
Agenda
• Machine Learning – what and why?
• ANN - Introduction
• Activation Function
• Train & Error
• Gradient Descent
• Importance of layers
• Back propogation
• Cons
• Demo
SKYNET
Machine learning
● Machine learning is the subfield of computer
science that gives computers the ability to
learn without being programmed.
Machine Learning techniques
● Decision tree
● Random Forests
● K means Clustering
● Naive Bayes Classifier
● Artificial Neural Networks
Artificial Neural
Network
How the brain works
At granular level
perceptron
What is perceptron
● A perceptron is an artificial unit that mimics a
biological neuron.
● Using multiple perceptrons we create an
Artificial Neural Network.
● In an ANN, each single unit in every layer
(except input layer) is a perceptron.
Perceptron
A simple neural network
A bit simpler
Self Drive Car: ALVINN
● Stands for Autonomous Land Vehicle
In a Neural Network
● Steering a vehicle
● Taking input from
a 30X32 sensor
● Hence, 30X32 units
in input layer
● These inputs are provided
to our neural net and the
output tells us which neuron
to fire from all output neurons
(where each neuron defines
a direction)
Activation Function
● The activation function is the last step of
processing in a perceptron.
● It takes the summation of multiplication of the
inputs and their corrosponding weights
Need for activation
• Consider the following
• Drawbacks:
• Can work wrong if using more that two classes (if more than one neuron outputs
activated)
• Multiple layer not supported
Linear Function
● Y = c * (summation + bias)
where summation = sum(input*weight)
● A linear function in form of
y = mx
● Not binary in nature
● Drawbacks
– Unbounded
– Can not use multiple layers with this too
Sigmoid
● Looks smooth
● Like step function
● Most widely used
● Benefits
– Nonlinear
– Bounded values
Sigmoid contd.
● As we are working in bounded outputs, our activation
functions have a range(0, 1)
i.e. our activations are bounded
● Although bounded but not binary in nature
● i.e. we can take the max ( or softmax) in case of more than
one neurons activated.
● As it is non linear in nature hence we can use mutiple layers to
effectively.
What is bias?
● The main function of a bias is to provide every node with a
trainable constant value (in addition to the normal inputs
that the node receives)
● Lets consider a simple network with 1 input and 1 output
● Error = -Y
● Gradient