Classifying the safety and quality of tomatoes based on genetic algorithms integrated with Gray Wolf optimizer
摘要
In recent years, industries and nations have faced significant challenges in ensuring food safety and quality assessment. This study significantly enhances our understanding of food safety by providing a reliable method for classifying tomatoes as organic or non-organic. By accurately distinguishing between these categories, the research addresses a critical issue in the food industry: the assurance that consumers are receiving safe and high-quality products. It aims to establish an advanced platform that leverages Machine Learning algorithms to analyze Mass Spectrometry data, effectively classifying tomatoes as organic or non-organic. Using silica gel plates in conjunction with direct-infusion electrospray ionization mass spectrometry, we present a pioneering optimization model that fuses genetic algorithms (GA) with grey wolf optimization (GWO). By harnessing GA’s exploratory strengths alongside GWO’s exploitative features, our model significantly enhances both solution diversity and convergence efficiency in optimization tasks. This integration merges GA’s principles of natural selection with GWO’s socially inspired techniques, making it applicable across various fields, including engineering design, machine learning, and resource management. The dataset was divided into 80% training and 20% testing sets, with the testing data classified using a random forest algorithm, achieving an impressive 95% accuracy. The training data, classified with both random forest and the Grey Wolf Optimizer, reached 76% accuracy. Remarkably, when the Grey Wolf Optimizer was combined with the genetic algorithm for feature selection, accuracy increased to 99.9% and F1-Score 99%. These results demonstrate that our proposed model can effectively classify the safety and quality of tomatoes. The findings indicate that a tomato can be safe and nutritious while being labelled as non-organic, challenging common perceptions. This clarity empowers producers, retailers, and consumers to make informed choices based on safety and quality rather than solely on organic certification. Ultimately, the practical applications of this study can lead to improved food safety standards, better consumer trust, and more efficient supply chain practices that prioritize the health and safety of the public.