Artificial intelligence (AI) is a branch of computer science capable of performing tasks that typically require human intelligence.
What is Deep Learning?
deep learning is a more approachable name for an artificial neural network. The “deep” in deep learning refers to the depth of the network. An artificial neural network can be very shallow.
Machine learning is the science of getting computers to act without being explicitly programmed.
ANN: Artificial Neural Networks
ANNs are inspired by biological neurons found in cerebral cortex of our brain.
A neuron or nerve cell is an electrically excitable cell that communicates with other cells via specialized connections called synapses.
ANNs are core of deep learning. Hence one of the most important topic to understand.
Perceptron
A Perceptron is one of the simplese ANN architectures, invented in 1957 by Frank Rosenblatt.
A perceptron works similar to a biological neuron. A biological neuron receives electrical signals from its dendriles, modulates the electrical signals in various amounts, and then fires an output signal through its synapses only when the total strength of the input signals exceeds a certain threshold. The output is then fed to another neuron, and so forth.
To model the biological phenomenon, the artificial neuron performs two consecutive functions: it calculates the weighted sum of the inputs to represent the totgal strength of the input signals, and it applies a step function to the result to determine whether to fire the ourput 1 if the signal exceeds a certain threshold of 0 if the signal doesn’t exceed the threshold.
How Peceptron Works?
The perceptron’s learning logic goes like this:
The neuron calculate the weighted sum and applies the activation function to make a prediction y^. This is called the feedforward process:
It compares the output prediction with the correct label to calculate the error:
\[error = y-y\hat{}\]
It then update the weight. If the prediction is too high, it adjust the weight to make a lower prediction the next time, and vice versa.
Repeat!
Here’s how a since perceptron works to classify two classes :
Drawback of perceptron. Sometimes its not possible to get desired result with only perceptron. In the below example you can see the model in not able to draw a line to classify the data(linearly inseperable data)
Indroduction of ANN If you increase the number of neuron then you cann see model works pretty well. The stack of more than one neuron is called Multi Layer Perceptron or ANN.
c:\users\sonu.ramkumar.jha\desktop\experiments\env\lib\site-packages\numpy\_distributor_init.py:30: UserWarning: loaded more than 1 DLL from .libs:
c:\users\sonu.ramkumar.jha\desktop\experiments\env\lib\site-packages\numpy\.libs\libopenblas.GK7GX5KEQ4F6UYO3P26ULGBQYHGQO7J4.gfortran-win_amd64.dll
c:\users\sonu.ramkumar.jha\desktop\experiments\env\lib\site-packages\numpy\.libs\libopenblas.WCDJNK7YVMPZQ2ME2ZZHJJRJ3JIKNDB7.gfortran-win_amd64.dll
warnings.warn("loaded more than 1 DLL from .libs:"