## 3 Methodology  
This section elaborates on the proposed solution and presents the developed algorithms. Figure 2 illustrates a system-level diagram of intelligent federated machine learning-based dermoscopy. The proposed solution would be placed on the edge. The master model would be placed in the cloud server. However, the federated machine learning approach can allow continuous upgradation of the master copies by learning the averagingweights from all edges after each classification (classification done by the dermatologist). The proposed model is adaptive with respect to new disease knowledge (to be classified), and it can improve as a function of experience (by learning from recent examples identified by the dermatologist) during deployment. Figure 3 depicts the application-level design. Two separate mobile applications are shown. They represent the two kinds of edges, one for the community (this module is not covered in this study) and the other for health practitioners (dermatologists). The community module aims to support patients in getting fundamental knowledge regarding skin diseases, as well as to motivate and assist users in visiting relevant health practitioners (nearest available dermatologists). In comparison, the health practitioner module is equipped with a dermoscopy device, which performs more detailed analysis of the captured dermoscopy images until diagnosis. This module also continuously transfers the updated weights of new samples (after each classification) to its cloud counterpart. Fundamentally, the health practitioner module can work together with the dermoscopy device by providing predictions (to health practitioners) regarding the skin disease type. Figure 4 represents the module and detailed architecture of the proposed model. This prototype was initially developed for the four most common skin diseases (mentioned in the International Skin Imaging Collaboration (ISIC) 2019 dataset). Later, it can incorporate new skin diseases through its adaptability feature. In future work, the provided model will be tuned with a multimodal solution (taking into account the input skin disease image and the patient's medical history) to detect and monitor the patient's progress, as depicted in Figure 5.  
In this proposed approach, the authors used the ensemble mechanism's diversity from previous models (used to adapt to new spectral bands), which enabled handling the possible arrival of new classes and samples. Remarkably, the proposed approach (ensemble approach) contributes to diversity in a simple yet effective manner. This study also used the single-instance optimized CNN model inspired by [34,35] (which was carefully devised after numerous experiments) as an instance in the cloud server's ensemble. Furthermore, the authors trained the proposed model using a challenging dataset (the ISIC 2019 dataset). The proposed model contains two core contributions: (1) the model was deployed on the cloud server, and (2) its deployment on the edges majorly contributes toward adaptability by continuously updating. The authors used online training (OT) and online classifier updating (OCU), presented in [36], with some internal tweaking parameters to make the approach suitable for the federated machine learning environment. Figure 2: The system-level architecture of adaptive federated machine learning-based skin disease detection. Figure 4: The detail-level architecture of the proposed model. Figure 5: The module-level architecture of multimodal skin disease detection. Figure 3: The application-level architecture of adaptive federated machine learning-based skin disease detection. Averaging Mechanism: The global model (server) collects the trained weights from all local models (edges). The global model updates the global weight matrix, called G, such that G = G + (I\({}^{\text{k}}\)* w\({}^{1\text{k}}\)/S), where I\({}^{\text{k}}\) is the number of data points used to obtain w\({}^{1\text{k}}\), and S is the sum of the number of data points across all local models (edges).