Prediction of Sensory Parameters of Cured Ham: A Study of the Viability of the Use of NIR Spectroscopy and Artificial Neural Networks

Dry-cured ham is a high-quality product owing to its organoleptic characteristics. Sensory analysis is an essential part of assessing its quality. However, sensory assessment is a laborious process which implies the availability of a trained tasting panel. The aim of this study was the prediction of dry-ham sensory characteristics by means of an instrumental technique. To do so, an artificial neural network (ANN) model for the prediction of sensory parameters of dry-cured hams based on NIR spectral information was developed and optimized. The NIR spectra were obtained with a fiber-optic probe applied directly to the ham sample. In order to achieve this objective, the neural network was designed using 28 sensory parameters analyzed by a trained panel for sensory profile analysis as output data. A total of 91 samples of dry-cured ham matured for 24 months were analyzed. The hams corresponded to two different breeds (Iberian and Iberian x Duroc) and two different feeding systems (feeding outdoors with acorns or feeding with concentrates). The training algorithm and ANN architecture (the number of neurons in the hidden layer) used for the training were optimized. The parameters of ANN architecture analyzed have been shown to have an effect on the prediction capacity of the network. The Levenberg–Marquardt training algorithm has been shown to be the most suitable for the application of an ANN to sensory parameters


Introduction
Spanish Iberian dry-cured ham is defined by Spanish regulations in Royal Decree 4/2014 (BOE, 2014) as a product produced from the rear limbs of adult pigs with leg and bone subject to the corresponding process of salting and curing-maturation. This product is designated according to its type of genetic purity as "100% Iberian ham" in the case of products from animals with 100% genetic purity of the Iberian breed, and "Iberian ham" in the case of products from animals with at least 50% of their genetic makeup corresponding to the Iberian breed of pig as a result of crossing Iberian mothers with Duroc fathers. As far as the food of the pigs is concerned, hams may be denominated: "acorn-fed" for products from animals slaughtered immediately after feeding exclusively on acorns, grass, and other natural resources of the dehesa pastureland (this feeding system is known as "montanera"), or "fodder-fed" in the case of animals fed on fodder consisting essentially of cereals and leguminous plants, which is handled in intensive exploitation systems.
The organoleptic and nutritional characteristics of Spanish Iberian ham make it a high-quality product which is considered a delicatessen food. There is extensive literature describing the sensory properties of dry-cured ham [1][2][3][4] and more recently even the emotions evoked during the consumption of dry-cured ham have been identified [5]. In order to carry out the sensory analysis of a cured ham, the presence of a trained panel is necessary owing to the number and complexity of the parameters that must be assessed. If the panel is to be suitable, it is necessary to select and train the assessors [4] and to validate the panel regularly to ensure that its members produce trustworthy results [6][7][8]. The validation of a panel requires the holding of controlled sampling sessions which allow the calculation of various indexes of repeatability, precision, and deviation by the assessors [4]. In the food industry, the sensory information of a product is essential, but it is very difficult and time-consuming to implement a suitably trained and validated sampling panel [9,10]. A system allowing the measuring of the sensory quality of a food in an objective manner, without the need for a sampling panel, would reduce the variability associated with human perception and the time needed for carrying out this kind of analysis [11].
It would be of great interest to be able to replace sensory evaluation with faster and simpler instrumental analysis. In this way, near-infrared spectroscopy (NIRS) is an objective and non-destructive method that has been used to predict the quality parameters of different foodstuffs and it had been evaluated for being implemented in dry-cured ham manufacture [12]. This method can be very useful for testing bulk material with little or no sample preparation. The chemical profile obtained by NIR can be successfully linked to specific sensory attributes for expanded snacks [13], for the evaluation and classification of cooked ham [14], for the prediction of lamb meat tenderness assessed by sensory analysis [15], and for the prediction of some quality defects of dry-cured ham samples [16].
However, as NIRS data requires complex statistical treatment, chemometrics has become an established technique for handling this type of data. Among chemometric methods, artificial neural networks (ANNs) are a well-known mathematical tool which is widely used together with the NIR technique in the case of many problems in meat production and technology such as the quality control of raw material, meat processing, shelf-life evaluation, detecting off-flavors, or authenticity assessment [17]. Artificial intelligence methods were mainly investigated for the assessment of meat sensory qualities such as the tenderness, color, or marbling score/level [18]. In relation to dry-cured ham, ANNs have been used for the classification of hams according to the maturation time [19], the identification of feeding and the ripening time of ham [20], and for the assessment of the curing of hams [21]. To our knowledge, there is no data in the literature on the prediction of sensory attributes in dry-cured ham based on NIR information by ANNs.
Taking into account the economic importance of dry-cured ham, the prediction of its sensory characteristics by means of a rapid instrumental technique is an interesting challenge. The aim of this study was to examine the feasibility of using artificial neural networks for predicting ham sensory parameters. Several algorithms, the number of neurons in the hidden layer, and the initial configuration have been tested in order to ascertain the best ANN architecture for predicting the sensory parameters.

Samples
A total of 91 samples of cured ham were analyzed. All the samples were of the fat-marbled part known as "la maza" which is the largest and tastiest part of the ham. The samples were obtained by cutting with a knife along a line passing through the thickest part of dry-cured hams as described by González-Casado et al. [4]. The production and maturation of the samples was carried out in Guijuelo in the province of Salamanca in the traditional manner over 24 months. The ham samples were selected to represent the greatest possible variability within products denominated Spanish Iberian dry-cured ham. Hams were therefore analyzed from pigs with "100% Iberian" genetics together with hams Sensors 2020, 20, 5624 3 of 19 denominated "Iberian" from animals with at least 50% of their genetic makeup corresponding to the Iberian breed of pig, obtained from crossing Iberian mothers with Duroc fathers The samples analyzed included hams from the montanera, from animals fattened extensively with acorns and pasture for 90 days prior to slaughter, and fodder-fed ham from animals fed on commercial feed and pasture in an extensive system. In keeping with these parameters the distribution of the samples analyzed was as follows: 13 samples from 100% Iberian animals fed in montanera (IM), 53 samples of Iberian animals fed in montanera (CM), and 25 samples of fodder-fed Iberian animals (CC).
Once they have been cut the samples are vacuum-packed until they come to be analyzed. The packages were opened 1 h before being tested by the panel.

Sensory Evaluation
Ten assessors (aged from 20 to 50) participated in the study. All of them had previous experience in quantitative descriptive analysis (QDA) of dry-cured hams and were staff at the University of Salamanca. The training was carried out by using products of reference so as to stimulate the generation of terminology during 5 sessions. The assessors did not discuss data, terminology, or samples after each taste session; feedback was provided by the facilitator based on the statistical analysis of the taste session data [22]. The attributes selected for visual appearance, flavor, and texture description of the sample are shown in Table 1. A structured scoring scale was used in which 0 indicated the absence and 9 the high intensity of the attribute. The accuracy of the panel was assessed by studying its reproducibility and repeatability as a whole according to the methodology described by Pérez-Elortondo et al. [23]. To do this, the same ham is analyzed twice in the same session and again in a later session.
Four samples per session were analyzed and a total of 25 sessions were held. Samples were coded with three-digit random numbers and individually presented to the assessor. The average score of the ten assessors for each sample was recorded and used in the statistical analysis. In order to analyze the data, a two-way ANOVA and a post-hoc test (Tukey) were carried out to check for significant differences between samples. In order to investigate the relationship between the two attributes, the Pearson correlation coefficients have been calculated.

NIR-Chemometric Methods
The near-infrared spectra of the samples were obtained using a Foss NIRSystem 500 (Hillerod, Denmark). This equipment was coupled with a fiber-optic probe (1.5 m 210/210, Ref. No. R6539-A) and a 5 cm × 5 cm window quartz. The window was applied to the surface of ham directly without any preparation. The Foss NIRSystem 500 is equipped with four reflectance detectors (PBs elements) that, in order to minimize the specular reflectance, are placed at a 45 • angle to the sample surface. The reference of the probe is a ceramic plate. The spectra of the sample were recorded in the 1100-2000 nm range at intervals of 2 nm, which means that a total of 451 pieces of reflectance data were obtained for each sample. The spectra above 2000 nm were not recorded as the OH groups that may be present in the optical fiber produce a significant attenuation of the signal. For each recording, 32 scans were performed for both the reference and sample. Indeed, all the samples were analyzed in triplicate to minimize sampling errors. The spectra of each sample were averaged and the logarithm of the reciprocal of the reflectance values was calculated to transform it into absorbance (A = log 1/R).

Artificial Neural Network
The multilayer perceptron (MLP) feedforward artificial neural network (ANN) was used for processing the absorbance values obtained. The 451 values of NIR absorbance feed the input layer which had 451 neurons. The hidden layer has a variable number of neurons between 1 and 30 depending on the sensory parameter predicted and used the hyperbolic tangent sigmoid function. The output layer used the pure linear transfer function and has only one neuron. This neuron shows the estimated value of one of the sensory parameters. The use of a known seed value number to randomly initialize the weight and bias matrix allows us the reproducibility of data [24]. The pairs of NIRS-sensory data, i.e., input-output data, were randomly divided for all ANNs into three sets as follows: training, validation, and test set that accounts for the 70%, 15%, and 15% of the data respectively. Then, 28 ANN architectures, one for each of the sensory parameters, were optimized. Tests were carried out with the Scaled Conjugate Gradient Backpropagation and Levenberg-Marquardt Backpropagation training algorithms. The Deep Learning Toolbox of MatLab (MathWorks ® ) in its R2018 version was the software used for all the tests.

Sensory Analysis
Sensory analysis is referred to as the evaluating of perceptible characteristics or organoleptic properties of ham termed as "attributes". The technique used for the sensory characterization of ham was the quantitative descriptive analysis (QDA), which is the technique most frequently used with training panels to describe the sensory properties of different types of dry-cured ham [25][26][27]. In the case of dry-cured ham, the sensory attributes are the result of the interaction between the quality of the fresh material and the biological changes which occur during the processing [28,29], which are influenced by both the technological process and the duration of the maturation [30]. The results obtained in the tasting sessions for each of the attributes described in this study can be seen in Table 2. * IM: 100% Iberian animals fed in "montanera"; ** CM: Iberian animals fed in "montanera"; *** CC: fodder-fed Iberian animals; a,b,c -Different letters in the same line indicate statistically significant differences (p < 0.05) between the three groups of ham samples.
As far as the appearance profile is concerned, the attributes of veined, fat color, color intensity, exudate, and white dots present statistically significant differences (p < 0.05) which depend on the type of ham analyzed. Hams from IM pigs therefore gave lower scores for the attributes of veineds, fat color, exudate, and white dots. For the first two attributes, the maximum scores corresponded to CC hams while for the exudate and white dots CM hams obtained the highest scores. For all these parameters both the feeding and genetics of the animals had a significant influence on the scores awarded by the samplers. All the samples analyzed in this study are from Iberian pigs, either 100% pure or crossed at 75 or 50%; a characteristic of this breed is a high intramuscular fat (IMF) content owing to both the rearing system and the genetic features of the pig breed [31]. The high content in muscular fat has been related to the veined and exudate parameters [32,33]. In this study, higher values of these parameters were found for crossbred samples (CM and CC). A higher color intensity was found in animals fed in montanera (IM and CM) related to greater exercise and to yellower fat which was probably due to the higher unsaturation of the fat. Color homogeneity is the only visual attribute which presents no significant differences between the groups. This attribute is more closely related to the dry-curing process, which includes the origin of the formation of compounds associated with the characteristic color of dry-cured meat products [34].
In relation to flavor, all parameters have shown statistically significant differences between the three groups of hams analyzed except for the parameters of atypical aroma, sourness, and saltiness. These parameters are associated with defects present in cured hams and appear to be related to the technological processes and maturation conditions of the product. CM hams showed the highest values of odor, flavor intensity, fat flavor intensity, cured flavor, sweetness, and aftertaste, while CC hams showed in general the lowest values of the same parameters with the exception of fat flavor intensity which was lower in IM hams.
The factors of feeding and genetics of the animal have a different influence according to the attributes; only odor, flavor intensity, cured flavor, and aftertaste presented significant differences for both factors. Therefore, feeding had a significant influence on the parameters of cured aroma, pig aroma, sweetness, and aftertaste while genetics had a significant influence regarding rancidity, aroma and flavor, fat flavor, and atypical flavor. Lipolysis and proteolysis are the main biochemical reactions involved in the generation of a wide range of volatile compounds [35,36]. The fat present in both the muscles and the subcutaneous tissue appears to be of great importance in the entire flavor of Iberian hams and means that the flavor of this type of product is highly complex. The volatile compounds which contribute towards the odor and flavor of dry-cured ham are mainly generated during the maturation process from the oxidation of the fatty acids and Maillard reactions [37]. To a lesser extent, volatile compounds are formed from mold and yeast and Iberian ham has a particularly high concentration [38]. There are also a small number of compounds which are directly accumulated in pig fat deposits from feeding [39], which would justify the low number of parameters with significant differences which can be directly attributed either to the different genetic purity or to the feeding system of the pigs.
The results obtained in the texture parameters show that chewiness, gumminess, and heterogeneity are the only attributes which do not present significant differences in the scores awarded by the assessors for the three groups of hams analyzed. IM hams have the lowest scores in the attributes of juiciness and fatness and the highest in the attributes of hardness and chewing residue. High intramuscular fat (IMF) content thus appears to have a very remarkable effect on the texture of dry-cured ham [32], increasing the juiciness and decreasing the hardness and fibrousness [32,39]. In our study, we found a correlation between the veined and texture parameters. The lower the veined value the lower the juiciness and fatness and the higher the hardness. During the processing of dry-cured ham proteolysis, that is affected by an important number of factors such as pH of fresh ham, anatomic location, temperature, water, or salt content [40][41][42], is one of the main biochemical reactions. In fact, proteolysis is considered to be the major contributor to texture changes [43,44].
Previous studies suggest that the color of Spanish dry-cured hams has a strong correlation with their texture [45]. From our results, a negative correlation (at the 0.01 level) can be observed between the attributes of color fat and color homogeneity and the parameters of texture: hardness, chewiness, gumminess, heterogeneity and chewing residue. Likewise, they show a positive correlation with the fatness attribute. For its part, the color intensity attribute presents no correlations with any of the texture parameters analyzed.

Spectral Characteristics
In the ham samples analyzed by the assessors, the register of their spectra was carried out by using NIRS technology and a remote reflectance fiber-optic probe. The mean spectral curves of the registered samples are shown in Figure 1. The wavelengths responsible for the NIR are due to C-H stretching combinations with other vibrational modes, in addition to the strong absorptions shown by the molecules containing N-H, S-H, and P-H. In this way, the NIR spectra obtained allow us to establish a relationship between different chemical molecules and functional groups and the sensory parameters analyzed in the ham. Group C-oil is therefore strongly related to the perception of the saltiness and fatness of the ham and group C-Cl is related to saltiness and rancidity. Group C-O-oil is related to the fibrousness of the product and group SH-SH is strongly related to texture parameters such as fibrousness, chewiness, The wavelengths responsible for the NIR are due to C-H stretching combinations with other vibrational modes, in addition to the strong absorptions shown by the molecules containing N-H, S-H, and P-H. In this way, the NIR spectra obtained allow us to establish a relationship between different chemical molecules and functional groups and the sensory parameters analyzed in the ham.
Group C-oil is therefore strongly related to the perception of the saltiness and fatness of the ham and group C-Cl is related to saltiness and rancidity. Group C-O-oil is related to the fibrousness of the product and group SH-SH is strongly related to texture parameters such as fibrousness, chewiness, and gumminess. In addition to these chemical groups which provide greater weight and higher correlation coefficients in the NIR predictive models, we have been able to relate other groups with some of the sensory attributes analyzed as is shown in Table 3. Table 3. Sensory attributes for which it has been possible to establish a relationship with the spectral wavelengths and the chemical groups responsible for the perception of this attribute.

Artificial Neural Network (ANN)
The results obtained in the sensory analysis of the hams presented in this study allow the availability of sufficiently heterogeneous products, owing to which we have a satisfactory sample for assessing the application of neuronal networks in the prediction of the same. ANNs become useful in those cases in which the rules underlying the data are unknown or only partially known [17].
The neural networks tested were constructed by using the NIR spectra and the sensory parameters such as input and output data respectively. The diagram of the network structure used is shown in Figure 2. The input data were the values obtained from NIR spectra. A total of 451 reflectance data for each sample, corresponding to the 451 log 1/R values obtained between 1100 and 2000 nm were measured every 2 nm. In turn, each register is the result of the measurement of the NIR spectrum at 32 different points of that sample. As output data, we used the average values of the sensory parameters provided by the assessors for each of the sensory parameters analyzed.
Although the ANN technique has many advantages, model users always spend a great deal of time and effort in the process of parameter training. Identifying the optimum parameters of ANNs can help us avoid an unnecessary waste of time and effort [46]. For this reason, an attempt was made to assess the training algorithm and the network architecture in order to predict dry-cured ham sensory analysis. The ANN training algorithms Scaled Conjugate Gradient (SGC) and Levenberg-Marquardt (LM) were examined. For each of them between 1 and 30 neurons were tested in the hidden layer. In total 1500 networks were analyzed, 30 different values of neurons in the hidden layer with 50 different initial states for each of them. The suitability of the networks obtained was established from the value R 2 (the R-square between the target and the estimated parameter). For each sensory parameter, the networks with a value exceeding R 2 > 0.72 in the test set were taken into account, which gives an idea of the number of networks generated with the capacity for predicting this parameter. The results obtained reveal that the parameter with the largest number of networks capable of predicting it were heterogeneity (26.4% of the networks) followed by the parameters of sourness (13.4%), atypical flavor (9.5%), and odor (7.0%). The LM training algorithm allowed the finding of networks for the prediction of all the sensory parameters and was the one providing the largest number of networks with R 2 > 0.72.
The number of neurons in the hidden layer should be between the input and the output layer size and be determined empirically [47,48]. Networks with from 1 to 30 neurons and three different number of training times (30, 100, and 500) were tested. Table 4 shows the number of neurons providing the best ANN architecture (in terms of obtaining the highest R 2 ) for each number of training times assessed. The results show that when the training times increase the number of neurons in the hidden layer necessary for obtaining the network with the highest R 2 falls, in such a way that in the case of 100 and 500 training times it will not be necessary to test a number of neurons The input data were the values obtained from NIR spectra. A total of 451 reflectance data for each sample, corresponding to the 451 log 1/R values obtained between 1100 and 2000 nm were measured every 2 nm. In turn, each register is the result of the measurement of the NIR spectrum at 32 different points of that sample. As output data, we used the average values of the sensory parameters provided by the assessors for each of the sensory parameters analyzed.
Although the ANN technique has many advantages, model users always spend a great deal of time and effort in the process of parameter training. Identifying the optimum parameters of ANNs can help us avoid an unnecessary waste of time and effort [46]. For this reason, an attempt was made to assess the training algorithm and the network architecture in order to predict dry-cured ham sensory analysis. The ANN training algorithms Scaled Conjugate Gradient (SGC) and Levenberg-Marquardt (LM) were examined. For each of them between 1 and 30 neurons were tested in the hidden layer. In total 1500 networks were analyzed, 30 different values of neurons in the hidden layer with 50 different initial states for each of them. The suitability of the networks obtained was established from the value R 2 (the R-square between the target and the estimated parameter). For each sensory parameter, the networks with a value exceeding R 2 > 0.72 in the test set were taken into account, which gives an idea of the number of networks generated with the capacity for predicting this parameter. The results obtained reveal that the parameter with the largest number of networks capable of predicting it were heterogeneity (26.4% of the networks) followed by the parameters of sourness (13.4%), atypical flavor (9.5%), and odor (7.0%). The LM training algorithm allowed the finding of networks for the prediction of all the sensory parameters and was the one providing the largest number of networks with R 2 > 0.72.
The number of neurons in the hidden layer should be between the input and the output layer size and be determined empirically [47,48]. Networks with from 1 to 30 neurons and three different number of training times (30,100, and 500) were tested. Table 4 shows the number of neurons providing the best ANN architecture (in terms of obtaining the highest R 2 ) for each number of training times assessed. The results show that when the training times increase the number of neurons in the hidden layer necessary for obtaining the network with the highest R 2 falls, in such a way that in the case of 100 and 500 training times it will not be necessary to test a number of neurons higher than 10 in the hidden layer. The optimum number of neurons in the hidden layer and training times was different for each of the sensory parameters analyzed in the ham. Owing to the variability of the results it was decided to assess the sensitivity of the parameters of ANN architecture. Following the model proposed by [46] to identify the sensitivity of parameters of ANN architecture, the sensitivity index (S) was calculated. Our results show that there is a direct relationship between the number of neurons in the hidden layer and the number of training times and the R 2 for all the parameters analyzed with the exception of the "rancidity aroma." According to our results, 23 of the 28 estimated sensory parameters in dry-cured ham are more sensitive to the number of neurons in the hidden layer than the number of training times in ANN architecture. Only the visual color intensity parameter, the flavor intensity and atypical flavor parameters, and the juiciness and chewing residue texture parameters show more sensitivity to the training times.
Once the best network architecture had been established, the sensory parameters of dry ham were predicted. Figures 3-5 show the prediction graphs and the R 2 values and the adjustment lines obtained. The R 2 values obtained vary between 0.51 for the pig aroma parameter to 0.82 for the flavor intensity parameter.
flavor of dry-cured hams (Figure 4), the values with the highest correlation were aftertaste, rancidity, and flavor intensity. The results obtained for the texture parameters ( Figure 5) show that juiciness, fatness, and fibrousness provide the networks with the best adjustments. Of the 28 sensory parameters analyzed no relation was found between the prediction capacity of the network and the significant differences in the values given by the assessors, whether owing to the purity effect of the breed or to the feeding effect.     The prediction network generated was further tested with 14 samples of ham (a set test) which were neither part of the training nor the validation set. The mean squared errors (MSEs) between the targets and the ANN outputs were assessed ( Table 5). The MSEs found varied between 0.0196 and 0.5878; the highest errors occurred in the prediction of the texture and visual parameters. The best results in the prediction of sensory parameters were obtained for the parameters related to flavor. The lower prediction capacity of the network could be seen in the attributes of pig aroma, atypical aroma, sourness, and gumminess with an R 2 between 0.51 and 0.59 (Figures 4 and 5). However, when the network generated was checked against the set test the number of errors made by the network in the prediction of these parameters is low. The values obtained in all the sensory parameters analyzed suggest that the network generated can be applied satisfactorily to unknown samples. As far as the appearance profiles ( Figure 3) are concerned, all of them show a satisfactory correlation between the target and the values predicted by the network. In relation to the odor and flavor of dry-cured hams (Figure 4), the values with the highest correlation were aftertaste, rancidity, and flavor intensity. The results obtained for the texture parameters ( Figure 5) show that juiciness, fatness, and fibrousness provide the networks with the best adjustments. Of the 28 sensory parameters analyzed no relation was found between the prediction capacity of the network and the significant differences in the values given by the assessors, whether owing to the purity effect of the breed or to the feeding effect.
The prediction network generated was further tested with 14 samples of ham (a set test) which were neither part of the training nor the validation set. The mean squared errors (MSEs) between the targets and the ANN outputs were assessed ( Table 5). The MSEs found varied between 0.0196 and 0.5878; the highest errors occurred in the prediction of the texture and visual parameters. The best results in the prediction of sensory parameters were obtained for the parameters related to flavor. The lower prediction capacity of the network could be seen in the attributes of pig aroma, atypical aroma, sourness, and gumminess with an R 2 between 0.51 and 0.59 (Figures 4 and 5). However, when the network generated was checked against the set test the number of errors made by the network in the prediction of these parameters is low. The values obtained in all the sensory parameters analyzed suggest that the network generated can be applied satisfactorily to unknown samples.

Conclusions
The results obtained in this study allow us to conclude that NIR spectral information and the application of ANNs could be an interesting tool for predicting the sensory parameters of dry-cured hams. The sensory analysis of ham requires a great investment of time and a trained panel to carry it out. With the methodology proposed it would be possible to predict the sensory parameters of the ham at the same time as it is sliced. The results showed that these models have the ability to predict the most important sensory parameters for dry-cured ham with relatively high accuracy. Future studies with greater heterogeneity of samples will be necessary to improve the results obtained for some sensory parameters. Funding: This study was made possible by the funds jointly provided for the research project by the Junta de Castilla and León and the European Regional Development Fund (SA039P17).