# Calculation of the Population of Construction Scaffoldings Using Neural Networks
## 2 Materials and Methods  
### Neural Networks--Multilayer Perceptron (MLP)  
Every artificial neural network consists of a network of interconnected elements (so-called neurons), each of which has a certain number of inputs and one output. Neurons are arranged in layers and are interconnected. In a typical neural network, the following layers can be distinguished:  
* Input layer--responsible for the introduction of the values of variables \(I_{m}\) to the network (\(m=1,\ 2,\ 3,\ \ldots,\ M\));
* Hidden layer--responsible for the processing of information; and
* Output layer--responsible for determining the output value of network \(N\) (result). In the case of very complex neural networks, their structure may contain more than one hidden layer. However, as shown by current practice [27], it is recommended to build a network with up to two hidden layers. Moreover, in most cases, a single hidden layer combined with an appropriate number of neurons can solve the same problem with a comparable level of accuracy. However, it is important that the activation function of the hidden neurons is a non-linear function. Connections between individual neurons in adjacent layers are made using so-called synapses, which are responsible for passing information \(i_{l}\) between elements (\(l=1,\ 2,\ 3,\ \ldots,\ L\)). It should be noted that the transmitted signal in each case is modified by a numerical factor--the so-called weight \(w_{ml}\), where \(m\) is the number of the neuron from which the signal is taken (\(m=1,\ 2,\ 3,\ \ldots,\ M\)), and \(l\) is the number of the neuron to which the signal is supplied (\(l=1,\ 2,\ 3,\ \ldots,\ L\)). The values of individual weights are determined in the process of learning the network and are responsible for the so-called network's \"memory,\" i.e., its ability to predict results based on new variable values. In the case when the value of the weight parameter is positive, the neuron to which the information is delivered is activated, and when the value of the weight parameter is negative, the neuron is inhibited. Figure 1 shows an exemplary structure of a two-layer neural network with one hidden layer. Figure 1: Exemplary structure of a two-layer neural network. A typical neuron in the hidden layer and output layer of the network consists of the aggregation function \(s\) and the activation function \(y\) (Figure 2). The aggregation function \(s=g(i_{l},\ w_{ml})\) is responsible for the aggregation of the input data, i.e., the connection of the information \(I_{m}\) transmitted by the synapse from the neuron of the previous layer with the appropriate weight parameter \(w_{ml}\) that is assigned to this connection. In practice [27], the aggregation function \(s\) is most often a linear function: \(s=\sum_{i}w_{ml}\), or a radial function: \(s=\sum(w_{ml}-i_{l})^{2}\). However, in the case of tasks other than classification, it is recommended to use the linear aggregation function [27]. The aggregated input value of a given neuron becomes its activation function parameter \(y=f(s)\). The activation function \(y\) can be linear, sigmoidal, tangensoidal, Gaussian, or another function. In practice, according to [27], it is recommended to use linear or sigmoidal activation functions on \(y\) for solving tasks related to the prediction and modeling of a phenomenon. When developing a neural network model, it is very important to properly select the input variables, the number of neurons, the number of hidden layers, and the aggregation and activation functions in individual neurons. However, there are techniques that allow for the automatization of this procedure, such as grid search, random search, Bayesian optimization, and evolutionary optimization. The network components should be selected in a well-thought-out manner by those developing a model. There are techniques to automate this procedure, such as: grid search, random search, Bayesian optimization, and evolutionary optimization.