Neural Network Concepts Part 1

Posted on Jun 26, 2017

In this and next one, I will share my understanding on Neural Network and how to write the related R code inside the Power BI.

First, in this post I am going to explain what is main concept behind the Neural Network and How it works .The video https://www.youtube.com/watch?v=DG5-UyRBQD4&spfreload=10 helped me  a lot to get better understand the main concept behind the neural network also the book that I put in reference was also a good source for it.

What we expect from a computer is that we provides some inputs and then we received outputs that match our needs. Scientist try to mimic the human brain for creating any intelligence machine. A machine that do the reasoning same as human.

So  the main important element of human brain is neurons. human brains consist of 75 million neurons. each neurons is connected to other via a synapses.So what we have in Neural network is some nodes that are connected to each other. In human body if a neuron trigger by some external elements, it will pass the message from the receiver node to other nodes via synapsis.

Neural network mimic the same concepts from human brain. One node gets some inputs from the environment and then Neural Network model creates outputs that produce the result the same as computer system.

so in Neural Network we have

1- Set of inputs nodes

2- Set of output node/s

3-Some processing in middle to achieve a good results

4- The flow of information

5- The connection between nodes

Some of the connections are more important than the other. That means they able to have more impact on the result than the others. In Neural Network we call them Weights.

so what is a weight there is a really good example in video ( https://www.youtube.com/watch?v=BR9h47Jtqyw)

imagine we want to back from a climbing journey, we are in top and weather is foggy, so we only able to see the 1 meter ahead, so we can decide which direction we should go just for one meter ahead.

we put the first step now based on the location again we decided which direction we should go and tale the other steps, so in each steps we evaluate the way and choose the best way till we come down the mountain.

all of these decision place can be seen as a node of decision that lead us to a better and closer point.

in Neural Network, we have some hidden Nodes that do the main job ! they found the best value for the output, they are using some function that we call that functions as “Activation function” for instance in below picture, Node C is a hidden node that take the values from node A and B. as you can see the weight (the better path) related to Node B as shown in tick line that means Node B may lead to get better results so Node C get input values from Node B not Node A.

the neural network has different layout :

single-layer network: the first layout is about that all input connected to one output via some link and specific weight with out applying any function. this is a very simple and can be so similar to linear regression.

the other layout of the multilayer network that may have some hidden nodes. and most of the time they are fully connected. which means that every node in one layer is connected to every node in the next layer,

why we need hidden nodes? to answer this question look at the below example:

imagine that we have a data like below picture. we have an aim to classify the data into two groups as black and orange group. first we apply formula 2x+y=-2 to separate them, as you see this formal able to cover 60% of the classification, so still some orange dot are in black area, so the line is not that much accurate and able to fully classify the data.

In the other linear formula we have this formula to classify the black and orange groups : x=5 so we have 1*x+0*y=5, this line also not that much able to classify the nodes, it able partially to do it.

we have another formula that is combination of these two and are more effective in classifying the black nods from orange one, see below picture. So I can sum formula1 and formula 2 to be able to classify better the black and orange nodes.

with formula : -8*x+y=-6

with this example we first apply two function on our input values (X and Y). Then, we merge them to find a better formula that able to classify the data. So we use some activation function to join this two formula to reach a better result.

so we have below network

we connect the nodes and we have below fully structure Neural Network network

so what function we can use for activation and merging the nodes? there are many of these activation function such as linear, Saturated Linear, Hyperbolic Tangent, and Gaussian. I am not going to explain them as for this post and Next one we just want to use them, will discuss them later in a post.

This is a main concepts behind the neural network, In the next post I will show how to write code in R and Power BI in next posts. I found the blow videos really good for understanding the main concepts.

Trainer, Consultant, Mentor
Leila is the first Microsoft AI MVP in New Zealand and Australia, She has Ph.D. in Information System from the University Of Auckland. She is the Co-director and data scientist in RADACAD Company with more than 100 clients in around the world. She is the co-organizer of Microsoft Business Intelligence and Power BI Use group (meetup) in Auckland with more than 1200 members, She is the co-organizer of three main conferences in Auckland: SQL Saturday Auckland (2015 till now) with more than 400 registrations, Difinity (2017 till now) with more than 200 registrations and Global AI Bootcamp 2018. She is a Data Scientist, BI Consultant, Trainer, and Speaker. She is a well-known International Speakers to many conferences such as Microsoft ignite, SQL pass, Data Platform Summit, SQL Saturday, Power BI world Tour and so forth in Europe, USA, Asia, Australia, and New Zealand. She has over ten years’ experience working with databases and software systems. She was involved in many large-scale projects for big-sized companies. She also AI and Data Platform Microsoft MVP. Leila is an active Technical Microsoft AI blogger for RADACAD.