# Federated Learning-Based Analysis of Human Sentiments and Physical Activities in Natural Disasters
## 3 Methodology
### Aggregator in the FL Context  
The FL architecture is the third module of our architecture, which is influenced by the federated averaging concept [34]. The stochastic gradient descent of every participating node model was aggregated to establish an aggregator global model. The fundamental design of the FL module is shown in Figure 3, which shows that the parameter \(\propto\)_t of the aggregator model is distributed to all collaborating nodes by the main aggregation server [35]. The procedure begins with the servers initializing global parameters that are subsequently shared among \(k\) clients. The clients then upgrade the settings using locally stored data and transmit the information back to the server, which repeats the procedure. The t represents the initial global model parameters, while \(K\), \(n\), \(nk\), \(tk\), and (\(lC\)) depict the cumulative number of clients, the size of the entire data, the data size of the \(k\)-th client, the parameters of the local model trained by the \(k\)-th client, and the updated global model parameters at time \(t\), \(C\) 1, respectively. Each node model then starts training native models based on the parameters that they retrieve from the global aggregator model. The fundamental design of the FL module is shown in Figure 3, which shows that the parameter \(\propto\)_t_ of the aggregator model is distributed to all the collaborating nodes by the main aggregation server. Each node model then starts training the native models based on the parameters that they retrieve from the global aggregator model. The parameters of local collaborating clients or nodes (e.g., \(\propto\)_t\({}^{k}\)_) are shared after the completion of local training with an aggregating server for updated parameters, for example, \(\propto\)_t\({}_{+1}\)_, by iterating the procedure using the parameter distribution of the updated model with the nodes. This procedure is repeated for a specific transmission cycle. In this implementation, seven client modes engage in FL. The learning approach is a recurrent neural network [36] with long short-term memory (LSTM) [37]. Importantly, the LSTM was trained using the feature representations retrieved using the CNN elaborated in Table 1, as previously explained. We are encouraged to select LSTM because training a CNN after every session to update the network as FL, requires substantial computational hardware at the nodes. As mentioned in [38], the combination of the LSTM and CNN assists in integrating the performance for improved classification. To design the global model using the aggregation of the parameters of the local models, we used optimization algorithms, specifically FedAvg. The main FedAvg algorithm is presented in Algorithm 2, which contains two main modules. The first module contains operations related to the server, whereas the second module contains operations specifically related to the client nodes. Here, \(\propto_{t}\) is the parameter related to the global aggregator, and the number of node devices is denoted as \(\propto^{k}\), \(k\) depicts the batch size, \(B\) represents the number of iterations, the learning rate is denoted as \(E\), the volume of the dataset is denoted as \(\eta\), and the size of the dataset at the node device is represented as \(n_{k}\). These parameters are associated with each collaborating device (i.e., \(\propto^{k}_{t}\)). In addition, the fine details of the FL aggregator, such as the communication cycles with nodes, total number of nodes, and total number of active connected devices per iteration, are presented in Section 4.