Part 1: The Deep Learning Model of ANN | Artificial Neural Networks

Mysha Gilani
6 min readJan 30, 2021

Artificial Intelligence. These 2 words are the future of our world. The world of AI has been evolving and there is more to come. AI can cure diseases. It can allow computers to work faster. Cars can now drive by themselves. What’s next?

If you are a true lover of AI and have dove deep into the topic, you have probably heard of something called Artificial Neural Networks (ANN). Before we look at this in-depth you need to know the use of ANN. It is a deep learning model that is used to replicate the way humans think and learn. This deep learning model roots from the one and only Neuron.

Basics: The Neuron

The neuron is an essential part of our brain and nervous system. Neurons are the messengers. They detect electrical impulses and chemical signals and use them to transmit information to different parts of the brain.

Here is an image of the structure of a neuron

As seen in the image neurons have 3 main parts: a cell body, an axon, and a dendrite. Along with this, there are 3 classes of a neuron:

  1. Sensory Neurons → They carry information from the sense organs such as the ear, mouth, nose, and eyes and bring them to the brain.
  2. Motor Neurons → They control voluntary muscle activity. They do this by carrying messages from the nerve cells in the brain to the muscle.
  3. Interneurons → These are the other neurons that don’t have a direct role.

What is ANN?

Now the overall question is how can this become a machine or an Artificial Neural Network? The whole purpose of deep learning is to replicate the way the human brain works.

Now that you have a basic understanding of Neural Networks, let’s take a look at Artificial Neural Networks. First, we will start with a comparison.

If you look at the image, you can see that the comparisons don’t look similar. However, they both accomplish the same thing. The artificial neuron goes through the same process as the typical neuron. It gets its inputs and releases its outputs.

The largest and most important difference is the equations used on the ANN. ANN’s have neurons as their units and the “neurons” are put together by synapses. Synapses are weighted values which are also known as synaptic weights. Synaptic weights represent how strong the connection between the neurons are.

How do they work?

Now that we have answered that question, a new question arouses. How do the ANN’s know what calculations to perform? The answer to this question is quite simple. One thing you need to know is that AI is nothing without data. Therefore, the first thing we need to do is provide the ANN with data. This means that we provide the ANN with multiple questions and follow them with the answers to those questions. One thing to note is that the more the system receives the better the system will be. There will be more mistakes made due to the increased amount of data, but the model will learn from those mistakes and will ultimately be more accurate.

What happens here is that ANN is learning through supervised learning. The main purpose of supervised machine learning is to learn by example. When in the training stage of machine learning, the data will consist of inputs and will be matched with correct outputs. Once the machine has learned this data, one of the inputs that were inputted before would be provided, but this time it won’t be labeled with an output. The machine has already studied this input and will predict correctly. For instance, you can input a couple of pictures that can be labeled with who is in the picture. Then when you input an image, without a label, the machine can try and figure out who is in the picture.

Now how is this concept used in ANNs? When you provide the required data into the ANN, the values in the neuron and the synapses adjust to create the optimal artificial neural network. This process is also known as back-propagation.

Back-propagation is the fine-tuning of the weights, ultimately causing lower error rates and making the model more reliable. It learns through experience. It improves the weights based on the error rate in the previous iteration.

What is the structure of ANN?

ANN has been designed to work very similarly to the human brain. AI objects are being used and are representing a certain part of the brain. To make the first connection, we can use silicon and wires to act as the dendrites and neurons. The role of the dendrites in the brain is to process stimuli from the external environment. Similarly, in ANN the input creates electric impulses that travel through the neural network.

ANN consists of multiple nodes, which act like neurons. These nodes are connected by wires so that they are able to communicate with each other. The role of the nodes (neurons) is to take the data that has been inputted, break it down by performing small operations in the data, and then sending the results to other nodes (neurons). Then there is a final output which is called the node value.

In a typical ANN, there are at least 3 layers:

  1. Input Layer: The data provided into the ANN
  2. Hidden Layer: This is where most of the interactions happen in the ANN. This is where the deep learning process starts. It is important to know how many hidden layers you want. You need to make sure you balance the number of layers to make sure you get the best accuracy possible.
  3. Output Layer: Finished computations of the network are shown

Types of ANN

There are also 2 different types of ANNs

Recurrent Neural Network: RNN’s are able to remember important things from the input they receive so that they can be accurate in their predictions of what is coming next. RNN’s are the only type that has an internal memory.

Convolution Neural Network: CNN’s are a multilayered neural network with a unique architecture to detect complicated features in data. CNN’s are mostly used to classify images due to their ability to recognize patterns and features.

My progress

I have been working on a project that involves using ANN’s to solve a certain problem.

This is the scenario. The current bank detected high churn rates in the last year and the board wishes to understand and assess this problem, so they can take actions to decrease this value. Therefore, we were hired as Data Scientist to evaluate this dataset and give them some insights on the matter.

This is an International Bank with millions of customers spread all around Europe mainly in, three countries, Spain, France and Germany. In the last six months, the bank detected that the churn rates started to increase when compared to the average rate, so they decided to take measures. The bank decided to take a small sample of 10,000 of their customers and retrieve some information.

For six months they followed the behavior of these 10,000 customers and analyzed which stayed and who left the bank. Therefore, they want me to develop a model that can measure the probability of a customer leaving the bank.

My goal for this task is to create a geodemographic segmentation model to tell the bank which of the customers are at higher risk to leave.

What have I created?

I have made a code that finds a way to help this bank determine whether or not the customer will stay at the bank.

Be sure to check out my full code on Github and check out my youtube video that goes through the entire code in full detail

Github code: https://github.com/myshagilani/ArtificialNueralNetworks

Youtube Video: https://www.youtube.com/watch?v=8XINklVmAHM&t=26s

Keep your eye out for part 2 of this article. In part 2, I will be going over the project, what I created, and the process that I followed!

--

--