Genetic Artificial Hummingbird Algorithm-Support Vector Machine for Timely Power Theft Detection

Utilities face serious obstacles from power theft, which calls for creative ways to maintain income and improve operational effectiveness. This study presents a novel hybrid genetic artificial hummingbird algorithm-support vector machine classifier to detect power theft. The proposed algorithm combines the artificial hummingbird algorithm exploration phase with the genetic algorithm's mutation and crossover operators, to optimize the support vector machine's hyperparameters and categorize users as fraudulent or nonfraudulent. It utilizes 7,270 rows of labeled historical electricity consumption data from the Liberia Electricity Corporation over 15 independent runs. The methodology entailed data preprocessing, data split into training, validation, and testing sets in an 80-10-10 ratio, z-score normalization, optimization, training, validation, testing, and computation of six evaluation metrics. Its performance is compared with 13 metaheuristic classifiers and the conventional support vector machine. Findings indicate that the genetic artificial hummingbird algorithm-support vector machine outperforms the 13 rivals and the standard support vector machine in the six assessment measures with an accuracy score of 0.9986, precision of 0.9971, f_score of 0.9986, recall of 1, Matthews correlation coefficient of 0.9972, and g_mean of 0.9987. Furthermore, 90% of the time, Wilcoxon rank-sum tests revealed statistically significant differences between the algorithm and its rivals, demonstrating its superiority. The average run time is 4,656 seconds, the 3rd highest among its competitors. Despite the time complexity trade-off, its excellent performance on the unimodal and multimodal benchmark test functions, placing joint best in 7 out of 7 and 5 out of 6, respectively, provides important insights into the model's capacity to balance exploitation and exploration, improve local search, and avoid becoming stuck in the local optimum. These findings address important metaheuristic optimization gaps highlighting the model's potential for power theft detection.


Introduction
In recent years, addressing electricity fraud detection has garnered signifcant attention as researchers strive to devise robust models for identifying power theft within power grids.Te ramifcations of power theft encompass substantial nontechnical losses, including revenue depletion, compromised service quality, and even potential fre hazards [1].Tis issue is pronounced in countries like Liberia, where electricity access rates remain low, with approximately 12% lacking access and an alarming 60% of generated electricity siphoned of through illegal connections [2].Te existing approach to power theft detection by the Liberia Electricity Corporation (LEC) hinges on manual inspections, a process beset by time constraints and logistical challenges.Despite enacting power theft legislation in 2019, the persistence of power theft underscores the need for a more efective solution that proactively identifes culprits.
Worldwide, diverse strategies encompassing state-based, game theory-based, and artifcial intelligence-based methodologies are explored to tackle power theft.While statebased solutions employ sensors to monitor grid states, their costliness hinders widespread adoption.Game theory-based approaches introduce complexity and can result in a surplus of false positives.Te emergence of artifcial intelligence methods, mainly supervised learning techniques, has garnered attention due to their superior results and costefectiveness [3,4].
However, current AI-driven approaches frequently encounter challenges such as overftting, poor handling of class imbalance, and suboptimal hyperparameter tuning, which limits their performance in practical scenarios.Current literature underscores the need for more efective optimization of machine learning models for fraud detection in electricity grids, particularly in overcoming the limitations of existing AI-based approaches, requiring a method that prevents overftting, addresses class imbalance, and optimizes hyperparameters to signifcantly enhance model performance.Conventional optimization techniques such as grid search are frequently computationally intensive and may not deliver optimal results.Hence, there is a compelling need for a novel approach that leverages the strengths of advanced metaheuristic algorithms for enhanced optimization.
In this context, this study introduces an innovative approach by combining the genetic algorithm's operators and the artifcial hummingbird algorithm to optimize the support vector machine for power theft detection.Te genetic algorithm (GA) is known for its robust exploration capabilities and ability to prevent premature convergence through its use of crossover and mutation operators, while the artifcial hummingbird algorithm (AHA) excels in exploitation and local search tasks by mimicking the foraging mechanisms of hummingbirds.By merging these algorithms, a balance between exploration and exploitation is struck, ultimately enhancing the optimization process.Tis approach aligns with Wolpert's no free lunch theorem, which states that no single algorithm is universally optimal for all optimization problems [5].
Support vector machine (SVM) is the choice of classifer due to its efectiveness in handling high-dimensional spaces and its robustness against overftting.SVM's ability to draw a clear boundary between fraudulent and nonfraudulent users makes it well suited for binary classifcation problems such as fraud detection.While algorithms like XGBoost or AdaBoost are powerful, SVM's capability to handle nonlinear relationships through the kernel trick makes it a ftting choice for this problem.Additionally, SVM's proven performance in similar applications provides a solid foundation for this hybrid model.
Te primary objective of this study is to optimize SVM hyperparameters using the GAHA approach, thereby enhancing the classifcation accuracy for fraud detection.Specifcally, it aims to evaluate the GAHA-SVM model's performance using a comprehensive suite of evaluation metrics, including accuracy, precision, recall, f_score, MCC, and G_mean, and compare it against a spectrum of 13 bio-inspired classifers and the traditional SVM grid search.Subsequent analysis answers the research questions: (1) How does the hybrid genetic artifcial hummingbird algorithm compare to the conventional SVM grid search method in optimizing SVM's C and gamma hyperparameters?(2) To what extent do genetic algorithm mutation operators enhance the exploration capabilities of the artifcial hummingbird algorithm in achieving better optimization results?(3) What are the performance metrics such as accuracy, precision, f_score, recall, MCC, and gscore for the proposed algorithm, and how do they refect its efectiveness?(4) In what ways does the hybrid genetic artifcial hummingbird algorithm outperform or underperform in comparison to the 13 other classifer algorithms (particle swarm optimization [6], grey wolf optimization [7], artifcial hummingbird algorithm [8], cuckoo search [9], squirrel search algorithm [10], genetic algorithm [11], ant colony optimization [12], bat algorithm [13], glowworm swarm optimization [14], fruit fy optimization [15], invasive weed optimization [16], fower pollination algorithm [17], and dolphin echolocation algorithm [18]).Te ensuing interpretations and implications establish the GAHA-SVM model as an innovative and efective tool for detecting power theft.It further advances the feld of metaheuristic optimization by addressing pertinent research gaps.
Te study's major contributions are as follows: (i) Firstly, comprehensive data preprocessing is done on the original dataset.Tis involves removing rows with missing values and replacing outliers with median values using z-score analysis.(ii) Additionally, the downsampling method addresses the dataset's class imbalance ensuring an equal distribution of fraudulent and nonfraudulent instances.Secondly, the preprocessed data get split into training, validation, and testing sets.(iii) Tirdly, normalization is carried out using mean and standard deviation values obtained exclusively from the training set, thus preventing any investigation of the test data before model evaluation.(iv) Fourthly, the GAHA-SVM algorithm performed the optimization within the training set to identify the best C and gamma hyperparameters for training the SVM model, with the data validation ensuring the model is generalized well without overftting.(v) Finally, the model is evaluated on a separate testing set using six evaluation metrics: accuracy, precision, f_score, recall, g mean, and MCC, to assess its performance.
Te paper is organized as follows: Te literature review section discusses previous research on optimization algorithms, identifes gaps in current knowledge, and establishes the context for the study.Te methodology section outlines the methods used to address the research questions and develop solutions.Te results section presents the research fndings, supported by fgures and tables.Te discussion sections analyze and interpret the research fndings in the context of previous literature, and the study is summarized in the conclusion section.

Literature Review
Support vector machines (SVMs) are a widely used supervised learning algorithm, showing immense success in various felds.SVMs create decision boundaries to distinguish between classes, but overftting can lead to poor performance on new or unseen data and require their hyperparameter tuning before training [19].Metaheuristic algorithms, a class of optimization algorithms helpful in solving complex problems where traditional mathematical methods are not feasible due to their ability to balance 2 Te Scientifc World Journal exploitation and exploration [20], have emerged as powerful tools for optimizing support vector machines' hyperparameters.Te optimal selection of machine learning algorithms' hyperparameters is crucial to achieving high modeling accuracy.In [21], Ali et al. noted that the large size of the problem space made fne-tuning hyperparameters a computational challenge asserting that traditional random search or grid search optimization techniques lead to slow convergence or long execution time at times.Tey tried several algorithms as an alternative to the grid search and reported GA as the most efective since it had a lower temporary time-consuming complexity than other algorithms.Te authors of [22] showed that using GA to select SVM's radial basis kernel's optimal regularisation parameter (C) and cost factor gamma was proftable as machine learning hyperparameters' manual grid search tuning is very time-consuming.Tey further demonstrated that an SVM model with hyperparameters tuned by GA gave superior classifcation performance on face recognition models in contrast to the linear SVM in most data splits.

Review of Artifcial Hummingbird Algorithm (AHA)
Needs for Hybridization.Te artifcial hummingbird algorithm (AHA) is an optimization algorithm developed by Zhao et al. [8] that mimics the intelligent behavior of hummingbirds.It utilizes visit tables, hummingbirds, and food sources as signifcant components.Visit tables store diferent hummingbirds' visitor levels for each food source and show the time since a particular hummingbird's last visit.Te most visited food sources for a specifc hummingbird have an extra preference for gleaning more nectar.Hummingbirds use visit tables to arrive at their food source, updating these tables at every iteration.Algorithm 1 shows the general structure of AHA [8].Hummingbirds are frst positioned at n food sources before being initialized randomly by the following equation: (1) Low is a d-dimensional problem's lower bound, Up is its upper bound, r is a randomized vector [0, 1], x i represents the ith food source position (the problem's solution), i is the food source index, and n is the population size.
Equation (2) gives the visit table initialization: where i � j, VT ij � null means the hummingbird is feeding at its given food source while i ≠ j, and VT ij � 0 shows that the ith hummingbird had just visited the jth food source in the current iteration.Hummingbirds use guided foraging to fnd the most visited food sources and select the best nectar reflling rate.Tey use axial, radial, and omnidirectional fight skills to reach the food source.A directional switch vector controls the availability of directions in d-dimensional space.Equation (3) gives the axial fight in d-dimension space.
where D (i) is the axial fight, randi ([1, d]) generates an integer randomly between 1 and d, d is the problem space dimension, and i represents the food source index.Equation (4) gives the diagonal fight.
where D (i) is the diagonal fight, randperm(k) generates an integer permutation randomly between 1 and k, j is the dimension index, k is the number of elements to permute, i represents the food source index, and P(j) is the probability for the j th dimension food source.Equation (5) gives the omnidirectional fight.
where D (i) 1 is the omnidirectional fight, i is the food source index, and d is the problem space dimension.Tese given fight skills mathematical models imitate the hummingbirds' searching behavior in multidimensional 3D space.Equations ( 6) and (7) provide the candidate's food source and guide foraging behavior.
In equation ( 6), V i (t + 1) is the i th food source at a time (t + 1), x i (t) is the food source at the i th position during time t, x i,tar (t) denotes the food source that the ith hummingbird wants to fy to, D is the problem space dimension, and t is the current time step.In equation (7), a stands for the guided factor given as a normal distribution N (0, 1) where the mean is zero, the standard deviation is one, and N is the population size.Te ith food source position gets updated by where x i (t + 1) is the position of the i th food source at the next step time (t + 1), f (.) is the function's ftness value, and x i (t) and v i (t + 1) remain the same as defned above in equation (6).Food sources are not changed during guided foraging unless the hummingbird fnds a food source with a better nectar refll rate.Territorial foraging and the candidate food source are given mathematically by equations ( 9) and (10).
In equations ( 9) and ( 10), b represents the territorial factor, its normal distribution is N (0, 1), where the standard deviation is one, and the mean is zero.X i (t) and v i (t + 1) and N remain the same as defned in equations ( 6) and (7), respectively.After the territorial foraging strategy, the visit tables get updated.
Te migratory foraging strategy in AHA involves a migration coefcient that enables hummingbirds to randomly migrate to new food sources when their nectar reflled randomly slows.Equation (11) represents the randomly produced migratory foraging strategy.
In equation (11), x wor represents the food source whose nectar takes the longest to refll, Low, Up, and r remain the same as defned in equation (1), and (t + 1) is the next step time after time (t).
Migratory foraging increases exploration and reduces the change of convergence into local optima.Higher exploitation occurs when an updated new food source drives hummingbirds to fy towards it.In the worst-case scenario, a hummingbird might visit a new target food source after 2n iterations, requiring the migration foraging strategy to explore the search space and improve stagnation.Equation (12) gives the migration coefcient relative to the population size.
where M is the migration coefcient relative to the population size and n remains the same as given in equation (1) In [8], Zhao et al. used two benchmark functions to test the AHA optimization performance and suggested the hybridization of AHA with stochastic operators or other optimization methods' search components to develop a better version for tackling binary or multiobjective problems.Many works have been done focusing on improving the exploration of AHA.Te authors of [23] specifed that although the artifcial hummingbird algorithm has the advantages of a simplistic structure, ease of implementation, and speed in fnding the global optimum solution, it faces limitations such as low convergence accuracy and getting stuck in the local optima.Teir proposed hybrid-artifcial hummingbird algorithm which incorporated PSO and Cauchy mutation to increase population diversity, improve accuracy and convergence, and prevent the AHA from being stuck in the local optimum was used to optimize complex shape-adjustable generalized cubic Ball (CSGC-Ball) curves and show competitive results and practicality in comparison to other advanced algorithms.In [24], the authors moved by AHA's imbalance in exploration and exploitation, premature convergence, and low precision introduced a hybrid artifcial hummingbird algorithm called LCAHA which utilized Levy fight to introduce population diversity and prevent premature convergence.Teir hybrid algorithm was tested on six engineering optimization cases and the 23 classical test suites where it demonstrated promising results and potential for solving practical applications.In [25], Abd Elaziz et al. introduced an enhanced version of AHA using a quantum-based optimization to improve its exploration ability.It showed good accuracy on their social IoT data but sufered time complexity.Alhumade et al. noted in [26] that AHA uses the visit table as an update to balance exploitation and exploration, efciently exploring new regions while promisingly exploiting local solutions.However, AHA's exploration is not as robust as other algorithms causing it to get stuck in the local optima at times and thus return suboptimal solution.

Review of Machine Learning Classifers and Metaheuristic
Optimization Techniques for Various Applications.Te accuracy of diferent machine learning models in identifying power theft was assessed in [27].At 81%, the SVM model was the most accurate, followed by Naive Bayes (68%), Knearest neighbors (79%), random forest (80%), and logistic regression (69%).Te study also noted improvements in accuracy ranging from 3.8% to 11% compared to similar studies when comparing these results with earlier research.Nevertheless, because of inadequate data, the authors recognized that they could not accurately classify about 25% of cases of electricity theft.
Similarly, machine learning classifers such as decision tree, SVM, Naive Bayes, and random forest were evaluated for accuracy [28].With an accuracy of 72.5%, the decision tree model outperformed SVM, which came in last at 65.2%.Notably, after correcting for missing values through data preprocessing, the decision tree accuracy increased to 91.3%.It was deduced that decision trees perform better than other classifers when data preparation was used.
Mia et al. [29] concentrated on using feature engineering and ensemble classifcation approaches to improve the detection of power theft.Several machine learning classifers, Te study highlights the model's adaptability to evolving risks and low maintenance costs but also acknowledges limitations in the optimization method and dataset scope.
In [32], Hassaballah et al. introduced an automated arrhythmia classifcation approach using metaheuristic optimization to enhance ECG analysis.Te study achieved exceptional accuracy of 99.92% and sensitivity of 99.81% with SVM, KNN, GBDT, and RF classifers.Experiments on three datasets demonstrated signifcant improvements, surpassing existing approaches.Further validation across diverse datasets and improved optimization methodologies are recognized as necessary.
Todorovic et al. in [33] utilized an augmented sinecosine algorithm (SCA) to optimize hyperparameters for the XGBoost model used to predict audit opinions.Te study used a dataset of 12,690 observations from Serbian companies, inclusive of existing and new clients.Te improved model outperformed previous benchmarks, and SHAP value analysis provided insights into variable impacts, demonstrating the efcacy of combining metaheuristics with machine learning for audit opinion prediction.
In a study, published in the "Handbook of Whale Optimization Algorithm: Variants, Improvements, Hybrids, and Applications," Oladayo Oladejo et al. [34] studied the use of the whale optimization algorithm (WOA) and its modifcations to tune SVM hyperparameters using seven datasets.SVMs tuned using LWOA and WOAmM obtained the best classifcation accuracy, whereas WOA and MSWOA required the lowest tuning durations.Tis study demonstrates the usefulness of metaheuristics in balancing accuracy and computing economy for SVM hyperparameter adjustment.
Unlu [35] employed a hybrid model that included support vector machine (SVM) and Bayesian optimization (BO) to forecast credit card client attrition.Te study tested four kernels (linear, polynomial, radial basis, and sigmoid) and showed that the linear kernel performed best, with an accuracy of 91%.Te sigmoid kernel has the lowest accuracy, 84%.While BO successfully enhanced SVM hyperparameters, the study recommends conducting more research to evaluate alternative hyperparameter optimization methods and investigate other machine learning and deep learning algorithms for better churn prediction.
Abbas et al. [36] performed a comparison of hyperparameter optimization strategies for machine learning models utilized in landslide susceptibility mapping.Te study focused on metaheuristic and Bayesian approaches, emphasizing their performance advantages over baseline algorithms.Metaheuristic algorithms boosted random forest model performance by up to 5% over grid search and random search approaches, while Bayesian optimization increased SVM accuracy by 6%.Te study proposes that future research should investigate similar strategies in larger geographical contexts to improve model robustness and predictive capabilities.
Te authors in [37] investigated metaheuristic optimization of deep learning (DL) models in energy load forecasting.After evaluating six algorithms, including the frefy algorithm (FA), they discovered that FA outperformed grid search with an R 2 of 0.954082.Tis work emphasizes metaheuristics' usefulness in enhancing DL model correctness and calls for more research into advanced DL architectures and optimization methodologies.Dobrojevic et al. [38] presented a unique CNN-ELM-HASCA hybrid model for IoT intrusion detection, which employs a modifed sine-cosine algorithm (SCA) for parameter tuning.Tis technique outperforms seven previous metaheuristic algorithms examined, with classifcation accuracy of 98.67% and 96.65% on Windows 7 and Windows 10 IoT datasets, respectively.Tey proposed automating CNN structure optimization, verifying the model on various datasets, and investigating hybrid metaheuristic methodologies to improve IoT security solutions in future studies.

Review of Competitor Algorithms as Optimizers.
Bio-inspired algorithms, which mimic living organisms' biological activities, have gained momentum in solving engineering problems [39][40][41].Despite the multiplicity of works in that domain, the no free lunch optimization theorem states that there will never be an algorithm to solve all optimization problems efectively [5].
Genetic algorithm (GA) solves complex optimization problems by mimicking selection, crossover, and mutation behaviors.It initializes a population of individuals for each candidate solution, which evolves with these operators over time.Te best individuals are used in the generation of a new population.However, it is prone to early convergence, and optimum performance depends on selected crossover rates, mutation, and objective function selection [5,11].Te need to best utilize GA in hybridized algorithms to cover their Te Scientifc World Journal inherent weakness has been covered in many studies.In their research, the authors of [42] emphasized that GA's successful implementation greatly hinges on its crossover and mutation operators since they reduce premature convergence.Tey further noted the computational efciency of genetic algorithms as an area needing improvement.In [43], the authors extolled the virtues of GA as an adaptive technique used to solve complex problems and endorsed it for solving hybrid computational challenges.In [44], the authors noted that in certain situations, genetic algorithms are overkill, and to make them more efcient and efective, they should be hybridized with other techniques, and they made calls for future research to focus on the development of hybridized models to enhance efciency.
Te glowworm swarm optimization (GSO) is a swarm optimization algorithm that mimics the glow behavior of glowworms.It is competent in capturing the objective function's local optimum in infnite dimensional vector space; however, its reliance on a fxed step size, with the standard suggested fxed step size being 0.03, leads to a trade-of between convergence speed and accuracy [14].
Fruit fy optimization (FFO) is useful for difcult optimization problems and is modeled on how the fruit fy searches for food.Although fast, simply structured, and easy to implement, FFO's minimal accuracy in converging to the minimal point 0 in the single-peak function (F1) as well as slow convergence speed across the single dimensional multipeak functions (F2 and F3) and the multidimensional single-peak functions (F4 to F6) when contrasted with the adaptive FFO shows that FFO does get trapped in the local optima and struggle to efciently fnd the global optimum [15].
Particle swarm optimization (PSO) is a well-known bioinspired method that copies focking birds' social behavior.Te tendency of PSO to get stuck in the local optima in highdimensional space and its low convergence rate were highlighted by the PSO's poor search accuracy and convergence performance on the Rosenbrock and Griewank functions.A new directed weight complex network PSO (DWCNPSO algorithm) was proposed to address these shortcomings [6].
Cuckoo search (CS) models the cuckoo's reproduction and Levy fight behavior.When compared to a variable length cuckoo search (VLCS) which incorporates variable length solution representations, the original CS algorithm showed a 20% slower convergence speed and a 15% larger distance to the global optimum.Te quantitative improvements on the CS by the VLCS show the original CS's poor exploitation and low precision when converging [9].
Bat algorithm (BA) is modeled on micro-bat echolocation behavior and is useful for solving constrained and unconstrained optimization problems.However, the standard BA gets trapped in the local optima and also yields unstable results.An improved bat algorithm (IBA) algorithm is proposed in the study and it showed around 30% improvement in convergence speed and 25% reduction in optimization instability [13].
Te squirrel search algorithm (SSA) is based on the foraging behavior of squirrels.Although its search space exploration is efective for multidimensional optimization problems, it exhibits decreased accuracy and slower convergence rates with higher dimensions from 30 to 100.Its performance diminished in reaching optimal solutions particularly when compared with the improved squirrel search algorithm (ISSA) and other competitors across various benchmark functions [10].
Dolphin echolocation algorithm (DEA) is a bioinspired algorithm inspired by the echolocation behavior of dolphins.It has few parameters to set and gives excellent results with low computational eforts but needs balance in its exploration and exploitation.In [18], the authors demonstrated DEA's inferior exploration and exploitation by modeling an improved dolphin echolocation algorithm (IDEA) with SVM, KNN, and NB.Tis improved algorithm bested the normal DEA-SVM in all classifcation metrics across various ranges of cancer tweet datasets.For instance, considering 5000 cancer tweet datasets, IDEA-SVM accuracy, precision, recall, and f_score of 96.58%, 99.12%, 96.54%, and 97.5% outperformed their corresponding DEA-based classifers.
Ant colony optimization (ACO) is an algorithm inspired by real ants' foraging behavior, used to approximate solutions to complex problems.It uses pheromone trails to fnd the shortest route between ants' nests and food sources on a weighted graph.However as shown by the authors in [12], traditional ACOs sufer from low efciency and convergence issues.In the path planning task, they exhibited stagnation and a slow convergence rate, reaching only 50% of the optimal solution within 100 iterations.
Te fower pollination algorithm (FPA) is an efcient metaheuristic inspired by the pollination of fowering plants.It is simple to formulate, gives high computational performance, and has cross-domain applicability, but its optimal parameters depend signifcantly on the objective functions.Te problem dimensions and afordable computational cost and the ones that minimize mean prediction error do not always ofer the most robust predictions.Te research showed that optimum population size, scale factor, and switch probability should be between 20 and 40, 0.1 and 1.0, and 0.2 and 0.4, respectively [17].
Te grey wolf optimization (GWO) algorithm is modeled after the grey wolf pack hierarchy and hunting behavior.Te authors in [7] highlighted that traditional GWO faces instability and convergence issues and ofered an improved GWO based on an improved dynamic weighing strategy for mobile robot path planning.Across 15 benchmark functions, the results show that the improved GWO ofers better solution speed and accuracy.
Invasive weed optimization (IWO) is a population-based evolutionary optimization method inspired by weed colonies.While it has good exploration, its poor exploitation ability causes it to get trapped in the local optimum and converge prematurely when solving complex problems.Te authors in [16] ofered an improved chaotic IWO to set the optimal parameter of the PID controller and compared the results with the normal IWO.Te improved version gives a better settling time of 0.690 seconds to 0.344 seconds, a better cost function of 8.0369 to 23.0944, and better convergence than the ordinary one.

6
Te Scientifc World Journal In summary, despite having a wide range of applications, general bio-inspired algorithms face one or more issues such as an imbalance in exploration and exploitation, getting trapped in the local optimum, premature convergence, poor local search ability, or computational expense necessitating improved versions.

. Proposed Genetic Artificial Hummingbird Algorithm-Support Vector Machine
Segera et al. noted in [45] that exploration and exploitation are antagonistic principles that require balancing for metaheuristics to improve performance.Tey suggested the development of a memetic algorithm whereby an integration of two or more algorithms is done to enhance overall performance.Te authors of [46] noted that swarm-based algorithms' success is highly dependent on the balance between exploitation and exploration.In this light, a genetic artifcial hummingbird algorithm (GAHA) is proposed for optimizing the support vector machine to perform the classifcation of electricity users.

GAHA-SVM Optimization vs. SVM's Grid Search.
Traditionally, grid search has been a popular method for hyperparameter tuning, where a predefned grid of hyperparameter values is exhaustively searched to fnd the best combination.Using the RBF function, the SVM performs the grid search by evaluating the model's performance over diferent combinations of C and gamma from the predefned grid range of C � [2 −5 , 2 3 ] and gamma � [2 −2 , 2 3 ].Stratifed hold-out cross-validation done in an 80-10-10 (training, validation, and testing) ratio prevents the model from overftting and ensures it can generalize on unseen data.Performance metrics such as accuracy, precision, f_score, recall, g mean, and MCC are calculated for each combination of C and gamma values in the grid and compared across every hyperparameter confguration to identify the combination yielding the highest performance.Once the optimal hyperparameters from that process are identifed, the fnal model is trained, its performance is evaluated on the independent test set, and the evaluation metrics are computed.
In contrast, GAHA-SVM uses a hybrid method combining the genetic algorithm's mutation and crossover operators with the artifcial hummingbird migratory foraging stage to efciently search for the optimal C and gamma hyperparameters.Hyperparameters are initiated over the range of C � [2 −5 , 2 3 ] and gamma � [2 −2 , 2 3 ].Te population of 20 hummingbirds is iteratively evolved based on the population's ftness.Te algorithm uses the hummingbird's guided foraging when a randomly generated number (rand) is less than 0.5, territorial foraging when it is greater than 0.5, and migratory foraging after every four iterations to search the search space.Radial fight is utilized if the random number is less than 1/3 and omnidirectional fight is utilized if it is greater than 2/3, and axial fight is used otherwise.During migratory foraging, the best-performing individual in the population undergoes genetic algorithm operations (mutation and crossover) to generate new ofspring solutions bringing diversity to the population and allowing for exploration of new regions in the search space.Each solution ftness is evaluated using the GAHA-SVM's model performance on the validation set and the best solution is updated if a better one is found.If, after ffteen iterations, the difference between the current best ftness and the best ftness ffteen iterations ago is less than the best ftness error of 1e − 10, the loop can be broken, and the algorithm is considered to have converged.If not, it continues for the specifed number of iterations (100).Tis hybrid approach ensures adaptive exploration and exploitation of the hyperparameter space leading to improved convergence.Te optimal C and gamma hyperparameters selected from this process are used to predict a separate testing set and then compute the evaluation metrics.
Te GAHA-SVM search is more advantageous when compared to the SVM's traditional grid search.Te iterative adjustments based on ftness values allow for a more efcient exploration and exploitation of the search space when contrasted with grid search which relies on a fxed grid of hyperparameter values.Next, the usage of the genetic mutation and crossover operators during the GAHA search promotes population diversity and prevents premature convergence to suboptimal solutions.For these reasons, the GAHA-SVM search efectively converges and produces superior optimal C and gamma hyperparameters when contrasted with the grid search.

Improvement on Bio-Inspired Optimizers' Shortcomings.
Hybridizing the artifcial hummingbird algorithm with genetic algorithm's mutation and crossover operators can lead to a more versatile and efcient optimizer with improved performance and the potential to address the most common pitfalls of bio-inspired optimizers, as outlined below.
where S i is the selected individual, i is the chromosome, and f(i) is the ftness of the i th chromosome.Whether crossover occurs is decided by where P is the crossover probability, c is the crossover individual, m is the mutated individual, π is the bestperforming hummingbird from the previous generation, r [0, 1] is a uniformed random number, and Co is the crossover operation.Te crossover operation gets initiated when the randomly produced number is less than the crossover probability, r < P, to produce the crossover individual (c).
Te formula for the mutation operation is given by where Pm is the mutation probability, and the defnition of m, r, and π remains the same as defned in equation ( 14).If the randomly created number is less than the mutation probability, we retain the previous best-performing hummingbird.Otherwise, we swap that hummingbird with the mutated individual.Te algorithm's best ftness and its corresponding solutions are updated accordingly.Algorithm 2 summarizes the genetic operation during the GAHA-SVM migratory foraging stage.Te algorithm checks the diference between the last ffteen best ftness values and the current best ftness value using equation (16).If the diference is less than the best ftness error, it breaks the loop and returns the best solutions BestX_C and BestX_gamma.
where It is the iteration, HisBestFit is the history of the best ftness, and error_BF is a very small value required to terminate the iterations.Te complexity of the proposed GAHA in terms of ftness function evaluations is given as follows: (1) Initialization and data preparation:  GAHA's overall complexity per iteration is thus summarized in the following equation: MaxIter is the maximum number of iterations, P is the population size, d is the hyperparameter space dimensionality, N is the SVM evaluation complexity, and O is the algorithm's upper bound.
Te basic GA evaluates ftness using a straightforward evolutionary approach that depends on population size and generations and is given by 8 Te Scientifc World Journal O Generations.
where Generations represent the number of iterations the GA runs, P is the population size, d is the hyperparameter space dimensionality, N is the SVM evaluation complexity, and O is the algorithm's complexity upper bound.
Basic AHA evaluates ftness similar to GAHA using hummingbird foraging behaviors and memory updates and is dependent on population size, iteration number, and dimensionality.It is given by where MaxIter is the maximum number of iterations, P is the population size, d is the hyperparameter space dimensionality, N is the SVM evaluation complexity, and O is the algorithm's complexity upper bound.GAHA combines the benefts of AHA and GA leading to better optimization results but at higher computational cost.Tough GAHA and AHA share a similar complexity structure, GAHA is possibly more complex due to the additional GA phase, while GA is less complex in terms of FFEs compared to both.
GAHA ofers novelty in comparison to the original AHA in the ways outlined below: (a) Frequency of Migratory Foraging Interval.GAHA ofers an alternate approach to migratory foraging by altering the exploration frequency from 2n to n/5, a 95% increase in exploration frequency, where n is the population size.By extension, GAHA also varies from the competitor algorithms in this study in the following way: (1) Adaptive Migratory Foraging with Genetic Elements.
Although GA utilizes genetic operators, GAHA specifcally adapts the migratory foraging intervals and employs genetic mechanisms during the exploration, ofering a hybrid approach.Te rest of the competitor algorithms do their exploration without the incorporation of genetic mechanisms.(2) Dynamic Solution Replacement with Stochastic Processes.GAHA introduces stochastic processes during dynamic solution replacement, combining genetic operators with randomness for improved adaptability and exploration while the competitor algorithms, GA aside, use a deterministic replacement strategy during exploration.
In summary, GAHA's novelty lies in its altered migratory foraging intervals, the integration of genetic mechanisms during exploration, dynamic solution replacement with stochastic processes, and combining the AHA traditional foraging strategies with genetic elements.Tese characteristics distinguish it from other optimization algorithms and give it a better chance of fnding the best optimal solutions.Te pseudocode for the GAHA-SVM model is given by Algorithm 3 and its fowchart is shown in Figure 1.

Methodology
Simulations were done in MATLAB R2023a software using a Lenovo IdeaPad Slim 7 Pro I4IHUS computer with Intel (R) Core ™ i7-11370H @3.30GHz.It has an installed RAM of 16 GB and a ROM of 952 GB running on a 64 bit operating system, x64-based processor.In addition to its ease of learning and user-friendly interface, MATLAB provides Te Scientifc World Journal strong visualization and plotting capabilities thanks to its nice toolbox for graphical works.Furthermore, it provides excellent support for optimization and numerical analysis problems thanks to its optimization toolbox.20) and ( 21) perform outliers' replacement and Z-score normalization, respectively.
where std (x) was the standard deviation of x, avg (x) was x's average value, xi is a particular instance of x, and f(xi) is the new value in the case that outlier replacement was done.
( Te Scientifc World Journal 11 where Z is the feature normalized value, A represents the dataset, std is the standard deviation, and the mean is the average.Z-score normalization, also known as standardization, is a crucial preprocessing step in machine learning to ensure that the features have similar scales and distributions.Te mean and standard deviation for the normalization are calculated solely from the training dataset preventing data leakage.

GAHA-SVM Classifcation.
Te GAHA-SVM classifer inputs the balanced data table created after the preprocessing step.It randomly selects 7,270 samples for the model.Te selection is randomized to prevent bias and overftting.Tis process is repeated 15 times to ensure there is no bias and the results are averaged at the end.Of these 7,270 samples, 80 percent is used to train the model, 10 percent is used for validation, and 10 percent is used for testing the model.Te model utilizes a benchmark function for calculating the best ftness, a grid search function that defnes the range over which the C and gamma hyperparameters are being searched, a prediction function for calculating the mean of the model's confusion matrix, the main function of the code, and the genetic algorithm function with its associated fles.Te optimization algorithm was initiated with a population size (nPop) of 20 hummingbirds and a maximum iteration of 100 over 15 dimensions (dim).Te rand function randomly generates the position of each hummingbird in the search space.Te RBF kernel function is used because of its ability to capture complex nonlinear relationships in the data.Te hyperparameters' grid search range was set at C � [2 −5 , 2 3 ] and gamma � [2 −2 , 2 3 ] with the upper and lower bounds specifed as (Low_C, Up_C) and (Low_gamma, Up_gamma), respectively.Te visit table for keeping track of the number of times each hummingbird in the population visits a given position is initialized as NaN values.Te best ftness (BestF) and the best solutions (BestX_C and BestX_gamma) were initialized as an empty array.Te best ftness error (error_BF) required to terminate the iterations was set at 1e − 10.Te algorithm updates the best ftness value and solutions every iteration.If, after ffteen iterations, the diference between the current best ftness and the best ftness ffteen iterations ago is less than the best ftness error, the loop can be broken, and the algorithm is considered to have converged.If not, it continues for the specifed number of iterations.Te algorithm returns the mean of the best hyperparameters, the best ftness, the history of the best ftness, and the visit table.Te ftcsvm model uses the best C and gamma hyperparameters to perform classifcation based on the test data.Te confusion matrix and the model's accuracy, precision, f_score, recall, MCC, and g scores are all returned.

Comparison with Other Classifers.
Te assessment outcomes from the GAHA-SVM were compared to those of thirteen other classifer algorithms that were executed.Consistent with the GAHA-SVM's design, 7270 instances of the data were randomly selected and utilized for each model, with 80% of the data being used for model training 10% being reserved for validation, and another 10% for testing.Tis was repeated 15 times and the results were averaged to ensure there was no bias.Te same convergence condition was set as follows: if after ffteen iterations, the diference between the current best ftness and the best ftness ffteen iterations ago is less than the best ftness error, the loop should be broken, and the algorithm is considered to have converged.Te best solutions (BestX_C and BestX_gamma) over the 15 dimensions are returned and used by the ftcsvm model for classifcation.Te model performs classifcation on the test data and returns the confusion matrix mean taken over the ffteen dimensions.It also returns the model's accuracy, precision, f1score, recall, MCC, and g score and the history of the best ftness.Te ftness function which assesses the GAHA and its competitors' classifcation accuracy on the validation set is given by Algorithm 4.
Te objective function of the optimization aims to minimize the classifcation error rate of the SVM model.Tis is achieved by optimizing the hyperparameters C and gamma to achieve the highest accuracy on the validation set.Tis means minimizing the ftness values as given by equation ( 22) below: where Fit is the ftness value representing the objective function being minimized, mean is the average accuracy of the SVM model on the test set, and accuracies represent an array representing the proportion of correct prediction made over each run over the test set.Te PSO-SVM algorithm was initiated with a population size (nPop) of 20 particles, a dimension (dim) of 15, and a Maximum Iteration (MaxIt) of 100.Te hyperparameters' grid search range was set at C � [2 −5 , 2 3 ] and gamma � [2 −2 , 2 3 ] in the Grid Search function.Te inertia weight (w) was set at 0.7, and the cognitive weights 1 and 2 were set at 0.2.
Te AHA-SVM algorithm was initiated with a population size (nPop) of 20 hummingbirds, a dimension (dim) of 15, and a Maximum Iteration (MaxIt) of 100.Te visit table for keeping track of the number of times each hummingbird in the population visits a given position is initialized as NaN values.Te hyperparameters' grid search range was set at C � [2 −5 , 2 3 ] and gamma � [2 −2 , 2 3 ] in the Grid Search function.
Te DEA-SVM algorithm was initiated with a population size (nPop) of 20 dolphins, a dimension (dim) of 15, and a Maximum Iteration (MaxIt) of 100.Te hyperparameters' grid search range was set at C � [2 −5 , 2 3 ] and gamma � [2 −2 , 2 3 ] in the Grid Search function.Te search area was set at 0.5, and the detection range was set at 0.1.

12
Te Scientifc World Journal Te BA-SVM algorithm was initiated with a population size (nPop) of 20 bats, a dimension (dim) of 15, and a Maximum Iteration (MaxIt) of 100.Te hyperparameters' grid search range was set at C � [2 −5 , 2 3 ] and gamma � [2 −2 , 2 3 ] in the Grid Search function.Te loudness was set at 1, the pulse rate at 0.5, and both the loudness scaling factor and pulse rate scaling factor at 0.9.
Te SSA-SVM main code was initiated with a population size (nPop) of 20 squirrels, a dimension (dim) of 15, and a Maximum Iteration (MaxIt) of 100.Te hyperparameters' grid search range was set at C � [2 −5 , 2 3 ] and gamma � [2 −2 , 2 3 ] in the Grid Search function.Te maximum gliding distance was set at 1.11, the minimum gliding distance at 0.5, and the gliding constant at 1.9.
Te GSO-SVM algorithm was initiated with a population size (nPop) of 20 glowworms, a dimension (dim) of 15, and a Maximum Iteration (MaxIt) of 100.Te hyperparameters' grid search range was set at C � [2 −5 , 2 3 ] and gamma � [2 −2 , 2 3 ] in the Grid Search function.Te glowworms' sensing range was set at 3, and the detection range was set at 0.4.
Te IWO-SVM algorithm was initiated with a population size (nPop) of 20 weeds, a dimension (dim) of 15, and a Maximum Iteration (MaxIt) of 100.Te hyperparameters' grid search range was set at C � [2 −5 , 2 3 ] and gamma � [2 −2 , 2 3 ] in the Grid Search function.Te weed's probability of reproduction was set at 0.8, with the possibility of elimination and dispersion set at 0.1.
Te ACO-SVM main code was initiated with a population size (nPop) of 20 ants, a dimension (dim) of 15, and a Maximum Iteration (MaxIt) of 100.Te hyperparameters' grid search range was set at C � [2 −5 , 2 3 ] and gamma � [2 −2 , 2 3 ] in the Grid Search function.Te ant's pheromone importance factor was set at 1, the heuristic importance factor at 2, and the pheromone evaporation rate at 0.1.
Te CS-SVM main code was initiated with a population size (nPop) of 20 cuckoos, a dimension (dim) of 15, and a Maximum Iteration (MaxIt) of 100.Te hyperparameters' grid search range was set at C � [2 −5 , 2 3 ] and gamma � [2 −2 , 2 3 ] in the Grid Search function.Te probability of egg discovery was set at 0.25, and the step size was set at 0.1.
Te GA-SVM main code was initiated with a population size (nPop) of 20, a dimension (dim) of 15, and a Maximum Iteration (MaxIt) of 100.Te hyperparameters' grid search range was set at C � [2 −5 , 2 3 ] and gamma � [2 −2 , 2 3 ] in the Grid Search function.Te crossover rate was set at 0.8, the mutation rate at 0.1, and the number of elites at 2.
Finally, a normal SVM classifcation was done using a traditional grid search using the same data sample size.Over 15 independent runs, the preprocessed data are split into training, validation, and testing sets in an 80-10-10 ratio, and the training features are normalized.A grid search is performed over the range at C � [2 −5 , 2 3 ] and gamma � [2 −2 , 2 3 ] to obtain the optimal hyperparameter confguration for the SVM model which is then trained and evaluated using the testing set which is completely unseen during the optimization process.Te RBF kernel function is used.Te best hyperparameters obtained were then used to train the model and evaluation was done on the separate testing set.SVM's evaluation results were compared against GAHA-SVM's results.Tis comparison highlights the improvements that GAHA-SVM ofers over SVM's traditional grid search method.Table 2 gives a summary of the algorithm parameter settings.

Evaluation.
Te GAHA-SVM algorithm and its competitor algorithms' efciency is evaluated using the following performance metrics: accuracy, precision, f_score, recall, MCC, and gscore.Te model accuracy is calculated by equation (23).Te accuracy tells which percent of the predictions were correct.
Te Scientifc World Journal where TP is true positive, TN is true negative, FP is false positive, and FN is false negative.Te precision is calculated by equation ( 24) and tells the number of true fraudulent users from the number of predicted fraudulent users by the classifer.
Precision � (TP) where TP and FP remain the same as defned in equation (23).Te f1score also known as the f_score is calculated by equation (25).It is a balanced measure of the model performance between precision and recall.
where TP, FP, and FN are the same as defned in equation (23).Te recall is calculated by equation (26).It measures the proportion of correctly predicted positive instances out of all positive instances.
Recall � (TP) Te MCC is calculated by equation (27).It is reliant on the confusion matrix (TP, TN, FP, FN) to have good results.Its scores range between −1 and 1.
where TP, TN, FP, and FN remain the same as defned in equation (23).Te geometric mean, known as the G-mean for short or sometimes the G-score, measures the balance between precision and recall and is useful when the dataset is imbalanced.It is given by equation ( 28) below.
where precision and recall are as defned in equations ( 24) and ( 26), respectively.

Benchmark Test Functions.
As is commonly done in the feld of optimization and evolutionary computation, the proposed algorithm and its competitors were tested on the 23 standard unimodal, multimodal, and fxed-dimensional multimodal benchmark functions.Each of those three sets of benchmark functions evaluates the performance and robustness of the algorithm and its competitors in a specifc way.Te unimodal functions are functions with a single peak or global optimum.Tey show the algorithm's exploitation abilities and how well they converge to a single solution.Te multimodal benchmark functions have multiple peaks or local optima.Tey show the algorithm's ability to explore the search space and fnd multiple solutions while avoiding getting stuck in the local optima.Te fxed-dimensional multimodal functions are an extension of the multimodal concept of problems with fxed dimensionality.Tey evaluate the algorithm's convergence accuracy in scenarios where the dimensionality of the problem is fxed.Te algorithms were tested with a population size of 20, with the initial population being randomly generated, and were run with a maximum of 500 iterations.Te run is repeated 15 times for each benchmark function and the average and standard deviation of their minimum ftness are obtained as well as their average time.

Wilcoxon Rank-Sum Tests.
Te statistical analysis in this study employs the Wilcoxon rank-sum test.To compare the GAHA-SVM algorithm with 13 competitor metrics, each pair is evaluated separately using six evaluation metrics.Te objective is to determine whether there exists a signifcant statistical diference between GAHA-SVM and its competitors in each paired comparison.A signifcance level of 5% is chosen for the Wilcoxon rank-sum tests.A h value of 1 indicates a signifcant statistical diference, whereas a h value of 0 suggests no signifcant statistical diference between the observed pairs.In addition, the p value was compared to the signifcance level of 5% to determine if the diference between the population median and the hypothesized was statistically signifcant.Where the p value was less than or equal to the signifcance level, it indicates that there is a signifcant statistical diference between the hypothesized median and population median, and the null hypothesis is rejected.On the contrary, when the p value is greater than the signifcance level, it is concluded that there is no signifcant statistical diference and the null hypothesis is accepted.

Results and Discussion
Tis section presents the results from implementing and evaluating the genetic artifcial hummingbird algorithmsupport vector machine (GAHA-SVM) classifer and its competitors using historical electricity consumption data.Table 3 gives the data summary and Table 4 gives the efect of the data balancing.Results including evaluation metrics, benchmark tests, and Wilcoxon rank-sum tests are presented with the aid of graphs and fgures, with interpretations and implications drawn from those results.

Evaluation, Benchmark Functions, and Statistical Test
Results.Using the preprocessed and balanced data, the GAHA-SVM hybrid algorithm was assessed against the research's predefned objective of power theft detection.Te GAHA-SVM hybrid algorithm was utilized to detect power theft using preprocessed and balanced data.Te algorithm was trained on 80% of the data over 15 independent runs, validated on 10%, and tested on the remaining 10%.  5 to fulfll research objectives three and four.Te GAHA-SVM algorithm's classifcation ability was evaluated using six evaluation metrics, returning accuracy, precision, f_score, recall, MCC, and g mean of 0.9986, 0.9971, 0.9986, 1, 0.9972, and 0.9987, respectively.Te 13 alternative algorithms were also evaluated, and their results were compared to the GAHA-SVM algorithm in Figure 2. In fulfllment of the second research objective, the convergence of the GAHA-SVM algorithm was compared to AHA-SVM in Figure 3, to observe the improvement made on the latter by the genetic operators.To address the frst of the initial objectives, the results of the GAHA-SVM optimization are compared with those obtained from the conventional SVM grid search optimization.Te comparison of optimization results can be found in Table 6, while the evaluation metrics are compared in Figure 4. Figure 5 gives the box plot of objective functions of GAHA-SVM and the 13 competitors across the 15 independent runs, and Table 7 shows the summary statistics of their objective function over those runs.
Te performance of the GAHA-SVM algorithm and 13 other competing algorithms was assessed using 23 standard benchmark functions outlined in Section 4.6.Te mean and standard deviation obtained from these tests are presented and compared in Table 8, while the comparative runtime in seconds is provided in Table 9.Additionally, the convergence curves of these benchmark functions are illustrated in Figure 6.To further evaluate the GAHA-SVM algorithm, it was compared with the 13 competitor algorithms using the Wilcoxon rank-sum test, as described in Section 4.7.Te results of these tests are presented in Table 10.

Discussion.
A combination of metrics is necessary to comprehensively view a model's performance.Te study used six metrics (accuracy, precision, recall, f_score, gscore, and MCC) to assess model and competitor performance, with each model providing unique insights.

Evaluation Metrics Discussed.
Te GAHA-SVM model achieved an accuracy score of 0.9986, indicating that 99.86% of the predictions made were accurate, regardless of whether the users were fraudulent or nonfraudulent.On the other hand, precision measures the proportion of true positive predictions to the total predicted positives.Te model scored 0.9971 on this metric, indicating that 99.71% of the instances predicted as fraudulent were fraudulent.Te recall (sensitivity) metric, which measures the proportion of true positive predictions to the actual positives, yielded a score of 1, indicating that 100% of the fraudulent instances were correctly classifed.
Precision and recall are often seen as conficting measures because improving one usually leads to a decrease in the other.Precision aims to minimize false positives, while recall focuses on reducing false negatives.To address this issue, the f_score was used as one of the evaluation metrics.Te f_score provides a balanced assessment of precision and recall by calculating their harmonic mean.It considers both false positives and false negatives and is a decisive metric.It is benefcial in instances of class imbalance or when both precision and recall are equally important and cannot be compromised.Te model achieved a f_score of 0.9986, which translates to 99.86%.Tis indicates a strong balance between precision and recall.Generally, a f_score above 0.8 is considered quite good, and the model's f_score of 0.9986 suggests that it performs well in correctly identifying positive cases (precision) and capturing a high proportion of actual positive cases (recall).Te Matthews correlation coefcient (MCC) is a scoring system that ranges from −1 to +1.A score of +1 signifes perfect classifcation, while a score of 0 indicates no better than random classifcation.On the other hand, a score of −1 suggests complete disagreement between the predictions made and the actual observations.An MCC score of 0.9972 indicates a reasonably strong positive correlation between the predictions and the actual classifcations.Tis suggests that the model is making predictions that align with the true outcomes.Te gscore combines precision and recall using the geometric mean, placing more emphasis on the lower of the two values.Tis makes it a crucial metric As illustrated in Figure 2, GAHA-SVM demonstrated superior performance across all six evaluation metrics when compared to thirteen other competitor algorithms.By leveraging the strengths of AHA and GA, a balance was struck between exploration and exploitation, resulting in the identifcation of the optimal hyperparameters [5.7531, 0.279] and superior performance across all metrics.Te competitor algorithms, except for GA, utilize deterministic methods to update solutions which keep recycling poor solutions.GAHA ofered a diversion by the stochastic generations of new solutions that brought diversity to the search space and enabled the algorithm to fnd a better optimum than the others.Table 5 reveals that the algorithm is outperformed by ten algorithms and outperforms three algorithms (ACO, GA, and FPA which take 15792.09,13,384.61,and 15,929 seconds, respectively) in terms of time complexity.Te bat algorithm (BA) clocks the fastest average time at 46.04 seconds on average.Using an echolocation mechanism for local and global search enables it to converge to optimal solutions speedily.Both Figure 2 and Table 5 demonstrate that the hybrid GAHA-SVM surpassed the AHA-SVM in all aspects, except for the AHA-SVM's average timing sequence of 555.82 seconds, which bested the GAHA-SVM's timing of 4,656.18seconds.Te AHA is quicker but fails to obtain the optimum solution and sufers premature convergence.Te GAHA-SVM convergence is an improvement on the AHA-SVM algorithm as depicted in Figure 3. Te hybrid approach enhanced overall performance contributing to improved convergence.By altering the frequency of exploration, GAHA ofered a better balance between exploration and exploitation.Its ability to generate new candidate solutions to replace the worse solutions in the search space by utilizing the GA crossover and mutation operators gave the algorithm the ability to fnd better optimum values since diverse solutions were being added to the search space augmenting the exploration and ensuring the algorithm was not stuck in the local optimum.
Te GAHA-SVM model optimization outperforms the traditional grid search of the SVM, as shown in Figure 4 and Table 6.Te traditional grid search returned far worse scores across all six evaluation metrics and had a worse convergence ofering only a better time complexity.Te GAHA-SVM performed so well in contrast to the SVM because metaheuristic algorithms are designed to explore a broader search space more efciently, by learning from past solutions, while the SVM grid search tries to fnd every possible combination of hyperparameters.Tis made the GAHA more efcient, leading to a faster convergence and superior solutions.In comparison with the SVM, it is less likely to get stuck in the local optima, which was crucial to fnding near-optimal hyperparameters.Another key aspect that enabled the GAHA-SVM to edge the SVM is the adaptability in the GAHA-SVM's search strategy which is lacking in SVM's conventional grid search.When the GAHA-SVM algorithm threatened to get stuck in the local optima, the genetic operators would diversify the search space helping it escape and search for more promising solutions.Tis ability to dynamically adjust the explorationexploitation balance during the optimization process helped the GAHA-SVM algorithm explore promising regions more intensively, refne solutions as needed, and arrive at a better optimum.7 show GAHA-SVM as the best performer.It achieved the lowest mean, median, standard deviation, and variance, indicating superior reliability in minimizing the objective function across all runs.By contrast, AHA-SVM performed moderately with higher mean and median values and greater variance, suggesting less stability.GA-SVM, GSO-SVM, PSO-SVM, and ACO-SVM median.GA-SVM and GSO-SVM had a broader range which indicated higher variability and less stability.Te remaining algorithms (CS-SVM, PSO-SVM, GWO-SVM, FFO-SVM, BA-SVM, SSA-SVM, DEA-SVM, IWO-SVM, FPA-SVM, and ACO-SVM) had varied performances, often with higher medians and interquartile ranges, indicating less consistent performance compared to GAHA-SVM.

Benchmark Functions Discussed.
Te mean of the minimal ftness and standard deviations for the algorithms over the 15 runs were recorded during the benchmark functions tests.In instances where more than one algorithm got the same minimum ftness mean, the algorithm with the lower standard deviation was considered as the winner of that test function.Across the 23 benchmark functions, the results in Table 8 and the convergence curves given in Figure 6 show that the GAHA-SVM algorithm outperformed or attained the same optimum value as some of the other algorithms in 12 of the 23 benchmark functions which are around 52 percent of the total benchmark functions.It also showed better convergence in those same set of 12 test functions compared or equal to its competitors as can be observed from the corresponding convergence curves.Its best performances came in the unimodal and multimodal test functions where it won 12 of the combined 13 but struggled consistently across the 10 fxed-dimensional multimodal functions.Te GAHA-SVM algorithm attained the joint optimum value in 7 out of 7 unimodal benchmark functions along with BA and GA.Tis suggests that our GAHA-SVM algorithm excels in scenarios where the solution space of the problem contains a singular global optimum.Furthermore, it showcases the algorithm's reliability and efectiveness in solving simple optimization problems characterized by objective functions with single peaks.In addition, the GAHA-SVM algorithm attained the joint best optimum value in 5 of the 6 multimodal benchmark functions along with BA and GA.Tis indicates that the algorithm demonstrates robustness in handling complex multipeaked solution landscapes.Tis ability to perform optimization and converge to optimum solutions in the presence of multiple optima highlights the GAHA-SVM's versatility across a broader range of problems when compared to its competitors.While the GAHA-SVM algorithm   Te Scientifc World Journal performed exceptionally well in the unimodal and all but one multimodal benchmark functions, it faced challenges in the fxed-dimensional multimodal benchmark functions failing to come up top in a single one.Te fower pollination algorithm, FPA, emerged as the best performing in 5 of those 10 functions (f15, f18, f21, f22, and f23) while the particle swarm algorithm performed best in 4 of the 10 (f14, f16, f17, and f20).Te results from the fxed-dimensional multimodal benchmark function test indicate that in problems where the solution space is both multipeaked and fxed dimensional, the FPA might be more efective compared to our GAHA-SVM algorithm.
Evidenced by the results across all three sets of benchmark functions, it can be concluded that the GAHA-SVM algorithm excels in the unimodal and almost all multimodal scenarios showcasing its efectiveness across a wide array of optimization challenges.However, the challenges posed by the fxed-dimensional multimodal benchmark functions where it is outperformed by the FPA indicate that while the GAHA-SVM is powerful, its performance might be infuenced by the specifc characteristics of the optimization problem at hand.
In the timing sequence for the 23 benchmark functions given by Table 9, it is seen that the GAHA-SVM despite acing 12 of the 23 benchmark functions required more time than the other algorithms with the grey wolf optimizer (GWO) being the fastest algorithm across all 23 benchmark functions.It is noteworthy that the GWO's conceptual     Te Scientifc World Journal  Te Scientifc World Journal simplicity with very few parameters to set makes it computationally lightweight allowing for faster implementation and execution.On the contrary, the GAHA-SVM which is a hybrid algorithm combines a mix of optimization techniques from genetic algorithm with artifcial hummingbird algorithm with each having its time complexity.Since both GA and AHA components are time-intensive, their combination resultantly led to a comparatively higher time complexity compared to the other algorithms.

Statistical Test Discussed.
Te study compared the evaluation metrics of GAHA-SVM and 13 competitor algorithms to determine if their results had the same distribution over 15 runs.A signifcant statistical diference indicated that the observed diferences were unlikely to have occurred by random chance.Out of 78 tests, 70 had a h value equal to 1, indicating a signifcant statistical diference between GAHA-SVM and the competitor algorithm.In the context of the research, a signifcant statistical diference was observed 90% of the time between GAHA-SVM and the competitor algorithms, while a signifcant diference did not occur 10% of the time.Te p value was used in addition to access the evidence against the null hypothesis.A similar pattern was observed with results showing that 90% of the time there was a signifcant statistical diference and 10% of the time the null hypothesis was rejected.From Table 10, one can see that GAHA is signifcantly diferent from AHA in terms of both h value and p value across every metric except recall.Tis demonstrates that the observed superiority of GAHA-SVM is a reliable and consistent pattern, not due to random chance.

Limitations and Recommendations
One limitation of this study is the model's generalizability.
Te study utilized historical electricity consumption data from a specifc community in Liberia, which might not fully represent diverse scenarios.Te dataset used may have inherent biases that could afect the model's performance when applied to diferent regions or populations.Tis limitation is understandable given the bureaucratic challenges researchers face in accessing data from authorities in the country.Despite this limitation, the study extracted valuable insights from the available data and demonstrated the potential of GAHA in a real-world context.It is recommended that a broader dataset be explored for future research.Another drawback is the time complexity of the GAHA algorithm.Te hybridization of GA and AHA introduced additional computational overhead, which can be time-consuming and resource-intensive, especially for large datasets.Tis can hinder the algorithm's scalability and practical deployment in real-time applications.Future research should focus on optimizing the algorithm to reduce its time complexity without compromising efciency.Lastly, the study focuses solely on the classifcation of fraudulent and nonfraudulent electricity consumers.While the results are promising, the algorithm's performance on other types of classifcation problems remains unexplored.Tis limitation suggests a need for further research to test GAHA's applicability and efectiveness across diferent domains and datasets.

Conclusion
Tis study proposed a hybrid genetic artifcial hummingbird algorithm (GAHA) with the algorithm used to optimize the support vector machine's (SVM) C and gamma hyperparameters.In the GAHA, the exploration stage of the AHA is enhanced using the GA's mutation and crossover operators.Tis variation on the AHA improves its exploration phase and gives balance to the exploration and exploitation.Te population is diversifed by the variations introduced by those operators enabling the algorithm to escape the local optima and avoid premature convergence.Te GAHA was tested against 13 advanced optimization algorithms in the 23 optimization benchmark functions.It outperformed or equaled the performance of the other algorithms in 12 of the 23 benchmark functions.Also, the algorithm showed a 90% percent signifcant statistical diference in the paired Wilcoxon rank-sum test between itself and the competitors.Te algorithm was used to classify fraudulent and nonfraudulent electricity consumers using labeled historical electricity consumption data.Te GAHA outperformed all of the 13 competitor algorithms on the 6 evaluation metrics.Te potential of the GAHA algorithm in real-world applications is confrmed by its observed superiority and accelerated convergence.Tis aligns with the research by Ali et al. [21] and Ibrahim et al. [22], emphasizing the computational challenges of traditional grid search and advocating for genetic algorithms in hyperparameter tuning.Abbas et al.'s research [36] further supports the inferiority of grid search compared to metaheuristic search.Moreover, the hybridization of genetic algorithm mutation operators with the artifcial hummingbird algorithm represents a novel approach to tackling the imbalance between exploration and exploitation, as well as the issue of local optima convergence.Te improved optimization results achieved by the GAHA algorithm substantiate the efectiveness of this approach, consistent with Zhao et al. [8], Abd Elaziz et al. [25], and Dobrojovic et al.'s [38] emphasis on the benefts of hybridization for enhanced performance.GAHA improved SVM performance for power theft detection by fnding optimal values for C and gamma.Trough enhancing exploration and balancing exploitation, GAHA accuracy of 99.86% surpassed the accuracy of 81% achieved by SVM [27].GAHA genetic operators can ensure diverse exploration and evaluation metrics similar to how feature engineering and preprocessing did for those in [28,29].Unlike the method in [30] which relied on a hybrid neural network, GAHA combines genetic operators with artifcial hummingbird algorithm to achieve optimum results.Furthermore, the binary classifcation done in this research returns optimal results, in contrast with the work of Salb et al. [31] which struggled noticeably in binary classifcation.Te algorithm can be practically deployed to grids to predict power theft.Future research could focus on reducing GAHA's time complexity, improving its performance on Te Scientifc World Journal 27 fxed-dimensional multimodal benchmark functions, and expanding the algorithm to other domains such as medical diagnostics, fnancial prediction, and image recognition, all of which require hyperparameter optimization and classifcation.Possible future applications include the following: (1) Medical Diagnostics.GAHA may be used to classify medical conditions based on patient data, through the optimization of hyperparameters in machine learning models to increase diagnostic accuracy and illness detection.(2) Financial Prediction.By optimizing predictive models, the algorithm may be utilized in the prediction of stock prices and credit ratings or the detection of fraudulent transactions in fnancial systems.
(3) Image Recognition.GAHA can potentially be applied to computer vision tasks, optimizing the model's parameters for improved accuracy and reliability in object detection and recognition systems.

( a )
Imbalance in Exploration and Exploitation.Te artifcial hummingbird algorithm is known for its strong exploitation capabilities, while the genetic algorithm mutation and crossover operators excel in exploration.Combining the two can better balance exploration (diversity) and exploitation (exploiting promising regions).Te GA introduces randomness and diversity into the artifcial hummingbird algorithm, enhancing its exploration capabilities.(b) Getting Trapped in the Local Optimum.GeneticAlgorithms are efective at escaping local optima due to their use of the mutation and crossover operators.By incorporating these operators into the artifcial hummingbird algorithm, random perturbations are introduced to allow the algorithm to explore different regions of the search space.(c) Converging Prematurely.Premature convergence occurs when an algorithm stops exploring the search space too early and settles for suboptimal solutions.Diversity is introduced by integrating GA mutation and crossover operators, and premature convergence is avoided.

Figure 5 :
Figure 5: Box plot of GAHA-SVM and competitor algorithms over the 15 runs.

Figure 6 :
Figure 6: Convergence curves of GAHA-SVM and 13 competitor algorithms over the 23 benchmark functions.
4.1.Nature of the Data.Tis research examines historical electricity consumption data from the Liberia Electricity Corporation AMI meter for a year from June 30, 2021, to June 30, 2022, focusing on the Peace Island Community in Monrovia, Liberia.Te data include 60,666 rows and 13 columns, including ID_No, date, time, Global_Active_Power, Global_Reactive_Power, Pow-er_Factor, Global_Intensity, Voltage, Billing, Sub_meter-ing_1, Sub_metering_2, Sub_metering_3, and Status.Te data are skewed, with 42,466 instances of fraud and 18,200 instances of nonfraudulent cases, representing 70 and 30 percent of the data, respectively, with the ground truth on fraudulent and nonfraudulent cases based on energy audit reports.Te research focused on the two pertinent features: removed.Similarly, the majority class is downsampled to ensure an equal number of both instances.Downsampling which involves the random removal of majority class instances ensures that both classes are equally represented and model bias towards the majority class is mitigated.It is less prone to overftting, compared to oversampling techniques that generate synthetic samples which can potentially introduce noise and redundant samples.Equations (

Table 1 :
1) Start (2) Initialize variables: MaxIt, nPop, XTrain, YTrain, XTest, YTest.(3) Load Grid Search_Params.(4) Initialize PopPos_gamma and PopPos_C randomly from gamma_vals and C_vals.(5) Evaluate ftness for each population member using the Benchmark_SVM function.If r < 0.5 perform guided foraging, fnd the target food index with maximum unvisited time and minimum ftness in the visit table.Update position and ftness based on the target food position.(vii) Else, perform territorial foraging.Update positions and ftness based on the current position.(viii) If iterations � nPop/5, perform migratory foraging with the genetic operators (mutation and crossover).(ix) Update the best ftness and corresponding solutions in the population.(x) Store history: store the best ftness in the history array (HisBestFit).(xi) If the diference between the last ffteen ftness is less than the error_BF break the loop.(xii) Use the best solutions (BestX_C and BestX_gamma) with the SVM model to perform classifcation.Dataset fragment.

Table 2 :
Parameter setting for GAHA-SVM and the 13 competitor algorithms.

Table 4 :
Efects of data balancing.

Table 3 :
Data summary.Gscore values closer to 1 indicate strong performance in both precision and recall.Te model's gscore of 0.9987 or 99.87% suggests that the model achieved a good balance between precision and recall.It efectively balances the trade-of between the two by making accurate positive predictions and capturing a high proportion of actual positive cases.

Table 5 :
Comparison of GAHA-SVM and competitor algorithm optimization results.

Table 7 :
GAHA-SVM and competitor's objective function summary statistics across the 15 independent runs.

Table 8 :
Comparison of optimization results for GAHA-SVM and competitors across the 23 benchmark functions.

Table 9 :
Comparison of GAHA-SVM and the 13 competitor algorithms' timing in seconds on the 23 benchmark functions.

Table 10 :
Wilcoxon rank-sum test scores for GAHA-SVM vs. competitor algorithms on the evaluation metrics.