# Micro-Location Temperature Prediction Leveraging Deep Learning Approaches
## 3 Proposed Method Maximus
Indeed, the feature can be predefined more precisely by a sequence of the past values higher than those prescribed by the parameter \(T\). This characteristic is described by the introduction of a parameter 'SW size', which is normally set to the value \(T\). When a behavior of a particular \(k\)-th feature \(Feat_{k}^{(t)}\) is observed in \(T=24\) instead of \(T=12\) h periods, the parameter 'SW size' needs to be set to the value \(24\). Obviously, the number of time sequences for the learning phase depends on the number of considered years. In our study, the LSTM network was used for prediction of the air temperature on micro-locations due to a vanishing gradient problem by back-propagation [29]. Thus, the arbitrary long-term dependencies are not tracked in the input sequences. In place of the back-propagation, the LSTM network is trained with a set of training sequences using the optimization algorithm gradient descent, combined with back-propagation through time. These algorithms modify the weights of the LSTM network in proportion to the derivation of the error [6]. During the training phase, early stopping is used to prevent the model from over-fitting. The Learning-Rate (LR) Scheduler helps to adjust the LR during training and aids in faster convergence and better model performance. The system also saves the best model periodically. At the end of training, the model with the lowest Mean Absolute Error (MAE) values is selected based on selection of the parameters. After that, model prediction and evaluation are performed, where the best model is constructed and trained, and predictions are made. The LSTM network is controlled by setting the following hyper-parameters [30]:  
* **Number of nodes and hidden layers**: The layers between the input and output layers are called hidden layers. * **Number of units in a dense layer**: A dense layer is the most frequently used layer, which is basically a layer where each neuron receives input from all the neurons in the previous layer. * **Dropout**: Every LSTM layer should be accompanied by a dropout layer that helps avoid overfitting in training by bypassing randomly selected neurons, thereby reducing the sensitivity to specific weights of the individual neurons. Figure 6: Maximus optimal prediction model learning workflow. * **Activation function**: Activation functions play a critical role in neural networks by introducing non-linearity, which enables the network to learn complex patterns in data. There are a lot of various activation functions in DL, where the Rectified Linear Unit (ReLU) is the most popular and widely used due to its simplicity and effectiveness. * **Learning rate**: The hyper-parameter \(LR\) defines how quickly the network updates its parameters. Usually, this hyper-parameter has a small positive value, mostly in the interval \(LR\in[0.0,0.1]\). To handle the complex training dynamics of recurrent neural networks better, adaptive optimizers are recommended (such as [PERSON] in our study). * **Number of epochs**: One of the critical issues while training a neural network on the sample data is Overfitting. To mitigate overfitting and increase the generalization capacity of the neural network, the model should be trained for an optimal number of epochs. * **Batch size**: The batch size limits the number of samples to be shown to the network before a weight update can be performed. The Maximus model's performance is evaluated using two well-known statistical metrics, i.e., Mean Absolute Error (MAE) and Mean Square Error (MSE). Let us mention that the MAE metric is used for measuring the average magnitude of errors in a set of predictions according to the following equation:  
\[MAE=\frac{1}{T}\sum_{i=1}^{T}\lvert y_{i}-x_{i}\rvert, \tag{2}\]  
where \(y_{i}\) denotes the prediction value, \(x_{i}\) the true value, and \(T\) is the number of observation values. The lower the MAE, the better the model fit.