## 3 Methodology
### Materials and Methods  
Genetic algorithms (GAs) are a class of optimization algorithms inspired by biological evolution. [PERSON] et al. [23] highlight the resemblance of GAs to natural genetics. These algorithms use an iterative initialization process, fitness evaluation, selection, crossover, and mutation to generate optimal output results. In this study, GA was used to optimize the hyperparameters of the LSTM model. In the optimization problem, the GA algorithm starts with an initial population of solutions encoded as bit strings [0 and 1]. Each population member represents a specific combination of two key parameters for the LSTM model: the window size and the number of LSTM units. These solutions then compete against each other based on their fitness, which is evaluated by the prediction accuracy of the LSTM model. Filter individuals have a higher probability of being selected to reproduce and produce offspring. During reproduction, solutions are combined and mutated, generating new solutions that may be even more effective for the problem at hand. Over time, the GA algorithm converges towards an optimal solution or close to it, that is, towards the optimal combination of parameters for the LSTM model that maximizes its predictive ability on the training data set. LSTM is a special type of RNN that was designed to solve the vanishing gradient problem of classical RNN networks. LSTM networks are composed of modules (also called cells). An LSTM module internally consists of three gates (i.e., forget, input, and output) that regulate the flow of information in an LSTM module. The LSTM has the ability to remove or add information to the cell state, which is carefully regulated by structures called gates. The forgetting gate consists of a sigmoid layer and a multiplication operation similar to the output gate, which additionally has a hyperbolic tangent operation, while the input gate has two layers: the sigmoid and the hyperbolic tangent, as well as multiplication and addition operations. The forgetting gate controls when information is forgotten or remembered using a sigmoid function. The input gate helps to update the state of the cell; the current input and previous state information pass through the sigmoid function and tangent function (tanh), which will update and decrement the values, respectively, to regulate the network; furthermore, the sigmoid output will decide what information is important to keep from the tangent output. Based on the information on the hidden door and the entrance door, the state of the cell, as well as the multiplication and product operations, are calculated to obtain the new cellular state. Finally, the output gate decides what the next hidden state should be. The GA-LSTM hybrid model is required in unemployment rate prediction due to the benefits of combining these models. GA models are useful for parameter optimization and finding global solutions, while LSTM models are effective in capturing sequential patterns in data. Therefore, the combination of GA and LSTM was considered due to the need to improve the predictive ability of the unemployment rate as well as the possibility of optimizing the hyperparameters of LSTM using GA to achieve optimal results. To adjust the GA and LSTM models, data preprocessing was considered within the methodology, which included the collection of data from different Ecuadorian organizations, the cleaning of missing data, and the analysis and treatment of outliers. Likewise, the hybrid model was optimized by adjusting the LSTM parameters, that is, the window size and the number of LSTM units. Once the configuration of the GA-LSTM model was determined, the evaluation metrics mean squared error (MSE), MAE, MAPE, and the paired \(t\)-test were used to evaluate its performance. The novelty of the proposed methodology is its unique application, which is the combination of GA and LSTM to a specific data set for the prediction of the unemployment rate.