OL-MFA: An Improved Moth Flame Algorithm for Feature Selection



feature selection, levy flight, moth flame algorithm, swarm intelligence


Feature selection (FS) is an important and crucial task in machine learning. The goal of the feature selection problem is to reduce the dimension of the feature set and maintaining the accuracy of the performance at the same time. This paper presents an improved moth flame algorithm (MFA) to solve the FS problem. The algorithm is improved by integrating opposition based learning (OBL) and levy flights with the original moth flame algorithm (MFA). This improvisation is done to overcome the premature convergence and local optima problem of MFA. The proposed algorithm (OL-MFA) is a swarm intelligent algorithm (SIA) that mimics moths’ navigation behavior in nature. The moths navigate toward the real-light source (moon) with a straight path and a fixed angle which is called transverse orientation. Moreover, moths are highly attracted to artificial lights such as flames, and because of the close distance, they change their flight angles continuously, which forms a spiral path.  Opposition based learning (OBL) is used to address the premature convergence problem. The search strategy of levy flight works as a regulator of the moth position update to maintain decent population diversity and expand the algorithm's global search capability. The proposed approach is compared against the five swarm intelligence algorithms (SIAs) in terms of metrics, including entropy, purity, completeness score (CS), and homogeneity score (HS). The SSE fitness function is used for fitness evaluation. The results have established that the proposed algorithm is superior over the other state of the art counterparts.


Download data is not yet available.



S. Mirjalili, “Moth-flame optimization algorithm: A novel nature-inspired heuristic paradigm”, Knowl. Based Syst., 89, pp. 228–249, 2015.

M. Tubishat, N. Idris, L. Shuib, M. Abushariah and S. Mirjalili, “Improved salp swarm algorithm based on opposition based learning and novel local search algorithm for feature selection”, Expert Systems with Applications, 113122. doi:10.1016/j.eswa.2019.113122

M. kelidari and J. Hamidzadeh, “Feature selection by using chaotic cuckoo optimization algorithm with levy flight, opposition-based learning and disruption operator”, soft Computing. (2020), doi: 10.1007/s00500-020-05349-x

Bulla, P. . “Traffic Sign Detection and Recognition Based on Convolutional Neural Network”. International Journal on Recent and Innovation Trends in Computing and Communication, vol. 10, no. 4, Apr. 2022, pp. 43-53, doi:10.17762/ijritcc.v10i4.5533.

M. Elaziz, A. Ewees, R. Ibrahim and S. Lu,(2019), “ Opposition-based moth-flame optimization improved by differential evolution for feature selection”, Mathematics and Computers in Simulation. 2019. doi:10.1016/j.matcom.2019.06.017

R. Hans, and H. Kaur, “Opposition-based enhanced grey wolf optimization algorithm for feature selection in breast density classification”, Int J Mach Learn Comput, 10(3), 458-464, 2020.

R. Sihwail, K. Omar, K. Ariffin, and M. Tubishat, “Improved Harris Hawks Optimization Using Elite Opposition-Based Learning and Novel Search Mechanism for Feature Selection”, IEEE Access, 1–1,2020. doi:10.1109/access.2020.3006473

H. Xie, L. Zhang, CP. Lim, Y. Yu and H. Liu, “Feature Selection Using Enhanced Particle Swarm Optimization for Classification Models”, Sensors, 21, pp. 1816, 2021.


P. Hu, JS. Pan, and SC. Chu, “Improved Binary Grey Wolf Optimizer and Its application for feature selection”, Knowledge-Based Systems, 105746,2 020.

R. Agrawal, B. Kaur and S. Sharma, “Quantum based whale optimization algorithm for wrapper feature selection”, Appl. Soft Comput., 89, 106092, 2020.

E. Emary, H. Zawbaa and A. Hassanien, “Binary grey wolf optimization approaches for feature selection”, Neurocomputing, 172, pp. 371–381, 2016.

W. Guo, T. Liu, F. Dai and P. Xu, "An improved whale optimization algorithm for feature selection," Computers, Materials & Continua, vol. 62, no.1, pp. 337–354, 2020.

H. Chantar, M. Tubishat, M. Essgaer and S. Mirjalili, “Hybrid Binary Dragonfly Algorithm with Simulated Annealing for Feature Selection”, SN Computer Science, 2:295, 2021. doi:10.1007/s42979-021-00687-5

A. Gad, K. Sallam, R. Chakrabortty and M. Ryan, “An improved binary sparrow search algorithm for feature selection in data classification”, Neural Comput & Applic., 2022. doi:10.1007/s00521-022-07203-7

R. Ibrahim, A. Elaziz, D. Oliva, E. Cuevas and S. Lu, “An opposition-based social spider optimization for feature selection”, Soft Computing, 2019. doi:10.1007/s00500-019-03891-x

S. Arora and P. Anand, “Binary butterfly optimization approaches for feature selection”, Expert Systems with Applications, 2018. doi:10.1016/j.eswa.2018.08.051

A. Naseer, W. Shahzad and A. Ellahi, “A Hybrid Approach for Feature Subset Selection using Ant Colony Optimization and Multi-Classifier Ensemble”, International Journal of Advanced Computer Science and Applications, 9(1), doi: 10.14569/IJACSA.2018.090142.

H. Hichem, M. Elkamel, M. Rafik, MT. Mesaaoud and C. Ouahiba, “A new binary grasshopper optimization algorithm for feature selection problem”, Journal of King Saud University - Computer and Information Sciences, 2019.


L. Wang, Y. Gao, J. Li and X. Wang, "A Feature Selection Method by using Chaotic Cuckoo Search Optimization Algorithm with Elitist Preservation and Uniform Mutation for Data Classification", Discrete Dynamics in Nature and Society, vol. 2021. doi:10.1155/2021/7796696.

H. Zawbaa, E. Emary and C. Grosan, “Feature Selection via Chaotic Antlion Optimization”, PLoS ONE 11(3): e0150652, 2020. doi:10.1371/journal.pone.0150652

Gupta, D. J. . (2022). A Study on Various Cloud Computing Technologies, Implementation Process, Categories and Application Use in Organisation. International Journal on Future Revolution in Computer Science &Amp; Communication Engineering, 8(1), 09–12. https://doi.org/10.17762/ijfrcsce.v8i1.2064

N. Sureja, A. Vasant and N. Chaudhari, “Hybrid Shuffled Frog-Simulated Annealing Algorithm for Clustering”, International Journal of Intelligent Engineering and Systems, Vol.14, No.4, 2021. doi: 10.22266/ijies2021.0831.43

M. Uzer, N. Yilmaz and O. Inan, “Feature Selection Method Based on Artificial Bee Colony Algorithm and Support Vector Machines for Medical Datasets Classification”, The Scientific World Journal, pp. 1–10, 2013.

J. Too, AR. Abdullah and NM. Saad, “A New Quadratic Binary Harris Hawk Optimization for Feature Selection”, Electronics, 8(10), 1130, 2019. doi:10.3390/electronics8101130

S. Ouadfel and M. Abd Elaziz, “Enhanced Crow Search Algorithm for Feature Selection”, Expert Systems with Applications, 159, 113572. doi:10.1016/j.eswa.2020.113572

A. Hegazy, MA. Makhlouf and GS. El-Tawel, “Improved salp swarm algorithm for feature selection”, Journal of King Saud University - Computer and Information Sciences, 2018. doi:10.1016/j.jksuci.2018.06.003

H. Tizhoosh, “Opposition-Based Learning: A New Scheme for Machine Intelligence”, In: International Conference on Computational Intelligence for Modelling, Control and Automation and International Conference on Intelligent Agents, Web Technologies and Internet Commerce (CIMCA-IAWTIC’06). doi:10.1109/cimca.2005.1631345

D. Oliva, and M. Elaziz, “An improved brainstorm optimization using chaotic opposite-based learning with disruption operator for global optimization and feature selection”, Soft Computing. doi:10.1007/s00500-020-04781-3

M. Aladeemy, L. Adwan, A. Booth, M. Khasawneh, and S. Poranki, “New feature selection methods based on opposition-based learning and self-adaptive cohort intelligence for predicting patient no-shows”, Applied Soft Computing, 86, 105866. doi:10.1016/j.asoc.2019.105866

AF. Kamaruzaman, AM. Zain, SM. Yusuf and A. Udin, “Lévy flight algorithm for optimization problems—a literature review”, Applied Mechanics and Materials, vol. 421, pp. 496–501, 2013.

L. Zhiming, Z. Yongquan, Z. Sen and S. Junmin, “Lévy-Flight Moth-Flame Algorithm for Function Optimization and Engineering Design Problems", Mathematical Problems in Engineering, vol. 2016, ID 1423930, 22 pages, 2016. https://doi.org/10.1155/2016/1423930

X. Yang and S. Deb, “Cuckoo search via Lévy flights”, In: Proceedings of the IEEE World Congress on Nature & Biologically Inspired Computing (NaBIC '09), pp. 210–214, Coimbatore, India, 2009.

Sehirli, E., & Alesmaeil, A. (2022). Detecting Face-Touch Hand Moves Using Smartwatch Inertial Sensors and Convolutional Neural Networks. International Journal of Intelligent Systems and Applications in Engineering, 10(1), 122–128. https://doi.org/10.18201/ijisae.2022.275

X. Yang, “Appendix a: test problems in optimization,” Engineering Optimization, pp. 261–266, 2010.

R. Qaddoura, H. Faris, I. Aljarah and PA. Castillo, “EvoCluster: An Open-Source Nature-Inspired optimization Clustering Framework in Python”, In: Applications of Evolutionary Computation. EvoApplications, Vol. 12104. Springer, Cham, pp.20-36, 2020.

D. Chang, X. Zhang and C. Zheng, “A genetic algorithm with gene rearrangement for K-means clustering”, Pattern Recognition, 42(7), 1210–1222.

C. Lee and E. Antonsson E, “Dynamic partitional clustering using evolution strategies”, In: Industrial Electronics Society, 2000. IECON 2000. 26th Annual Conference of the IEEE, IEEE, vol 4, pp 2716–2721.

Sally Fouad Shady. (2021). Approaches to Teaching a Biomaterials Laboratory Course Online. Journal of Online Engineering Education, 12(1), 01–05. Retrieved from http://onlineengineeringeducation.com/index.php/joee/article/view/43

https://archi ve. ics. uci. edu/ ml

A. Rosenberg and J. Hirschberg, “V-measure: conditional entropy based external cluster evaluation measure”, EMNLP-CoNLL. 2007;7:410–20.

I. Aljarah and S. Ludwig, “A new clustering approach based on Glowworm Swarm Optimization”, In: IEEE congress on evolutionary computation, cancun, Mexico, pp. 2642–2649, 2013.

Basic MFA Algorithm




How to Cite

N. . Sureja, P. . Patel, P. . Kadia, and N. . Vala, “OL-MFA: An Improved Moth Flame Algorithm for Feature Selection”, Int J Intell Syst Appl Eng, vol. 10, no. 3, pp. 356–364, Oct. 2022.



Research Article