# Application of Machine Learning to Assess the Quality of Food Products--Case Study: Coffee Bean
## 1 Introduction  
Arabica coffee is a species of coffee tree with small beans and belongs to the _Rubiaceae_ family. This unique species characterized by the features of an evergreen tree [1], which, through proper breeding in the zone of tropical areas, allows it to maintain its green leafy state almost throughout the year. Coffee beans are used in the preparation of coffee beverage, which is the second most consumed beverage in the world [2]. However, among the 100 species of coffee, it is Arabic coffee that has the greatest economic importance [2] due to its flavor, aroma, low caffeine content, cultivation requirements and product price, among other reasons. Arabica coffee is one of many group of food products that exhibit beneficial effects on the human body [3; 4; 5]. This is related to its content of key bioactive compounds, such as caffeine, lipids, polyphenols, vitamins, minerals and aroma compounds [3; 4; 6]. In the literature, the consumption of Arabic coffee has been shown to help neutralize free radicals in the body, reducing the risk of chronic diseases including cardiovascular disease [7; 8], Alzheimer's and Parkinson's disease, and liver disease [9; 10; 11; 12]. The coffee bean also represents a valuable dietary source due to, among other things, the chlorogenic acids (CGAs) they contain [13]. This is a group of polyphenols found naturally in coffee beans. They are also a powerful antioxidant, which, as mentioned, in addition to inhibiting certain diseases, can promote weight loss by, among other things, affecting metabolism and glucose absorption [14; 15]. It seems crucial to assess the quality of coffee beans due to the impact of sourcing the right beans during the coffee roasting process, where the quantity and quality of the CGA they contain can degrade rapidly. Therefore, the process of sourcing and selecting the right beans is important in analyzing the health properties of coffee. The interest in health properties has attracted the attention of scientists as well as healthy eaters [3; 4; 11; 12; 14; 16; 17; 18]. Artificial intelligence methods have gained great importance in the food production and distribution process through process optimization, crop monitoring and management, quality assessment [19; 20] and food prediction, among others [21]. One of the artificial intelligence methods includes deep learning, which is a technique that uses artificial neural network models containing, among other things, two or more layers of hidden neurons. Deep learning models allow for data analysis without the researcher knowing the exact rules. This network topology processes information and is a tool that offers the mapping of the complex relationships occurring between the analyzed data [20; 22]. Actions such as extracting the shape, color or texture of an analyzed object in a bitmap image requires a large amount of data, which translates into longer processing time and statistical analysis of that object. The application of deep learning methods makes it possible to automate some of the activities, among others, related to image data processing at various stages of statistical analysis [22; 23; 24]. The convolutional networks, also called convolutional neural networks (CNNs), are a case of deep learning that analyze individual areas of the input dataset and generate new tensors based on them [25]. By means of convolution operations, CNNs use a kernel function and involve increasing the ordinality of copies of the tensor with which operations are performed without increasing their dimensionality [26; 27; 28]. Convolutional networks use an algorithm to classify images due to the presence of repeated, recognizable and similar shapes in the image. The input tensor shape of the network accounts for the sample (pattern), image height, image width, and depth as the number of dimensions of the RGB color space [29; 30; 31].