At the most basic level, an artificial neural network (ANN) is a function that includes units (which may also be called neurons, perceptrons, or nodes). Each unit will have a value and a weight, which indicates the relative importance, and will go into the hidden layer. The hidden layer uses a function, with the result becoming the output. There is also another value, called bias, which is a constant and is used in the calculation of the function.
This type of training of a model is called a feed-forward neural network. In other words, it only goes from input to the hidden layer to the output. It does not cycle back. But it could go to a new neural network, with the output becoming the input.
Figure 4-1 shows a chart of a feed-forward neural network.

Let’s go deeper on this by taking an example. Suppose you are creating a model to predict whether a company’s stock will increase. The following are what the variables represent as well as the values and weights assigned:
- X1: Revenues are growing at a minimum of 20% a year. The value is 2.
- X2: The profit margin is at least 20%. The value is 4.
- W1: 1.9.
- W2: 9.6.
- b: This is the bias (the value is 1), which helps smooth out the calculations.
You’ll then sum the weights, and then the function will process the information. This will often involve an activation function, which is non-linear. This is more reflective of the real world since data is usually not in a straight line.
Now there are a variety of activation functions to choose from. One of the most common is the sigmoid. This compresses the input value into a range of 0–1. The closer it is to 1, the more accurate the model.
When you graph this function, it will look like an S shape. See Figure 4-2.

As you can see, the system is relatively simplistic and will not be helpful in high-end AI models. To add much more power, there usually needs to be multiple hidden layers. This results in a multilayered perceptron (MLP). It also helps to use something called backpropagation, which allows for the output to be circled back into the neural network .

Leave a Reply