## 7 Proposed HEM-AL Scheme for Optimal Selection of Centroid and DCNN Weights
### Proposed HEM-AL Algorithm  
The traditional Elephant Herding Optimization (EHO) [32] approach has several advantages, but also bears several shortcomings that necessitate a progression of the searching quality. Hence, the concept of Moth-flame optimization (MFO) [33] is incorporated into it to introduce a new algorithm termed as HEM-AL. Hybridized optimization schemes are said to be capable for specific search issues [19; 34; 35; 36]. The steps followed in the proposed HEM-AL are as follows: In the proposed Algorithm 1, the new position of the best elephant and matriarchs is evaluated, and the rest of the positions are updated using an MFO update. Elephants are social creatures that live in social groups including calves and females. The group involves a variety of clans, and all clans are headed by a matriarch. Usually, female elephants live with the clans, whereas male elephants leave the clans when they reach adulthood. The below assumptions are considered in EHO:  
1. The population includes numerous clans and each clan includes female and male elephants. 2. Some of the male elephants leave the clan and live alone. 3. Each clan is headed by a matriarch. **Clan-updating Operator:** As per the nature of the elephants, the elephants in a clan are led by the matriarch. Thus, the matriarch \(c\) has a major impact on the novel positions of all the elephants. For every elephant in clan \(c\), a matriarch affects the subsequent position \(c\). Conventionally, the best elephant in each clan is evaluated. However, as per the developed HEM-AL model, the elephants are divided into three groups. Figure 3: Solution encoding for optimal weight selection. Figure 2: Solution encoding for optimal centroid selection. Best elephant in the herd, \(Z_{gbest}\)
2. Matriarchs of each clan, \(Z_{pbest}\)
3. Remaining elephants \(Z_{rem}\)  
The proposed new position of the best elephant in the herd, is denoted by \(Z_{new,g_{best}}\), and is updated as per Equation (31), wherein, \(w_{i}\) refers to inertia weight, \(\alpha=(0,1)\) refers to impact factor and \(V_{new,g_{best}}\) is computed as per Equation (32). Further, \(Z_{centre}\) is computed as shown in Equation (33). Here, \(V_{new,g_{best}}\) and \(V_{g_{best}}\) refers to new and old speed of elephant \(Z_{gbest}\), \(Z_{centre}\) refers to middle position of matriarchs and \(m_{c_{i}}\) refers to the number of clans. \[Z_{new,g_{best}}=Z_{gbest}+V_{new,g_{best}} \tag{31}\]  
\[V_{new,g_{best}}=w_{i}\times V_{g_{best}}+\alpha\times\big{(}Z_{centre}-Z_{g_{ best}}\big{)} \tag{32}\]  
\[Z_{centre}=\frac{1}{m_{c_{i}}}\times\sum_{i=1}^{m_{c_{i}}}Z_{pbest,c_{i}} \tag{33}\]  
In addition, the proposed new position of matriarchs of each clan, denoted by \(Z_{new,p_{best}}\) is updated as per Equation (34), wherein, \(V_{new,p_{best}}\) is computed as per Equation (35). In Equation (35), \(ac\) refers to acceleration coefficient and \(ra\) refers to normally distributed random integer \((0,1)\). \[Z_{new,p_{best}}=Z_{pbest}+V_{new,p_{best}} \tag{34}\]  
\[V_{new,g_{best}}=w_{i}\times V_{g_{best}}+ac\times\big{(}Z_{g_{best}}-Z_{p_{ best}}\big{)}\times ra \tag{35}\]  
Further, the remaining elephants \(Z_{rem}\) are updated based on the MFO models shown in Equation (36), where \(AD_{i}\) is calculated as the average distance of \(i^{th}\) moth with \(j^{th}\) flame (i.e., \(AD_{i}=\big{|}H_{j}-R_{i}\big{|}\)), \(b\) denotes the shape of the logarithmic spiral, \(t\) is an arbitrary number that lies within the range \([-1,1]\).