Chapter 7. Advanced Analytics with Unsupervised Learning

Would you like to know how to make predictions from a dataset? Alternatively, would you like to find exceptions, or outliers that you need to watch out for?

Neural networks are used in business to answer these business questions. They are used to make predictions from a dataset, or to find unusual patterns. They are best used for regression or classification business problems.

In this chapter, we will look at neural networks as a specific example of advanced analytics, and how they can be used to answer real-life business questions.

What are neural networks?

Neural networks are one of the most interesting machine learning models. Neural networks are inspired by the structures of the brain. Neural networks are algorithms that mimic the functioning of the brain. They are unsupervised algorithms, which means that we do not always know what the outputs should be.

Neural networks have layers, which can be categorized into the following:

  • Input
  • Middle
  • Output layers

The input layer consumes the data, and the output layer represents the result. The middle layer represents the part of the algorithm that indicates how the input layer gets to the output layer.

Different types of neural networks

The simplest type of neural network is known as a Feedforward Neural Network. It feeds information in one direction only, from the front to the back. This type of network is also known as a perceptron. The following figure illustrates a perceptron:

Different types of neural networks

Neural network training process

Neural networks can also feed information back down through the layers. One method for this process is known as backpropagation, which feeds back through the system to generate the difference between the target and actual output values.

Note

Neural nets are complex because they contain many hidden layers. The middle layer works to map the inputs to the outputs. To achieve this function, the neural network needs to undergo a lot of training.

Here is an illustration of how these neural networks might look. Error is fed back to modify future learning iteration:

Different types of neural networks

Training involves getting the errors from the first pass through the learning process. The error is then fed back through the network, and it's used to help point the neural network more closely to the expected output.

At its most basic level, the neural network consumes a number of inputs, and tries to crunch the data down to a small number of outputs. The inputs are made up of the values in a data record, and the output layer is represented by a node, which could be 1 for correct, and 0 for the others.

The neural network does this by creating a middle layer, which looks at various ways in which the numbers can be manipulated and combined to produce results that are as close to the target as possible.

The number of layers and the processing points within the layer are part of the black magic of the data scientist. Sometimes this is a best fit, and sometimes it isn't a black and white, clear cut answer. There are several guidelines, however, that might help in the process.

Firstly, as the complexity in the input and output increases, then the number of processing points in the hidden layer will also increase. Furthermore, if the model can be split out into separate stages, then different layers may be incorporated into the model.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset