GRAPE is an implementation of Grammatical Evolution (GE) in DEAP, an Evolutionary Computation framework in Python, which consists of the necessary classes and functions to evolve a population of grammar-based solutions, while reporting essential measures. This tool was developed at the Bio-computing and Developmental Systems (BDS) Research Group, the birthplace of GE, as an easy to use (compared to the canonical C++ implementation, libGE) tool that inherits all the advantages of DEAP, such as selection methods, parallelism and multiple search techniques, all of which can be used with GRAPE. In this paper, we address some problems to exemplify the use of GRAPE and to perform a comparison with PonyGE2, an existing implementation of GE in Python. The results show that GRAPE has a similar performance, but is able to avail of all the extra facilities and functionality found in the DEAP framework. We further show that GRAPE enables GE to be applied to systems identification problems and we demonstrate this on two benchmark problems.
Linear scaling has greatly improved the performance of genetic programming when performing symbolic regression. Linear scaling transforms the output of an expression to reduce its error. Mean squared error and correlation have been used with scaling, often interchangeably and with assumed equivalence. We examine if this equivalence is justified by investigating the differences between an error-based metric and a correlation-based metric on 11 well-known symbolic regression benchmarks. We investigate the effect a change of fitness function has on performance, individuals size and diversity. Error-based scaling and Correlation were seen to attain equivalent performance and found solutions with very similar size and diversity on the majority of problem, but not all. In order to ascertain if the strengths of both approaches could be combined, we explored a double tournament selection strategy, where two tournaments are conducted sequentially to select individuals for recombination. Double tournament selection found smaller solutions and the best solution in five benchmarks, including finding the best solutions on both real-world dataset used in our experiments.
Machine learning has significantly advanced breast cancer diagnosis, yet challenges such as high-dimensional data, severe class imbalance, and limited interpretability persist. To address these issues, we proposed a Grammatical Evolution (GE)-based Feature Selection (FS) approach, integrated with a class-balancing technique called STEM, which combines Synthetic Minority Oversampling Technique, Edited Nearest Neighbour and Mixup, effectively handling both inter-class and intra-class imbalance. Our study evaluates the performance of the GE-based FS method against other FS models, including Logistic Regression (LR) and Extreme Gradient Boosting (XGBoost), in identifying critical features for breast cancer diagnosis. The results demonstrate that the GE-based FS method effectively identifies critical features and achieves superior Area Under the Curve (AUC) scores, particularly with smaller subsets of features, unlike LR and XGBoost, which perform optimally with the full feature set. The analysis was conducted on the Digital Database for Screening Mammography and Wisconsin Breast Cancer datasets, which originally contained 52 and 30 features, respectively. The GE-based FS produces the highest AUC with subsets of 10 and 15 features, while LR and XGBoost achieve their best results using the entire feature set, underscoring the superiority of the GE-based FS method.
Grammatical Evolution is a Genetic Programming variant which evolves problems in any arbitrary language that is BNF compliant. Since its inception, Grammatical Evolution has been used to solve real-world problems in different domains such as bio-informatics, architecture design, financial modelling, music, software testing, game artificial intelligence and parallel programming. Multi-output problems deal with predicting numerous output variables simultaneously, a notoriously difficult problem. We present a Multi-Genome Grammatical Evolution better suited for tackling multi-output problems, specifically digital circuits. The Multi-Genome consists of multiple genomes, each evolving a solution to a single unique output variable. Each genome is mapped to create its executable object. The mapping mechanism, genetic, selection, and replacement operators have been adapted to make them well-suited for the Multi-Genome representation and the implementation of a new wrapping operator. Additionally, custom grammar syntax rules and a cyclic dependency-checking algorithm have been presented to facilitate the evolution of inter-output dependencies which may exist in multi-output problems. Multi-Genome Grammatical Evolution is tested on combinational digital circuit benchmark problems. Results show Multi-Genome Grammatical Evolution performs significantly better than standard Grammatical Evolution on these benchmark problems.