Abstract

Identification of chicken quality parameters is often inconsistent, time-consuming, and laborious. Near-infrared (NIR) spectroscopy has been used as a powerful tool for food quality assessment. However, the near-infrared (NIR) spectra comprise a large number of redundant information. Determining wavelengths relevance and selecting subsets for classification and prediction models are mandatory for the development of multispectral systems. A combination of both attribute and wavelength selection for NIR spectral information of chicken meat samples was investigated. Decision Trees and Decision Table predictors exploit these optimal wavelengths for classification tasks according to different quality grades of poultry meat. The proposed methodology was conducted with a support vector machine algorithm (SVM) to compare the precision of the proposed model. Experiments were performed on NIR spectral information (1050 wavelengths), colour (CIE, chroma, and hue), water holding capacity (WHC), and pH of each sample analyzed. Results show that the best method was the REPTree based on 12 wavelengths, allowing for classification of poultry samples according to quality grades with precision. The selected wavelengths could lead to potential simple multispectral acquisition devices.

1. Introduction

Near-infrared spectroscopy (NIRS) has been used for prediction of physicochemical properties of food, being applied to objective control and monitoring of food quality [1]. Also, it is a sustainable alternative as it requires no chemicals that might harm the environment and are hazardous to human beings. The near-infrared spectrum comprises a large set of overtones and combination bands. Selecting a few essential wavelengths related to the response information can reduce significantly the amount of data to be analyzed, providing information for the development of multispectral systems. In this way, multivariate statistical methods could be used for extraction of detailed information of the spectra [2].

Implementation of NIRS as a process analytical technology (PAT) to the food industry involves a multidisciplinary approach in which computational intelligence (CI), particularly machine learning (ML) [310], has been investigated. The main advantage of CI is its capacity of handling multiple parameters, facilitating fast and accurate evaluation of samples in an industrial environment [11].

Recently, ML techniques application has been investigated for several food processing needs, including prediction and assessment of food quality [3, 4, 1218]. Wang et al. [13] predicted the total viable counts (TVC) in pork using support vector machines (SVM), showing the advantage of a rapid and readily performed analysis obtaining coefficient of correlation of .

Multilayer perceptron (MLP) neural network was used to correlate Fourier transform infrared (FTIR) spectral data with beef spoilage, with good performance of the classifier with 10 neurons in the hidden layer providing a overall correct classification [12].

Argyri et al. [15] explored SVM applied to beef samples under different packaging conditions by spectroscopy and sensory analysis in order to predict fresh, semifresh, and spoiled samples. It was reported that the ML techniques (including artificial neural networks (ANN)) provided improved prediction models with accuracy, for the various groups when compared to multivariate statistical methods. Qiao et al. [18] predicted beef eating quality attributes, namely, colour, ultimate pH, and slice shear force (SSF) using spectroscopy methods, achieving prediction results over using SVM on three datasets.

One of the SVM limitations is the selection of the kernel function and its hyperparameters values. SVM cannot identify more than two label (binary classification) data efficiently [19, 20]. Another disadvantage is complex training for a large training set, as each class must be taught against all data from all other classes [21], thus making SVM application in the meat industry more challenging [13]. The disadvantage of approach parametrization also occurs in ANN architecture, which uses empirical experimentation. In addition, a choice of a kernel demands experience on the ANN types, such as backpropagation neural network (BPNN), multilayer perceptron (MLP), or radial basis function (RBF). Hence, both approaches (ANN and SVM) can only handle numerical attributes, which in practical terms demand data preprocessing and normalization.

Decision Tree (DT) induction algorithms allow handling the limitation of a high number of classes (different from traditional SVM kernels), empirical selection, and ANN setup [20]. The majority of the DT induction algorithms can handle different types of attributes (numerical/categorical) and even missing values. Additionally, DTs yield accurate multiclass classifiers and improve predictive performance with multiclass problems directly [22].

REPTree is a fast learner DT induction algorithm that builds a Decision Tree based on information gain as the splitting criterion and prunes it by reduced-error pruning [23, 24]. REPTree is a useful Decision Tree method because of the ability to deal with different scenarios [23]. A comparison among different DT and other highly accurate algorithms (e.g., random forest) demonstrated that REPTree obtained the best performance of DT algorithms [25]. When compared to J48 and SimpleCart, REPTree achieved the best results regarding the reduced-error pruning [24]. A previous work reported the comparison between SVM and REPTree applied to the physical and chemical attributes of chicken meat, namely, pH, WHC, and colour features. The results show that REPTree achieved better results for classification of samples according to quality grades [26].

M5P is another algorithm to build Decision Trees, where leaves are linear models [22]. It is useful for wavelength selection and has advantages compared to traditional prediction algorithms, including the ability to deal with both categorical and continuous variables and to handle variables with missing values [27]. Zhang et al. [28] presented a comparison among M5P and two linear regressors: ridge linear regression (RLR) and support vector regression (SVR) for multilabel classification focusing on space dimension reduction.

Witten et al. [22] described the Decision Table (DTable) as a type of a classifier for scheme-specific attribute selection. Subramanian et al. [29] described that the DTable is better than DT in the problem-solving task when the number of attributes is large, existing the risk of ambiguities and omission. In [30], it was applied to understand the features in a fault diagnosis scenario owing to facilitate the model design.

Consumption of chicken meat has increased worldwide, with chicken processing industry playing an important economic role. Guaranteeing high-quality chicken meat is essential to keep the supply chain and a major demand from consumers.

Physical and chemical parameters such as colour, water holding capacity (WHC), and pH are often used to classify chicken meat in quality grades, such as pale, soft, and exudative (PSE); dark, firm, and dry (DFD); and normal (N) or pale (P) samples [31]. However, these techniques are laborious and time-consuming for the fast-processing lines of the meat processing industry [32]. Thus, novel methods for fast, objective, and reliable meat quality classification are needed.

Thus, the main objective of the current work is to use machine learning approaches on different wavelengths obtained by NIRS spectra, colour (CIE, chroma, and hue), WHC, and pH to classify chicken meat samples according to quality grades. Considering the limitations of some ML approaches, in this work, we perform the quality assessment based on Decision Trees and Decision Table, more precisely: M5P, REPTree, and Decision Table algorithm. In addition, we further extend previous tests [26]. In order to compare the selected approaches with current literature, we use an SVM based on training by sequential minimal optimization (SMO) with a normalized PolyKernel, enhanced for multiclass scenarios based on feature subsets using best-first search. To evaluate the supervised ML approaches, the classification of selected wavelengths was based on class labels (PSE, DFD, N, and P).

2. Materials and Methods

2.1. Preparation of Poultry Samples

Slaughtered chicken breast fillets (pectoralis major muscle) were selected by an experienced analyst to comprise as large variation in quality features as possible. All samples were supplied by local retailer in two batches: samples, within 5 h after slaughtering and transported under refrigerated conditions to the Laboratory of Food Science at State University of Londrina, Londrina-PR, Brazil, for further analysis [33]. The central part of each sample was carefully trimmed with a surgical scalpel to fit into a sample cell (ring cup) for NIR spectral acquisition. Subsequently, samples were minced using a kitchen chopper for 10 s, and NIR spectra were then acquired for minced meat samples. Near-infrared spectra were collected and analyzed in a near-infrared spectrometer, FOSS NIR Analyzers XDS™, in the wavelength range of 400–2500 nm.

2.2. Quality of Poultry Meat

Chicken quality attributes were measured at 48 h postmortem, since it is within this time that most of the biochemical changes in meat take place [34, 35]. After a 30 min blooming period, ultimate pH values were measured using a Testo 205 (Testo AG, Lenzkirch, Germany); the average of two measurements was taken for each sample.

Colour features were calculated as the average of four consecutive measurements at random locations of samples using a Minolta colorimeter (CR 400, D65 illuminant, and 10° observer, Konica Minolta Sensing Inc., Osaka, Japan) after calibration with a standard ceramic tile. Colour was expressed in terms of values for lightness (), redness (), and yellowness () using the Commission Internationale de l′Eclairage (CIE) colour system [36, 37].

Water holding capacity (WHC) was calculated based on meat water loss when pressure is applied on the muscle [38]. Cubic pieces of samples weighing 2 g were laid between two filter paper circles placed on acrylic plates, on which a 10 kg weight was put for 5 min, with the samples and then removed from the filter papers, and weighted. Water loss was calculated as the difference between the initial and final weight. Results were expressed as the percentage of drip loss relative to the initial sample weight.

All samples were preclassified into four different quality grades based on colour reflectance and ultimate pH, namely, pale (P) ( , ), pale, soft, and exudative (PSE) (, ); dark, firm, and dry (DFD) ( ,  ); and normal (N) (,). Values are based on information adapted from Barbin et al. [1], with samples within these ranges representing the four classes. After classifying the samples, the dataset was comprised of 38 normal, 24 PSE, 89 pale, and 7 DFD samples.

2.3. Wavelength Selection

In order to achieve an efficient dimensionality reduction, correlation-based feature selection (CFS) was applied to remove irrelevant and redundant information from the spectra. This method is based on a degree of dependence or predictability of a wavelength with another, indicating the best subset of features for classification. Yu et al. [39] described that CFS exploits best-first search based on some correlation measurement that evaluates the appropriateness of a subset by the individual predictive ability of each feature and the degree of correlation between them. It was also applied a Decision Table, REPTree, and M5P classifiers that have an inherent characteristic of attribute selection, reducing dimensionality, and providing a classification model, were applied [40].

The first step of feature selection was to identify the relevant technological (pH, WHC, and colour) attributes assessed by classification in categories PSE, P, N, and DFD. The referenced quality attributes were processed by CFS, and the best subset was obtained (Figure 1).

After identification of the best subset merit, wavelength selection was performed focusing on attributes of the best subset. Considering an imbalanced dataset, a resampling method was applied to obtain a uniform class distribution. Thus, the best subset was calculated in different scenarios: balanced and imbalanced dataset to validate the best subset obtained.

In order to obtain a unique set of attributes, named as , a merge of best subset attributes of raw (original subset), , and the resampled subset, , was performed.

The second step was the application of algorithms CFS, Decision Table, REPTree, and M5P to describe the correlation between and wavelengths, individually. Finally, the second merge among best wavelengths for each a results in the final wavelengths that were used as a sample descriptor in the classification task. CFS, Decision Table, REPTree, and M5P had different sets of wavelengths. Descriptors were referred as , , , and . SVM, as SMO support vector machine based on polynomial kernel [41, 42], was applied in , all wavelengths, and traditional parameters to establish a comparison with traditional ML approaches because SVM has no dimension reduction properties.

2.4. Classifier Evaluation

Wavelength selection was compared by coefficient of correlation (CC), mean absolute error (MAE), and root mean squared error (RMSE). The first illustrates a quantitative value of the relationship between the subset of wavelengths, W, and the most significant traditional attributes found, . MAE measures the average magnitude of the relationship between and W. Finally, RMSE is a quadratic scoring of the average magnitude of the error. In other words, the greater difference between MAE and RMSE illustrates more significant variance in individual errors of samples. A similar value of RMSE and MAE means that all the errors present the same magnitude.

The accuracy of the model for quality classification was assessed by confusion matrices as the final output from 10-fold cross-validation (CV) over 30 repetitions. This was adopted because it was used as a four-class dataset (namely, PSE, DFD, P, and N) without overlapping. Confusion matrices represent appropriate evaluation criteria to select the most suitable classifiers (REPTree, M5P, and Decision Table).

True positive (TP) and true negative (TN) mean that a sample was correctly recognized, and it is the desired result. False positive (FP) and false negative (FN) occur when the ML approach, incorrectly, classifies a sample assigning a wrong class.

The average per-class effectiveness of a classifier was measured by average accuracy. The average per-class agreement of the data class labels with those of classifiers was estimated by , and the average per-class effectiveness of a classifier to identify class labels was estimated by . F-Measure is the harmonic mean of Precision and Recall and allows us to determine if one algorithm is superior to another as a particular goal. The results were also summarized in a critical difference (CD) diagram, as previously proposed in [43].

3. Results and Discussion

3.1. Wavelength Subset Selection

As Table 1 indicates, pH and present a gradient distribution along with the classes addressed. All the samples matched the quality criteria used, supporting the classification into one of the four possible classes. The poultry dataset consisted of 158 samples, comprising 24, 86, 41, and 7 samples of classes PSE, P, N, or DFD, respectively. Step 1 (Figure 1) consisted in the application of CFS in order to find the best subset of attributes based on subset merit. The selected attributes were   with .

The same approach was performed on the balanced dataset to corroborate the subset found. The balanced dataset was created using a technique of resampling that removes the sample of maximal classes, namely, PSE [24], P (86), and N [41]. After resampling, the balanced dataset was composed of 12, 7, 6, and 6 samples of PSE, P, N, and DFD, respectively. The selected attributes were pH and that found   with . The range of pH values in the database was 5.62 and 6.43, with an average of 5.95 and standard deviation of 0.15. Luminosity values were in the range between 43.53 and 67.53, with an average of 57.32 and a standard deviation of 6.43.

After subset merging,   was calculated. Step 2 was performed using CFS, DTable, REPTree, and M5P algorithm to identify the most relevant wavelengths for   and , as shown in Table 2.

CFS evaluation was based on Merit and was not compared to the others, which were evaluated by coefficient of correlation and error rates. Independent of measurement, the higher correlation (or Merit) was obtained by selected wavelengths to perform prediction.

M5P algorithm identified 12 wavelengths for pH description and obtained 0.80 as a coefficient of correlation, obtaining the higher pH correlation value and lower error (MAE and RMSE). Based on these 12 wavelengths, M5P was capable of reducing to only linear model (Appendix A.1), without designing a tree.

For , M5P algorithm achieved the highest correlation (0.95) and lower error values (Figure 2). Thus, the combination of wavelengths identified by M5P comprises , used for further classification.

Considering , REPTree and M5P found a similar amplitude value of 2.29 as a threshold to obtain a classification (Figures 2 and 3). It is possible to observe that REPTree applied the second verification using or to achieve the final result (Figure 3). For pH, the REPTree model creates a tree (Figure 7) based on 6 wavelengths, not observed in M5P selection. However, even M5P containing a lower number of nodes achieves superior correlation results, justified by the use of linear models to identify a class in the leaf node.

A significant result regarding wavelength reduction was observed in Decision Table, which reduces identification to only one wavelength, (Table 3). Using and a Decision Table, a coefficient of correlation of 0.91 by 10 rules was obtained. For , Decision Table algorithm obtained 37 rules based on 5 wavelengths, as shown in Table 7.

Among the selected wavelengths, it was observed that , which is related to the red colour in the visible spectrum, was into the best subsets for , , and for pH identification. Independently of the algorithm, pH required more wavelengths than , an average of 6 wavelengths against 3.5, respectively.

Most of the wavelengths identified are closely related to the yellow-red colour in the visible spectrum (570–750 nm), which is the main range where chicken meat colour varies. Regarding the NIR spectrum, the main wavelengths identified were 968 nm, which is related to the O-H stretching associated to water, 1354 nm, associated to C-H stretching, and 1880 nm, associated to O-H stretching [44].

3.2. Poultry Quality Classification

To compare the algorithms, SVM was induced over and full-wavelengths dataset; DTable over and ; and REPTree over , full wavelengths, and traditional parameters, as shown in Table 4.

After 30 repetitions, the standard deviation of weighted average was about 0.006 (DTable), 0.009 (Decision Table over M5P selection), 0.017 (REPTree), and 0.004 (SVM) for data presented in Table 4. The standard deviation of the experiments presented in Table 5 was about 0.008 for REPTree and 0.007 for SVM. Finally, the standard deviation of experiments highlighted in Table 6 was about 0.002, 0.008, and 0.007 for SVM, REPTree, and REPTree over pH and L, respectively.

Considering the approaches that handle the selected wavelengths, REPTree achieved the best results with higher precision (0.740). When compared to SVM, the other algorithms provided better results for multiclass evaluation. This was observed for PSE and DFD samples, where the values for parameters , , , and F-Measure were zero, meaning that none of these samples was correctly classified. However, P and N samples achieved good results of by SVM, as well as F-Measure. However, the poor results observed for PSE and DFD corroborate previous investigations [13, 1921], highlighting the limitation on a multiclass scenario.

The ability to overcome this limitation was observed for REPTree. This algorithm was superior to SVM but was not feasible for multiclass identification based on . It is possible to see in Table 4 that DTable obtained a zero value in measurements for PSE samples. Better results of DTable was on , which achieved the lower FP rate on PSE samples. In general, it was observed that REPTree was the best approach, followed by DTable on M5P subset. Pure DTable and SVM on the CFS subset presented limitations on the multiclass scenario currently investigated.

It was observed that DFD and PSE were the classes with the smaller number of samples misclassified by SVM and DTable. There were fewer DFD samples (7) compared to P samples (86). To investigate the balancing effect over SVM, DTable, and DTs, the same experiments on the balanced dataset were performed, and the results obtained were similar. SVM and DTable algorithms are limited to handle a multiclass scenario, thus being better for binary problems.

SVM and REPTree were compared to support the hypothesis of high dimensionality influence on classification accuracy. The results of SVM applied to the full wavelengths dataset are presented in Table 5. The same behavior of limitation on multiclass scenarios (recognition of PSE and DFD was deficient) and lower results in SVM precision (0.531) were performed.

REPTree achieved good results, based on full wavelengths: TP of 0.778, FP of 0.199, precision of 0.747, recall of 0.778, and F-Measure of 0.741 as observed in Table 5. REPTree provided slightly superior results over the wavelengths subset when using all wavelengths, with a difference of 0.006 of F-Measure.

3.3. Comparison between NIR and Traditional Attributes

REPTree was applied on traditional parameters for classification of samples, achieving better results in comparison to NIR wavelengths. It achieved the higher value of TP and the lower value of FP with an F-Measure of 0.981. The results obtained for REPTree applied on traditional parameters are similar, once REPTree in both cases selects only pH and to construct the regression tree (Table 6). This fact is based on the strategy of Decision Tree being based on the most informative features computed by information gain/ratio. In other models, REPTree algorithm identifies pH, and is sufficient to solve the classification problem. It is possible to see in Table 6 that SVM algorithm over traditional parameters shows the same behavior of previous experiments, which could not handle the multiclass problem with robustness, obtaining 0.621 average precision. CFS was applied on the best subset (3.1) to observe the SVM algorithm over a subset of traditional parameters. An average precision of 0.626, similar to results based on all traditional parameters, was obtained.

An advantage of wavelength selection is the complexity reduction of Decision Tree generated. It is possible to observe a DT composed by four nodes (wavelengths), simpler than Decision Tree created by whole wavelengths (Figure 4). In this case, the Decision Tree created had four levels with ten nodes, a more complex solution as shown in Figure 5. This figure is an example of a tree designed, and once we perform 30 repetitions to evaluate the precision of the method, in other words, the wavelengths amplitudes can change for each model, but the wavelength selected was the same.

The complexity can be exemplified by the number of paths to reach the leaves of the tree. Based on DT presented in Figure 4, it was possible to classify PSE, DFD, and N samples with just one path for each class. In Figure 5, only DFD provided this observation. For instance, PSE has three different paths from the root to the leaf of classification.

In order to compare the results obtained, Friedman’s statistical test [43] with a significance level at was applied. The null hypothesis here states that the performances of the induced classifiers are equivalent regarding the averaged accuracy per class. Any time the null hypothesis was rejected, the Nemenyi post hoc test was applied, stating that the performance of two different algorithms is significantly different whether the corresponding average ranks differ by at least a critical difference (CD) value. When multiple classifiers are compared in this way, the results can be represented graphically with a simple critical difference (CD) diagram.

Figure 6 shows the results of the statistical tests.

Thus, according to the results, no significant differences were observed when comparing REPTree method to SVM (with the best subset by CFS) and DTable (over M5P selected wavelengths). SVM without wavelength selection was the worst method overall, while the DTable was the best one. This suggests that the DTable method is the best approach, but this algorithm cannot handle PSE samples. SVM based on CFS presented the same problem for PSE and DFD. Thus, REPTree model is a feasible choice (Figure 4).

Based on the methodology applied in the current work, it was possible to observe that ML approaches could have a substantial impact on spectral data analysis. Differently from traditional applications of SVM and ANN, which require several parametrizations and create a ”black box” output model, the results presented show the potential of Decision Table and Decision Tree as an alternative to performing a multivariate spectral subset selection, in addition to constructing accurate and visual prediction models.

The step of attribute selection contributed to a best wavelengths comprehension, diminishing dimensionality of the problem mainly to build a classification model with reduced overfitting.

The wavelengths detected as optimal for classification task are in the visible range of the spectra which allow the creation of simple acquisition devices. This equipment could substitute the use of colorimeter, pH meter, texture meter, and WHC evaluation environment. Another advantage is the alternative of traditional NIRS equipment, where a simple device limited to a few wavelengths could achieve similar analysis. On the contrary, a pH meter associated with a colorimeter could provide satisfactory results with similar accuracy to NIR, by using proper data processing techniques. In addition, it is common practice to measure pH in the meat processing industry, as it affects several other attributes (i.e., colour and WHC). Predicting the pH could be an alternative to compare the model accuracy to the measured value of this attribute. In addition, for industrial processing lines, it could represent a fast method for a huge number of samples.

4. Conclusion

Poultry meat quality assessment is possible based on spectral analysis considering few selected NIR wavelengths. All wavelengths are in the visible range of the spectra which allow the creation of simple acquisition devices based on low-cost components.

On the contrary, the use of Decision Table and Decision Trees induction algorithms to avoid complex configurations or necessity of expertise on a particular technique was proposed. SVM and DTable presented limitations when applied to multiclass scenarios. DT models (REPTree) obtained superior results of performance while achieving a comprehensive model that describes the optimal wavelengths.

Appendix

A.1. Linear Model Obtained by M5P to Calculate pH, as in Section 3.1

A.2. Decision Tree Designed by REPTree for pH Prediction, as in Section 3.1

A.3. Decision Table for Prediction based on , , , , and by the Use of 37 Different Rules

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that there are no conflicts of interest.

Acknowledgments

The authors acknowledge a preliminary discussion concerning the application of SVM and REPTree dealing with physical and chemical features of chicken meat, as presented in a previous paper [26]. The authors also acknowledge Professor Massami Shimokomaki (in memoriam) for his contribution to this research. The authors would like to thank São Paulo Research Foundation (FAPESP), Young Researchers Award (Grant no. 2015/24351-2), and the Brazilian National Council for Scientific and Technological Development (CNPq) (Grant no. 404852/2016-5).