# Metaheuristic Optimized Multi-Level Classification Learning System for Engineering Management
## 3 Methodology
### Optimization in Machine Learning
#### 3.2.2 Enhanced Firefly Algorithm  
In this study, the enhanced firefly algorithm is proposed to improve the LSSVM's hyperparameters. The FA is improved by integrating stochastic agents to enrich global exploration and local exploitation. Metaheuristic Firefly Algorithm  
[PERSON] (2008) developed the FA, which is inspired by the swarm nature of fireflies [67]. This algorithm is designed to solve global optimization problems in which each individual firefly in a population interacts with each other through their light intensity. The attractiveness of an individual firefly is proportional to its intensity. Visibly, the less this attraction for another individual firefly, the farther away it is from its location. Despite the effectiveness of conventional FA in solving optimization problems, it often gets stuck in the local optima [39]. Randomization is considered an important part of searching optimal solutions. Therefore, fine-tuning the degree of randomness and balancing the local and global search are critical for the favorable performance of a metaheuristic algorithm. The achievement of the FA is decided by three parameters, which are \(\beta\), \(\gamma\), and \(\alpha\), where \(\beta\) is the attractiveness of a firefly, \(\gamma\) is the absorption coefficient, and \(\alpha\) is a trade-off constant to determine the random movements. Hence, this study supplements metaheuristic components--chaotic maps, adaptive inertia weight (AIW) and Levy flight--into the basic FA. The components are not only to restore the balance between exploration and exploitation but also to increase the probability of escaping from the attraction of local optima. Chaotic Maps: Generating a Variety of Initial Population and Refining Attractive Values  
The simplest chaotic mapping operator is the logistic mapping, which creates more diversity than randomly selected baseline populations, and reduces the probability of early convergence [68]. The logistic map is formulated as Equation (4). \[X_{n+1}=\eta X_{n}(1-X_{n}) \tag{4}\]  
where \(n\) is the number label of a firefly and \(X_{n}\) is the logistic chaotic value of the \(n^{\text{th}}\) firefly. In this work, initial populations are generated using the logistic map equation, and parameter \(\eta\) is set to 4.0 in all experiments. Additionally, chaotic maps are used as efficient alternatives to pseudorandom sequences in chaotic systems [69]. A Gauss/mouse map is the best chaotic map for tuning the attractiveness parameter (\(\beta\)) of the original FA. Equation (5) describes the Gauss/mouse map that was used in this study. \[\text{Gauss/mouse map}:\ \beta_{chaos}^{t}=\left\{ \begin{array}{ll}0&\beta_{chaos }^{t-1}=0\\ \\ 1/\beta_{chaos}^{t-1}\text{mod}(1)&\text{otherwise}\end{array} \right. \tag{5}\]  
The \(\beta\) of a firefly is updated using Equation (6). \[\beta=(\beta_{chaos}^{t}-\beta_{0})e^{-\gamma r_{ij}^{2}}+\beta_{0} \tag{6}\]  
where \(\beta\) is the firefly attractiveness; \(\beta_{chaos}^{t}\) is the \(t^{\text{th}}\) Gauss/mouse chaotic number and \(t\) is the iteration number; \(\beta_{0}\) is the attractiveness of the firefly at distance \(r=0\); \(r_{ij}\) is the distance between the \(i^{\text{th}}\) firefly and the \(j^{\text{th}}\) firefly; \(e\) is a constant coefficient, and \(\gamma\) is the absorption coefficient. Adaptive Inertia Weight: Controlling Global and Local Search Capabilities  
In this investigation, the AIW was integrated into the original FA because AIW has critical effects on not only the optimal solution convergence, but also the computation time. A monotonically decreasing function of the inertia weight was used to change the randomization parameter \(\alpha\) in the conventional FA. The AIW was utilized to adjust the parameter \(\alpha\) by which the distances between fireflies were reduced to a reasonable range (Equation (7)).