Ready to learn Artificial Intelligence? Browse courses like Uncertain Knowledge and Reasoning in Artificial Intelligence developed by industry thought leaders and Experfy in Harvard Innovation Lab.
Neural networks are a ground breaking technology that never cease to amaze me. Like machine learning in general, they are becoming more and more integrated into our lives without many of us realising. They can be wildly complex and it is very difficult to understand how they come to decisions. As the name suggests the inspiration behind their design comes from something we all own and use everyday; the brain.
Neurons are the building blocks of the brain and when studied individually they are not very complex. Two neurons are connected by a synapse and electrical impulses travel from one neuron through the synapse to the other neuron. If the electrical impulse is of a certain strength then the synapse fires, sending the electrical impulse onto the next neuron.
Artificial neural networks work in a very similar manner. The image on the left shows the most simple NN, a single layer NN, named the perceptron. It shows a node (y) with inputs (x1, x2, x3) going into it. Each input has a weight (w1, w2, w3). The node y takes each input and multiplies its value by it’s weight. This weighting generates one of the most powerful features of a NN, valuing inputs at different levels by using different strength weights. Let’s use an example to understand this with more clarity. Let’s say that the NN is going to predict if me and a friend will play tennis this evening. The inputs to the node could be:
- Is my friend available? Yes or no
- Is the weather forecast to be sunny this evening? Yes or no
- Is the court available? Yes or no
If the answer to all three of these questions is yes then the outcome will be “Yes, let’s play tennis!” Each input is given a weight based off it’s importance. In this example clearly the friend and court being available are very important inputs, with either of these answers being no, my friend and I will not play tennis so these weights will be very high. Is the weather forecast to be sunny is less important, as we still might play tennis if it is overcast or even drizzling.
The NN needs yes and no’s in mathematical form, so the NN inputs are given as yes being 1, and 0 being no. Each input is passed to the node, y, by multiplying its value by its weight. The node then adds all the values together. If the total is above a certain threshold then a yes will be returned. If the total is below then it will return a no. This is it’s decision!
A NN is trained over lots of different examples where the inputs and result are provided. This allows the network to learn its weights to provide an overall model with the best possible accuracy. For example if I trained a NN on the answers to those three questions and if my friend and I played tennis everyday of the past year, it will learn to predict if we will play to a high accuracy. This is a very basic example and there are lots of features to NN’s that I haven’t discussed such as hidden layers and backpropagation. Stay tuned for more articles diving further into the workings of neural networks.