## 2 Methodology
### Model Design and Architecture  
The computational unit used for calculations in this study was a Dell workstation equipped with an Intel(r) Xeon(r) Bronze 3204 CPU @ 1.90 GHz, 64 GB of RAM, running Windows 11 Pro for Workstations. The software environment used for data processing and analysis was MATLAB v.2022. In the context of regression employing LSTM networks, the architecture primarily comprises a sequence input layer and an LSTM layer with a specified number of hidden units [20,21]. In this work, the inputs to the LSTM model are the effect site concentrations CeProp and CeRemi. The LSTM layer is followed by a Fully Connected Layer and a Regression Layer. Notably, the desired output of this architecture is the MAP [22]. The selection of parameters in an LSTM network plays a pivotal role in determining its performance for regression tasks. These parameters, as summarized in Table 1, encompass various aspects, e.g., the number of LSTM layers, neurons per layer, activation functions, number of epochs, optimizer choice, and mini-batch size. \begin{table}
\begin{tabular}{l l l} \hline \hline
**Parameter** & **Role** & **MATLAB Code Example** \\ \hline \multirow{2}{*}{LSTM layers} & Determines the depth of the neural & layers = [lstmLayer(16), \\  & network. & lstmLLayer(32),...] \\ \hline \multirow{2}{*}{Neurons per layer} & Defines the number of basic processing & \multirow{2}{*}{neurons = [16, 64];} \\  & units in each LSTM layer. & \\ \hline \multirow{2}{*}{State activation function} & Activation function for updating the & \multirow{2}{*}{state\#Activation = {tanh, } } \\  & cell and hidden state in the LSTM layer. & \\ \hline \multirow{2}{*}{Gate activation function} & Activation function for the gates in the & \multirow{2}{*}{gate\#Activation = {sigmoid, } } \\  & LSTM layer. & \\ \hline \multirow{2}{*}{Number of epochs} & Controls the number of training & \multirow{2}{*}{epochs = [50, 100, 200,...];} \\  & iterations through the entire dataset. & \\ \hline \multirow{2}{*}{Optimizer} & Adjusts model parameters during & \multirow{2}{*}{optimizer = {adam, rmsprop, } } \\  & training to minimize the error. & \\ \hline \multirow{2}{*}{Mini-batch size} & Determines the number of training & \multirow{2}{*}{miniBatchSize = [16, 32, 64];} \\  & examples used in each update. & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Description of LSTM Parameters. The number of LSTM layers and neurons per layer defines the complexity of the network, with a careful balance needed to avoid overfitting. Activation functions play a pivotal role in how information is stored and flows through the LSTM. For the StateActivationFunction, common choices include tanh and softsign. The hyperbolic tangent function tanh is defined as follows :  
\[\tanh(x)=\frac{e^{2x}-1}{e^{2x}+1}, \tag{1}\]  
while the softsign function is defined as:  
\[\mathtt{softsign}(x)=\frac{x}{1+|x|}. \tag{2}\]  
These functions impact the ability of the network to capture long-term dependencies and update the cell and hidden state [23]. The LSTM architecture is detailed in Appendix A. For the GateActivationFunction, common choices are sigmoid and hard-sigmoid. The sigmoid function is defined as follows:  
\[\sigma(x)=\frac{1}{1+e^{-x}}, \tag{3}\]  
and the hard sigmoid function is defined as follows:  
\[\sigma(x)= \begin{cases}0&\text{if }x<-2.5,\\ 0.2x+0.5&\text{if }-2.5\leq x\leq 2.5.\\ 1&\text{if }x>2.5\end{cases}  \tag{4}\]  
These functions are applied to the gates in the LSTM layer, influencing how information flows through the network [24]. Optimizers, e.g., adam, rmsprop, and sgd (stochastic gradient descent), also play a key role in adjusting model parameters during training. The adam optimizer dynamically adapts learning rates using moment estimates, enhancing convergence speed.