Neural Network
A neural network is an AI model that teaches computers to process data by modeling it on how the human brain works. It is a type of machine learning (ML) process, called deep learning, that uses interconnected nodes or neurons in a layered structure that resembles the human brain. It creates an adaptive system that computers use to learn from their mistakes and continually improve. Artificial neural networks thus attempt to solve complex problems.
How a Neural Network works
The architecture of a neural network is inspired by the human brain. Human brain cells, called neurons, form a complex, highly interconnected network and send electrical signals to each other to help humans process information. Similarly, an artificial neural network is made of artificial neurons that work together to solve a problem. Artificial neurons are software modules, called nodes, and artificial neural networks are software programs or algorithms that essentially use computing to solve mathematical calculations.
A basic neural network has artificial neurons interconnected at three levels:
Input Layer
Information from the outside world enters the neural network at the input layer. Input nodes process the data, analyze or categorize it, and pass it on to the next layer.
Hidden Layer
Hidden layers take their input from the input layer or from other hidden layers. Artificial neural networks can have a large number of hidden layers. Each hidden layer analyzes the output from the previous layer, processes it further, and passes it to the next layer.
Output Layer
The output layer returns the final result of all the data processing through the artificial neural network. It can have one or more nodes. For example, if we have a binary classification problem (yes/no), the output layer will have a single output node, which will return either 1 or 0. If, however, we have a multi-class classification problem, the output layer could consist of multiple output nodes.
Deep Neural Network Architecture
Deep neural networks, or deep learning networks, have multiple hidden layers with millions of artificial neurons connected to each other. A number, called a weight, represents the connections between each node. The weight is positive if a node stimulates another node, negative if it suppresses it. Nodes with higher weight values exert a greater influence on the others.
Theoretically, deep neural networks can map any type of input to any type of output. However, they require more training than other machine learning methods. They require millions of examples of training data, compared to the hundreds or thousands that a simpler network needs.
Activation Function
Each level define a mathematical function called Activation Function. This function receives the input from the previous level multiplied by the weight and produces the output for the next level.
Training
The training of a neural network is the task to assign the best values to all the weights in order to minimize the difference between the model's prediction and the actual target value.
Loss Function
A loss function (also called a cost function or error function) measures the difference between a model's predictions and the actual target values. It quantifies how well the network is performing and guides the learning process by providing a numerical measure of the "error". The goal during training is to minimize the loss function, meaning the model's predictions should get closer to the actual values.
Configuring a Neural Network
The input of a Neural Network is a tuple of numbers called features, so specify the name of each feature in the Features field as comma-separated string of names.
The output is one of the possible categories you specify as a comma-separated string of options in the Categories field.
Batch field represents the number of samples returned by the samples' iterator during the training.
Seed is a number used as seed for the internal random numbers generator.
Weight Init Scheme is the algorithm to use to give initial value to all the weights.
In the selector Loss Function, you indicate what function to use to measure the error of the predicted values.
The Activation Function selector just indicates the default function to use for the layers.
On the right side of the panel define all the layers, giving a specific activation function for each of them.
Evaluation
The evaluation allow you to test the network against a random subset of the same training data set, to launch the process choose the item Start Evaluation of the contextual menu and at the end look at the results in the Evaluation tab.
Confusion matrix
The confusion matrix is a synthetic representation of the performance of the neural network.
Here's a breakdown of what a confusion matrix shows:
- Rows: Represent the actual (true) class labels of the data
- Columns: Represent the predicted class labels by the model
- Cells: Each cell in the matrix represents a specific combination of actual and predicted labels, with the number in the cell indicating how many instances fall into that category