# AI Algorithms in the Agrifood Industry: Application Potential in the Spanish Agrifood Context
## 2 State of the Art: AI Algorithms Applied or Applicable in the Global Agrifood Industry
### Supervised Learning: A Subset of the Machine Learning Family  
Supervised learning constitutes a foundational approach within the realm of machine learning, wherein models are trained using labeled datasets to perform predictions or classifications. As presented by [PERSON] (1986), these algorithms establish a functional mapping between inputs and outputs based on exemplary input-output pairs. This methodology is widely used across various domains, including this research subject, where its applications are increasingly yielding substantial advancements. In the realm of supervised learning, the architecture of models, the quality of data sources, and the achieved accuracy rates are pivotal factors influencing performance. A notable example is the application of convolutional neural networks (CNNs) in image classification tasks, such as handwritten digit recognition using the MNIST dataset. The MNIST dataset comprises 60,000 training images and 10,000 testing images of 28 \(\times\) 28 pixel grayscale handwritten digits. In a recent study [PERSON] (1986), researchers employed an ensemble approach involving three CNN models with varying kernel sizes (3 \(\times\) 3, 5 \(\times\) 5, and 7 \(\times\) 7). Each model consisted of multiple convolutional layers followed by a single fully connected layer, utilizing batch normalization and ReLU activation functions, without pooling layers. Data augmentation techniques, including rotation and translations were applied to enhance the training dataset. This ensemble achieved a remarkable accuracy of 99.87% on the MNIST test set, underscoring the significance of selecting appropriate model architectures and utilizing high-quality data sources in supervised learning applications. In the agricultural sector, supervised learning plays an instrumental role in the detection of pests and diseases through the analysis of aerial or drone-acquired imagery. Models trained on annotated images possess the capability to autonomously identify afflicted plants, thereby enabling prompt interventions and mitigating potential crop losses. For instance, convolutional neural networks (CNNs), a specialized subset of supervised learning algorithms, demonstrate exceptional efficacy in image classification tasks and are increasingly being applied to agricultural image datasets ([PERSON] et al., 2017). The integration of machine learning with advanced imaging techniques, such as hyperspectral and multispectral imaging, facilitates the detection of not only visible diseases but also early-stage infections that may elude human observation ([PERSON] et al., 2017). A pertinent application of supervised learning in agriculture is exemplified by the detection of early blight in tomato crops utilizing CNNs. [PERSON] et al. [PERSON] et al. (2018) developed a deep learning model that achieved high accuracy in discerning between healthy and diseased leaves, thereby empowering farmers to undertake timely remedial actions. Similarly, in the Spanish context, supervised learning has been used to monitor olive groves for indications of Xylella fastidiosa infection, a bacterium that poses a severe threat to olive production ([PERSON] et al., 2017). Furthermore, supervised learning methodologies have been extensively used in yield prediction models. By analyzing historical data encompassing weather patterns, soil quality, and previous yields, these models can forecast future crop productivity with considerable precision ([PERSON] et al., 2017). Moreover, classification algorithms within the supervised learning framework are indispensable for automating the sorting and grading of agricultural products, such as fruits and vegetables. By training models on labeled datasets that encapsulate product attributes (e.g., color, size, and texture), these algorithms can categorize produce into various quality grades, thereby streamlining post-harvest processing ([PERSON] et al., 2017). For instance,Cubero et al.