Introduction to Deep Learning
How is conventional programming different from Machine Learning?
Before that what is conventional programming?
Write a program in C++ to print the n Fibonacci numbers? That’s it !!! Right!!!
Your code is the algorithm. Right? YES!!!
You have written the code(algorithm) by yourself.
Input(N=5) →Algorithm(code) → Output(0 1 1 2 3 )
Here, you give input to the Algorithm which you have made.
Yes!!!That’s Programming which you are good at. Right?Ok.
Machine Learning
How about computer write the algorithm for you? Interested? YES!!!
But How ???
Give computer some sample inputs and sample outputs so that it writes the algorithm(function which maps input and output) for you. WOW!!!
Train the computer to first build the function(algorithm) for you.
Sample Input and Output → Computer → Function(algorithm)
Use the function Later for Prediction!!!
New input →Function → Output
DONE!!!
NEURAL NETWORK
So, computers have built the functions!!!
YES!!! There are many algorithms written by scientists around the world to make the computers do that!!!
One such algorithm is NEURAL NETWORK!!!
Training
Sample input and output →Neural Network → Function(Trained Neural Network)
Prediction
New input → Function(Trained Neural Network) → Output
What is a Neural Network? How is it trained ?
We have been saying that our aim is to build f(x).
What is f(x)?
Function which maps input and output.
y=f(x)
f(x)= g(Wx+b)
W-Weights,
b-bias,
x-input
y-output
g-activation function
We give sample x and y so that W and b is learned(W=0.1,b=0.2) or f(x) is trained.
Now, give x some new values(Prediction)
y=f(x=3) =g(0.1*3+0.2)
This is what is happening in a Neural Network.
w1 to w8 are the weights.
b1 and b2 are the bias.
Each circle represents a neuron where g(Wx+b) is computed.
i1 , i2 are inputs
o1, o2 are the outputs.
DEEP NEURAL NETWORK
What changes is the complexity.
Number of neurons and the layers in between input and output layers(Hidden Layers) increases.