Abstract
This paper presents a novel hybrid algorithm based on optimization and machine-learning approaches for solving real-life complex problems. The optimization algorithm is inspired from the searching and attacking behaviors of sandpipers, called as Sandpiper Optimization Algorithm (SPOA). These two behaviors are modeled and implemented computationally to emphasize intensification and diversification in the search space. A comparison of the proposed SPOA algorithm is performed with nine competing optimization algorithms over 23 benchmark test functions. The proposed SPOA is further hybridized with B-J48 pruned machine-learning approach for efficiently detecting the code smells from the data set. The results reveal that the proposed technique is able to solve challenging problems and outperforms the other well-known approaches.
Similar content being viewed by others
Notes
B-J48 pruned is the pruned variant of J48 algorithm. However, algorithm with a “B-” prefix is termed as boosted algorithm.
References
Singh P, Dhiman G (2018) A hybrid fuzzy time series forecasting model based on granular computing and bio-inspired optimization approaches. J Comput Sci 27:370–385
Dhiman G, Kumar V (2018) Emperor penguin optimizer: a bio-inspired algorithm for engineering problems. Knowl Based Syst 159:20–50
Singh P, Dhiman G (2018) Uncertainty representation using fuzzy-entropy approach: special application in remotely sensed high-resolution satellite images (rshrsis). Appl Soft Comput 72:121–139
Dhiman G, Kaur A (2018) Optimizing the design of airfoil and optical buffer problems using spotted hyena optimizer. Designs 2(3):28
Gaurav D, Vijay K (2018) Seagull optimization algorithm: theory and its applications for large-scale industrial engineering problems. Knowl Based Syst 165:169
Gaurav D, Vijay K (2019) KnRVEA: a hybrid evolutionary algorithm based on knee points and reference vector adaptation strategies for many-objective optimization. Appl Intell 1:1–27
Kennedy J, Eberhart RC (1995) Particle swarm optimization. In Proceedings of IEEE international conference on neural networks, pp 1942–1948
Alba E, Dorronsoro B (2005) The exploration/exploitation tradeoff in dynamic cellular genetic algorithms. IEEE Trans Evolut Comput 9(2):126–142
Lozano M, Garcia-Martinez C (2010) Hybrid metaheuristics with evolutionary algorithms specializing in intensification and diversification: overview and progress report. Comput Oper Res 37(3):481–497
Wolpert DH, Macready WG (1997) No free lunch theorems for optimization. IEEE Trans Evolut Comput 1(1):67–82
Kirkpatrick S, Gelatt CD, Vecchi MP (1983) Optimization by simulated annealing. Science 220(4598):671–680
Rashedi E, Nezamabadi-pour H, Saryazdi S (2009) GSA: a gravitational search algorithm. Inform Sci 179(13):2232–2248
Kaveh A, Talatahari S (2010) A novel heuristic optimization method: charged system search. Acta Mech 213(3):267–289
Erol OK, Eksin I (2006) A new optimization method: big bang-big crunch. Adv Eng Softw 37(2):106–111
Kaveh A, Khayatazad M (2012) A new meta-heuristic method: ray optimization. Comput Struct 112–113:283–294
Hatamlou A (2013) Black hole: a new heuristic optimization approach for data clustering. Inf Sci 222:175–184
Formato RA (2009) Central force optimization: a new deterministic gradient-like optimization metaheuristic. Opsearch 46(1):25–51
Holland John H (1992) Genetic algorithms. Sci Am 267(1):66–72
Storn R, Price K (1997) Differential evolution—a simple and efficient heuristic for global optimization over continuous spaces. J Glob Optim 11(4):341–359
Beyer H-G, Schwefel H-P (2002) Evolution strategies—a comprehensive introduction. Nat Comput 1(1):3–52
Koza JR (1992) Genetic programming: on the programming of computers by means of natural selection. MIT Press, London
Simon D (2008) Biogeography-based optimization. IEEE Trans Evolut Comput 12(6):702–713
Slowik A, Kwasnicka H (2017) Nature inspired methods and their industry applications—swarm intelligence algorithms. IEEE Trans Ind Inform 45(99):1–1
Dorigo M, Birattari M, Stutzle T (2006) Ant colony optimization—artificial ants as a computational intelligence technique. IEEE Comput Intell Mag 1:28–39
Yang X-S (2010) A new metaheuristic bat-inspired algorithm. Springer, Berlin, pp 65–74
Karaboga D, Basturk B (2007) Artificial bee colony (ABC) optimization algorithm for solving constrained optimization problems. Springer, Berlin, pp 789–798
Dhiman G, Kumar V (2017) Spotted hyena optimizer: a novel bio-inspired based metaheuristic technique for engineering applications. Adv Eng Softw 114:48–70
Yang XS, Deb S (2009) Cuckoo search via levy flights. In: World congress on nature biologically inspired computing, pp 210–214
Dhiman G, Kumar V (2018) Multi-objective spotted hyena optimizer: a multi-objective optimization algorithm for engineering problems. Knowl Based Syst 150:175–197
Dhiman G, Kumar V (2019) Spotted hyena optimizer for solving complex and non-linear constrained engineering problems. In: Harmony search and nature inspired optimization algorithms. Springer, pp 857–867
Dhiman G, Kaur A (2017) Spotted hyena optimizer for solving engineering design problems. In: 2017 international conference on machine learning and data science (MLDS), pp 114–119
Seyedali M, Mohammad MS, Andrew L (2014) Grey wolf optimizer. Adv Eng Softw 69:46–61
Mirjalili S (2015) Moth-flame optimization algorithm: a novel nature-inspired heuristic paradigm. Knowl Based Syst 89:228–249
Mirjalili S, Mirjalili SM, Hatamlou A (2016) Multi-verse optimizer: a nature-inspired algorithm for global optimization. Neural Comput Appl 27(2):495–513
Mirjalili S (2016) SCA: a sine cosine algorithm for solving optimization problems. Knowl Based Syst 96:120–133
Bonabeau E, Dorigo M, Theraulaz G (1999) Swarm intelligence: from natural to artificial systems. Oxford University Press, Inc., Oxford
Wilcoxon F (1945) Individual comparisons by ranking methods. Biom Bull 1(6):80–83
Chen Q, Liu B, Zhang Q, Liang J, Suganthan P, Qu BY (2014) Problem definitions and evaluation criteria for CEC 2015 special session on bound constrained single-objective computationally expensive numerical optimization. Technical Report, Nanyang Technological University
Korting TS (2006) C4. 5 algorithm and multivariate decision trees. Image Processing Division, National Institute for Space Research-INPE, Sao Jose dos Campos
Arcelli FF, Pietro B, Marco Z (2012) Automatic detection of bad smells in code: an experimental assessment. J Object Technol 11(2):1–5
Abdelmoez W, Kosba E, Iesa AF (2014) Risk-based code smells detection tool. In: The international conference on computing technology and information management (ICCTIM2014)
Rasool G, Arshad Z (2015) A review of code smell mining techniques. J Softw Evolut Process 27(11):867–895
Brown WH, Malveau RC, McCormick HW, Mowbray TJ (1998) AntiPatterns: refactoring software, architectures, and projects in crisis. Wiley, New York
Pressman RS (2005) Software engineering: a practitioner’s approach. Palgrave Macmillan, London
Travassos G, Shull F, Fredericks M, Basili VR (1999) Detecting defects in object-oriented designs: using reading techniques to increase software quality. In: ACM sigplan notices, vol 34, pp 47–56. ACM
Kaur A, Dhiman G (2019) A review on search-based tools and techniques to identify bad code smells in object-oriented systems. In: Harmony search and nature inspired optimization algorithms, pp 909–921
Kaur A, Jain S, Goel S (2017) A support vector machine based approach for code smell detection. In: 2017 international conference on machine learning and data science (MLDS), IEEE, pp 9–14
Ghannem A, El Boussaidi G, Kessentini M (2016) On the use of design defect examples to detect model refactoring opportunities. Softw Qual J 24(4):947–965
Mansoor U, Kessentini M, Maxim BR, Deb K (2017) Multi-objective code-smells detection using good and bad design examples. Softw Qual J 25(2):529–552
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that they have no conflict of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendix: Unimodal, multimodal, and fixed-dimension multimodal benchmark test functions
Appendix: Unimodal, multimodal, and fixed-dimension multimodal benchmark test functions
1.1 Unimodal benchmark test functions
1.1.1 Sphere model
1.1.2 Schwefel’s Problem 2.22
1.1.3 Schwefel’s Problem 1.2
1.1.4 Schwefel’s Problem 2.21
1.1.5 Generalized Rosenbrock’s function
1.1.6 Step function
1.1.7 Quartic function
1.2 Multimodal benchmark test functions
1.2.1 Generalized Schwefel’s Problem 2.26
1.2.2 Generalized Rastrigin’s function
1.2.3 Ackley’s function
1.2.4 Generalized Griewank function
1.2.5 Generalized penalized functions
-
$$\begin{aligned}&F_{12}(z)= \dfrac{\pi }{30}\{10\sin (\pi x_1) + \sum _{i=1}^{29}(x_i - 1)^2[1 + 10\sin ^2(\pi x_{i+1})] \\&\quad + \,(x_n - 1)^2 \} + \sum _{i=1}^{30}u(z_i, 10, 100, 4)\\&\quad -\,50 \le z_i \le 50, \quad f_{\min } = 0, \quad {\mathrm{Dim}} = 30 \\ \end{aligned}$$
-
$$\begin{aligned}&F_{13}(z)= 0.1\{\sin ^2(3\pi z_1) + \sum _{i=1}^{29}(z_i - 1)^2[1 + \sin ^2(3\pi z_i + 1)]\\&\quad + \,(z_n - 1)^2[1 + \sin ^2(2\pi z_{30})]\} + \sum _{i=1}^Nu(z_i, 5, 100, 4)\\&\quad -50 \le z_i \le 50, \quad f_{\min } = 0, \quad {\mathrm{Dim}} = 30 \end{aligned}$$
where \(x_i = 1 + \dfrac{z_i+1}{4}\)
1.3 Fixed-dimension multimodal benchmark test functions
1.3.1 Shekel’s Foxholes function
See Table 10.
1.3.2 Kowalik’s function
1.3.3 Six-hump camel-back function
1.3.4 Branin function
1.3.5 Goldstein–Price function
1.3.6 Hartman’s family
See Table 11.
-
$$\begin{aligned}&F_{19}(z)= -\sum _{i=1}^4c_i \exp \left( -\sum _{j=1}^3 a_{ij}(z_j - p_{ij})^2\right) \\&0 \le z_j \le 1, \quad f_{\min } = -3.86, \quad {\mathrm{Dim}} = 3 \end{aligned}$$
-
$$\begin{aligned}&F_{20}(z)= -\sum _{i=1}^4c_i \exp \left( -\sum _{j=1}^6 a_{ij}(z_j - p_{ij})^2\right) \\&0 \le z_j \le 1, \quad f_{\min } = -3.32, \quad {\mathrm{Dim}} = 6 \end{aligned}$$
1.3.7 Shekel’s Foxholes function
-
$$\begin{aligned}&F_{21}(z)= -\sum _{i=1}^5\left[ (X - a_i)(X - a_i)^{\mathrm{T}} + c_i\right] ^{-1}\\&0 \le z_i \le 10, \quad f_{\min } = -10.1532, \quad {\mathrm{Dim}} = 4 \end{aligned}$$
-
$$\begin{aligned}&F_{22}(z)= -\sum _{i=1}^7\left[ (X - a_i)(X - a_i)^{\mathrm{T}} + c_i\right] ^{-1}\\&0 \le z_i \le 10, \quad f_{\min } = -10.4028, \quad {\mathrm{Dim}} = 4 \end{aligned}$$
-
$$\begin{aligned}&F_{23}(z)= -\sum _{i=1}^{10}\left[ (X - a_i)(X - a_i)^{\mathrm{T}} + c_i\right] ^{-1}\\&0 \le z_i \le 10, \quad f_{\min } = -10.536, \quad {\mathrm{Dim}} = 4 \end{aligned}$$
Rights and permissions
About this article
Cite this article
Kaur, A., Jain, S. & Goel, S. SP-J48: a novel optimization and machine-learning-based approach for solving complex problems: special application in software engineering for detecting code smells. Neural Comput & Applic 32, 7009–7027 (2020). https://doi.org/10.1007/s00521-019-04175-z
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00521-019-04175-z