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.
2 thoughts on “Neural Network Concepts Part 1”
Is there really a big difference between the old on premises SQL Server Data Mining NN algorithm and the AZURE ML NN algortihm? It did not seem as though many took to the SSIS integration with the SQL Server Data Mining tasks and that AZURE ML is another attempt to do so…..(and a lot more, of course).
Hi, good question
1-the data mining tools just support 9 algorithms, azure ML support 25 algorithms that they claim they have been used in Bing search and other Microsoft products, so much more reliable.
2-data mining tools were not that much flexible, we just able to update few parameters.in Azure ML not only you able to update the parameters, but also we have access to some tools like “cross validation” and hyper tune model to enhance the performance and find the best parameters.
3- in Azure ML if you are not happy with 25 algorithms you able to write your own R or Python codes,
4- One of the great things and difference between Azure ML and Data mining tools in my mind is: you able to create a web service from your model and use it in any other applications,
so in performance and flexibility much better than Microsoft data mining tools.
so yep you have more access to it, more flexible. in my mind it is a good option for doing machine learning in cloud,