A Machine Learning Method for the Detection of Brown Core in the Chinese Pear Variety Huangguan Using a MOS-Based E-Nose

The brown core is an internal disorder that significantly affects the palatability and economic value of Chinese pears. In this study, a framework that includes a back-propagation neural network (BPNN) and extreme learning machine (ELM) (BP-ELMNN) was proposed for the detection of brown core in the Chinese pear variety Huangguan. The odor data of pear were collected using a metal oxide semiconductor (MOS) electronic nose (E-nose). Principal component analysis was used to analyze the complexity of the odor emitted by pears with brown cores. The performances of several machine learning algorithms, i.e., radial basis function neural network (RBFNN), BPNN, and ELM, were compared with that of the BP-ELMNN. The experimental results showed that the proposed framework provided the best results for the test samples, with an accuracy of 0.9683, a macro-precision of 0.9688, a macro-recall of 0.9683, and a macro-F1 score of 0.9685. The results demonstrate that the use of machine learning algorithms for the analysis of E-nose data is a feasible and non-destructive method to detect brown core in pears.


Introduction
Pears are the second most consumed pome fruit worldwide [1], with consumption by the adult population ranging from 23 to 108 g/day [2]. Pears have many beneficial properties for human health, such as antitussive, anti-inflammatory, antihyperglycemic, and diuretic [3]. As an ancient fruit in temperate regions [4], there are many groups of pears, such as the white pear (Pyrus bretschneideri Rehd.), sand pear (Pyrus pyrifolia (Burm. f.) Nakai), and Ussurian pear (Pyrus ussuriensis Maxim.). The Chinese pear variety Huangguan (Pyrus bretschneideri Rehd.), which is a hybrid between Pyrus bretschneideri Rehd. and Pyrus pyrifolia (Burm. f.) Nakai [5], is widely planted in northern China [6] and is popular among consumers because of its crispy and juicy flesh, good taste, and salubrity [7,8]. However, brown core, which is a physiological disease caused by high concentrations of CO 2 [9] and enzymes [10], occurs during the transportation and storage of pears, significantly affecting the palatability and economic value of the fruit [11]. It is difficult to detect browning in pears based on their appearance, and destructive methods are required because browning of pears usually spreads from the core to the flesh [12]. Therefore, it is of practical significance to develop a non-destructive method to detect brown core in the Chinese pear Huangguan.

Materials and Preparation
We used 342 Chinese pears (Huangguan variety) (referred to as Chinese pears or pears hereafter) (harvested in Zhao county, Hebei province, China) with similar color and size and without insect pests and mechanical damage. The pears were stored (temperature: 0 • C, relative humidity: 90%) prior to the experiment. We used 240 pears as training samples (after 239 days of storage) and 102 pears as test samples (after 251 days of storage).
As shown in Table 1, the browning levels of the Chinese pears were determined by experts at the National Pear Improvement Center at the Hebei Academy of Agricultural and Forestry Sciences. Class 0 represents healthy pears, and class 1 to class 5 are five classes representing increasing degrees of browning. * denotes whether the browning can be discerned by the appearance of the pears. The number of samples for each class are described in Section 4.

E-nose Analysis and Data Acquisition
A PEN3 E-nose (Airsense Analytics GmbH, Schwerin, Germany [28]) was used to collect the odor information of the pears. An array of 10 different MOS sensors is the critical component of the PEN3 E-nose; the details of the 10 sensors are shown in Table 2 [28]. All the experiments were conducted in the author's laboratory (temperature: 25 ± 1 • C, relative humidity: 50 ± 2%). Figure 1 presents the schematic diagram of the collection of odor information using the E-nose. Before using the E-nose to collect data, the pear was placed into a crisper (polypropylene, 150 mm × 150 mm × 180 mm) for 900 s to allow the volatile odor of the pears to fill the crisper. We used the 15 polypropylene crispers to place the sample pears in our experiments. The crisper was cleaned with air filtered by activated carbon after a pear was sampled and not be reused until the remaining 14 crispers were used. The E-nose operation consisted of the collection and cleaning stages. During the collection stage, air flows into the crisper in the direction of arrow-1 and flows out of the E-nose in the direction of arrow-3. During this stage, valve-1 is in the open state and valve-2 is in the closed state. The sample's volatile gas was drawn into the E-nose at a constant flow rate of 10 mL/s and came into contact with the ten MOS sensors in the chamber. As the sensor surface became saturated, the conductivity increased, and the value stabilized. The collection stage lasted 90 s. During the cleaning stage, air filtered by activated carbon was drawn into the E-nose in the direction of arrow-2 to remove the substances adsorbed on the surface of the sensor. During this stage, valve-2 is in the open state and valve-1 is in the closed state. The cleaning stage also lasted 90 s to ensure that the material adsorbed on the surface of the sensor was removed entirely. The cleaning stage occurred after the completion of the collection stage. According to the characteristics of the MOS sensor, the response curve of the sensor increases rapidly initially and then flattens gradually in the collection stage. The stable value (SV) is a crucial and simpler feature parameter of the E-nose response signal, which can reflect the properties of substances in the volatile gas and be used in pattern recognition algorithms appropriately. We used the SV of the response signal as the input data of the neural network. Since the response signal of the Sensors 2020, 20, 4499 4 of 15 PEN3 E-nose entered the stable state at 30 s, we used the data from 31 s to 90 s as the SVs. An example of the response curves of the E-nose for pears during 90 s of collecting stage was showed in Figure 2. Each curve represents the ratio of G (the conductivity of sensors contact with sample's volatile gas) to G 0 (the conductivity of sensors contact with air filtered by activated carbon) and the feature area was displayed between the two red dotted lines. Therefore, the data we obtained were expressed as a 14,400 × 10 matrix for training, and a 6120 × 10 matrix for testing (the sampling period of the E-nose was 1 s).  30 s, we used the data from 31 s to 90 s as the SVs. An example of the response curves of the E-nose for pears during 90 s of collecting stage was showed in Figure 2. Each curve represents the ratio of G (the conductivity of sensors contact with sample's volatile gas) to G0 (the conductivity of sensors contact with air filtered by activated carbon) and the feature area was displayed between the two red dotted lines. Therefore, the data we obtained were expressed as a 14,400 × 10 matrix for training, and a 6120 × 10 matrix for testing (the sampling period of the E-nose was 1 s).  After collecting the data using the E-nose, the pears were immediately cut open and labeled by experts (the label result were showed in Table 3). Photos of the Chinese pears in the six classes of browning levels were obtained and shown in Figure 3b-d. It is challenging to determine to brown of the core based on the appearance in class 1 to class 3.  30 s, we used the data from 31 s to 90 s as the SVs. An example of the response curves of the E-nose for pears during 90 s of collecting stage was showed in Figure 2. Each curve represents the ratio of G (the conductivity of sensors contact with sample's volatile gas) to G0 (the conductivity of sensors contact with air filtered by activated carbon) and the feature area was displayed between the two red dotted lines. Therefore, the data we obtained were expressed as a 14,400 × 10 matrix for training, and a 6120 × 10 matrix for testing (the sampling period of the E-nose was 1 s).  After collecting the data using the E-nose, the pears were immediately cut open and labeled by experts (the label result were showed in Table 3). Photos of the Chinese pears in the six classes of browning levels were obtained and shown in Figure 3b-d. It is challenging to determine to brown of the core based on the appearance in class 1 to class 3.  After collecting the data using the E-nose, the pears were immediately cut open and labeled by experts (the label result were showed in Table 3). Photos of the Chinese pears in the six classes of browning levels were obtained and shown in Figure 3b-d. It is challenging to determine to brown of the core based on the appearance in class 1 to class 3.

Adaptive Moment Estimation Algorithm
The selection of an efficient and suitable optimization algorithm is crucial for neural network training. The Adam algorithm combines the advantages of the AdaGrad method [29] and the RMSProp method [30] and is an optimization algorithm that only requires first-order gradients with little memory requirement [26]. The gradient is not used to update the parameters for the optimization of the objective function in the Adam algorithm. The moment estimation, which is defined in Equations (1) and (2), is used to update the parameters: where t and denote the timestep and gradient, respectively. m and v are the first-order moment estimate and second-order moment estimate, respectively. 1 and 2 are attenuation coefficients. In the initial phase, and tend to be biased towards the starting values [31]. Therefore, the moment estimation is modified as follows:

Adaptive Moment Estimation Algorithm
The selection of an efficient and suitable optimization algorithm is crucial for neural network training. The Adam algorithm combines the advantages of the AdaGrad method [29] and the RMSProp method [30] and is an optimization algorithm that only requires first-order gradients with little memory requirement [26]. The gradient is not used to update the parameters for the optimization of the objective function in the Adam algorithm. The moment estimation, which is defined in Equations (1) and (2), is used to update the parameters: Sensors 2020, 20, 4499 6 of 15 where t and g t denote the timestep and gradient, respectively. m and v are the first-order moment estimate and second-order moment estimate, respectively. ε 1 and ε 2 are attenuation coefficients. In the initial phase, m t and v t tend to be biased towards the starting values [31]. Therefore, the moment estimation is modified as follows:m The parameter update rule is defined as: where σ is the learning rate. As an extension of the stochastic gradient descent method [32], the Adam algorithm possesses fast speed in the optimization process without falling into the local optimum [33].

Synthetic Minority Oversampling Technique
Unbalanced sample data adversely affect the training performance in neural networks. This problem can be solved by the oversampling technology to supplement minority samples. The SMOTE is one of the most widely used oversampling methods [34] and generates a new sample x i randomly between a minority class sample x m and a k-nearest neighbor minority class sample x n of x m as follows: where α is a random number that is greater than 0 and smaller than 1. After oversampling, the features of each class of data can be learned by the neural networks.

Back-Propagation Neural Network
The BPNN is one of the most mature and well-known feed-forward neural networks [35]; it is wildly used for prediction and classification [36,37]. A BPNN consists of an input layer, a hidden layer, and an output layer, and all layers are connected. The data in the input layer of the BPNN are processed layer by layer using forward propagation until the output layer is obtained. The data features are extracted using a layer by layer calculation process [38]. The back-propagation algorithm in the BPNN is used to calculate the weights required in the network according to the error between the network output and expected output.

Extreme Learning Machine
An ELM is a single hidden layer neural network, which has better training performance than traditional algorithms [17,18,39]. One of the most significant features of the ELM is that the weights do not need to be obtained by iterative updating. The optimal solution of the ELM is obtained by one-time learning [40]. The input weights and deviations of the hidden layer of the ELM are generated randomly, and the input weights of the output layer are obtained analytically [40]. Due to the powerful performance of the ELM, it has been widely used in many fields [22].

Radial Basis Function Neural Network
The RBFNN is a three-layer feed-forward neural network. The input layer of the RBFNN does not process the data but maps the data directly to the hidden layer [41]. Each neuron in the hidden layer represents a radial basis function, and the data is sent to the output layer after the calculation of the radial basis function. A simple linear transformation of the hidden layer output is performed to obtain the output layer [42]. The center and width of the hidden layer neurons in the RBFNN have a significant influence on the training results of the network [43,44].

Proposed Method
It is well known that in traditional BPNNs, a large number of hidden layers result in excess features learned by the network, leading to overfitting of the network. However, if there are too few hidden layers, the performance of the BPNN could be affected. The ELM has better generalization performance than the BPNN [22], but the structural characteristics of a single hidden layer may result in an inability of the network to extract sufficient features of the data.
We combined the advantages of the two networks and developed the BP-ELMNN framework ( Figure 4) to detect the degree of pear browning. The output of the hidden layer of the BPNN is input into the ELM. This framework contains three dense layers. The activation function of the neurons in the Dense 1 layer and Dense 2 layer is the Relu function, and the neurons in the Dense 3 layer are activated by a Sigmoid function. The Adam algorithm is used to iteratively update the weights and thresholds from the input layer to the Dense 2 layer. The weights and thresholds between the Dense 2 layer and Dense 3 layer are generated randomly and are not iteratively updated during network training. The input weights of the output layer are obtained using Equation (7).
where β is the input weight of the output layer, O dense3 denotes the output of the Dense 3 layer, and T is the label of the training data.
where is the input weight of the output layer, 3 denotes the output of the Dense 3 layer, and T is the label of the training data. The loss function is the cross-entropy function, which is defined as: where n is the number of classes, is the label of the data, and denotes the actual output of the neural network. The L2 regularization term of the weight vectors was used in the loss function to avoid overfitting: where is the regularization coefficient, denotes the weight vectors, and ‖•‖ 2 is the L2 norm. The proposed BP-ELMNN algorithm is summarized as follows: Algorithm: BP-ELMNN Input: training data. Output: predicted category.

Begin
Step 1: train the BPNN part on the training data using the Adam algorithm.
Step 2: randomly select the input weights and thresholds of the Dense 3 layer.
Step 3: calculate the input weight of the output layer using Equation (7). The loss function is the cross-entropy function, which is defined as: where n is the number of classes, l i is the label of the data, and y i denotes the actual output of the neural network. The L2 regularization term of the weight vectors was used in the loss function to avoid overfitting: where α r is the regularization coefficient, W denotes the weight vectors, and · 2 is the L2 norm. The proposed BP-ELMNN Algorithm 1 is summarized as follows:

Begin
Step 1: train the BPNN part on the training data using the Adam algorithm.
Step 2: randomly select the input weights and thresholds of the Dense 3 layer.
Step 3: calculate the input weight β of the output layer using Equation (7).
Step 4: test the BP-ELMNN model on the test data.
Step 5: output the classification results. End

Data Analysis and Sample Supplementation
The training samples and test samples of the Chinese pears were divided into six categories according to the browning levels (see Table 1); the number of samples is shown in Table 3. Since it was not possible to obtain the same number of pears in each category, we supplemented the sample data of the minority class using the SMOTE. In the training data (TR), the number of all minority class samples was increased to obtain 4620 samples. In the test data (TE), the number was increased to 2280. Table 4 shows the changes that were made to the TR and TE using the SMOTE. The new dataset was expressed as a 27,720 × 10 matrix for the new data of TR (NTR) and a 13,680 × 10 matrix for the new data of TE (NTE).  0  540  4080  4620  180  2100  2280  1  1260  3360  4620  480  1800  2280  2  2520  2100  4620  900  1380  2280  3  4620  0  4620  2280  0  2280  4  2940  1680  4620  1200  1080  2280  5 2520 2100 4620 1080 1200 2280

Principal Component Analysis
Principal component analysis (PCA) is a standard feature extraction method used in pattern recognition [45] that minimizes the correlation between the components by rotating the covariance matrix [46]. We used PCA to extract the principal components of the training samples. The scatter diagram of the PCA result was showed in Figure 4, in which the dimensions were reduced from ten variables to two principal components. The contribution of the principal component 1 (PC1) was 81.72%, and that of principal component 2 (PC2) was 15.53%. In general, the first few principal components whose cumulative contribution exceeds 95% are considered to contain nearly all the information of the original data [45]. Therefore, we believe that PC1 and PC2 are representative of the characteristics of the original data. We selected randomly 18 pears (3 × 6, three pears per category from the training set) to present the PCA results as an example in Figure 5. As shown in Figure 5, the odor information of the six categories of pears has significant overlap, and the categories cannot be visually distinguished in the two-dimensional projection space based on PCA. Accordingly, we concluded that the odor of pears with different levels of browning was rich and strong. Even if the cumulative Sensors 2020, 20, 4499 9 of 15 contribution rate of PC1 and PC2 reaches 97.25%, it was still not easy to distinguish pears with different levels of browning in a low-dimensional space.
components whose cumulative contribution exceeds 95% are considered to contain nearly all the information of the original data [45]. Therefore, we believe that PC1 and PC2 are representative of the characteristics of the original data. We selected randomly 18 pears (3 × 6, three pears per category from the training set) to present the PCA results as an example in Figure 5. As shown in Figure 5, the odor information of the six categories of pears has significant overlap, and the categories cannot be visually distinguished in the two-dimensional projection space based on PCA. Accordingly, we concluded that the odor of pears with different levels of browning was rich and strong. Even if the cumulative contribution rate of PC1 and PC2 reaches 97.25%, it was still not easy to distinguish pears with different levels of browning in a low-dimensional space.

Comparison of the Classification Results of the Four Methods
In this study, the performances of the BPNN and ELM used in the BP-ELMNN were compared with that of the proposed BP-ELMNN model. In addition, the performance of the RBFNN, which has been widely used in many applications [47], was also analyzed. The methods were implemented using a PC (Intel Core i7-8550U processor), and Python and Tensorflow were used for programming. For the BPNN model, a network structure with three hidden layers (21, 43, and 87 neurons in the hidden layers) was designed to detect the degree of browning of the pears. The activation function of the neurons in the hidden layers was the Relu function, and the neurons in the output layer were activated by the Softmax function. The BPNN model was trained and validated using 10-fold cross-validation on the NTR and achieved a training accuracy of 0.7845. The experimental

Comparison of the Classification Results of the Four Methods
In this study, the performances of the BPNN and ELM used in the BP-ELMNN were compared with that of the proposed BP-ELMNN model. In addition, the performance of the RBFNN, which has been widely used in many applications [47], was also analyzed. The methods were implemented using a PC (Intel Core i7-8550U processor), and Python and Tensorflow were used for programming. For the BPNN model, a network structure with three hidden layers (21,43, and 87 neurons in the hidden layers) was designed to detect the degree of browning of the pears. The activation function of the neurons in the hidden layers was the Relu function, and the neurons in the output layer were activated by the Softmax function. The BPNN model was trained and validated using 10-fold cross-validation on the NTR and achieved a training accuracy of 0.7845. The experimental results of the NTE are shown in Table 5. An accuracy of 0.7623, a macro-precision of 0.6732, a macro-recall of 0.7623, and a macro-F1 score of 0.7150 on NTE were obtained. The BPNN model provided a medium classification accuracy for detecting brown core in the Chinese pears. The ELM model had 500 neurons in the single hidden layer and was activated by a Sigmoid function. The input weights of the hidden layer and the output layer were obtained randomly and analytically, respectively. As shown in Table 5, the ELM model on the NTE provided the second-best classification result.
In the RBFNN model, a Gaussian function was used as the activation function of the hidden layer neurons. The center of the activation function was obtained via the k-means algorithm. The sum of squared errors (SSE) was calculated as follows: where Q i is the ith cluster, d is a sample of Q i , c i is the mean of all samples of Q i , k is the number of cluster center. Figure 7 shows the relation curve between the SSE and k; a value of k = 3 was used because the rate of decrease of the SSE was relatively low when k > 3. The width of the activation function was obtained using Equation (11): where µ max is the maximum distance between the centers. The Softmax function was utilized to activate the output layer neurons. The classification results of the RBFNN for the NTE is shown in Table 5; this algorithm provided the lowest classification accuracy.  For training the BP-ELMNN, 10-fold cross-validation was used to evaluate the performance of the network on NTR. The curves of validation loss and accuracy during training process are shown in Figure 8. After 8000 epochs, the validation loss did not decrease further, and the accuracy for the NTR was 0.9874, indicating convergence. As shown in Table 5, the BP-ELMNN achieved the highest classification accuracy for the NTE, with an accuracy of 0.9683, macro-precision of 0.9688, macro-recall of 0.9683, and a macro-F1 score of 0.9685. The experimental results of the four methods are summarized in Table 5; we used four evaluation indicators (accuracy, macro-Precision, macro-recall, and macro-F1 score) to assess the classification performance of the models. The accuracy represents the ratio of the correctly classified samples to the total samples [48]. The precision is the ratio of the true positive results to all positive results [49], and the mean value of the precision of each sample label is the macro-precision. The recall represents the number of positive results that were correctly classified as positive in the experimental result [48], and the mean value of the recall of each sample label is the macro-recall. The macro-F1 score is the harmonic mean of the macro-precision and macro-recall.  For training the BP-ELMNN, 10-fold cross-validation was used to evaluate the performance of the network on NTR. The curves of validation loss and accuracy during training process are shown in Figure 8. After 8000 epochs, the validation loss did not decrease further, and the accuracy for the NTR was 0.9874, indicating convergence. As shown in Table 5, the BP-ELMNN achieved the highest classification accuracy for the NTE, with an accuracy of 0.9683, macro-precision of 0.9688, macro-recall of 0.9683, and a macro-F1 score of 0.9685. For training the BP-ELMNN, 10-fold cross-validation was used to evaluate the performance of the network on NTR. The curves of validation loss and accuracy during training process are shown in Figure 8. After 8000 epochs, the validation loss did not decrease further, and the accuracy for the NTR was 0.9874, indicating convergence. As shown in Table 5, the BP-ELMNN achieved the highest classification accuracy for the NTE, with an accuracy of 0.9683, macro-precision of 0.9688, macro-recall of 0.9683, and a macro-F1 score of 0.9685. The experimental results of the four methods are summarized in Table 5; we used four evaluation indicators (accuracy, macro-Precision, macro-recall, and macro-F1 score) to assess the classification performance of the models. The accuracy represents the ratio of the correctly classified samples to the total samples [48]. The precision is the ratio of the true positive results to all positive results [49], and the mean value of the precision of each sample label is the macro-precision. The recall represents the number of positive results that were correctly classified as positive in the experimental result [48], and the mean value of the recall of each sample label is the macro-recall. The macro-F1 score is the harmonic mean of the macro-precision and macro-recall.  The experimental results of the four methods are summarized in Table 5; we used four evaluation indicators (accuracy, macro-Precision, macro-recall, and macro-F1 score) to assess the classification performance of the models. The accuracy represents the ratio of the correctly classified samples to the total samples [48]. The precision is the ratio of the true positive results to all positive results [49], and the mean value of the precision of each sample label is the macro-precision. The recall represents the number of positive results that were correctly classified as positive in the experimental result [48], and the mean value of the recall of each sample label is the macro-recall. The macro-F1 score is the harmonic mean of the macro-precision and macro-recall.
The performance of the four neural networks is shown in Figure 9 in a bar chart. The results indicate that the BP-ELMNN had a strong nonlinear fitting ability for the detection of brown core in the Chinese pears. The performance of the four neural networks is shown in Figure 9 in a bar chart. The results indicate that the BP-ELMNN had a strong nonlinear fitting ability for the detection of brown core in the Chinese pears. Figure 9. Bar chart of the performance of the four methods (accuracy, macro-precision, macro-recall, and macro-F1 score) for the NTE.
We also used the four neural networks to classify the data not processed by the SMOTE (the TR and TE) to determine the performance of the BP-ELMNN framework when unbalanced data are used. The classification results for the original data of the TE (OTE) are shown in Table 6. Unbalanced data often results in an inability of the neural network to learn the information of the different types of data and lower classification accuracy. However, Table 6 indicates that the proposed BP-ELMNN framework also provides the best performance for the unbalanced data, with an accuracy of 0.9285, macro-precision of 0.9188, macro-recall of 0.9017, and a macro-F1 score of 0.9089. Table 6. The accuracy, macro-precision, macro-recall, and macro-F1 score of the four methods for the OTE.

Methods
Accuracy

Conclusions
In this paper, we proposed a multi-layer BP-ELMNN framework to detect brown core in Chinese pears (Huangguan) using a MOS-based E-nose device. PCA was used to extract the principal components, whose cumulative contribution was higher than 95%. However, pears with different degrees of browning could not be distinguished by the PCA. The result of PCA showed that the odors of pears with different degrees of browning were indistinguishable in two-dimensional space (Even if their cumulative contribution rate reached 97.25%) and highly similar. The proposed BP-ELMNN framework obtained the highest classification accuracy among the four neural networks, indicating that the hidden layer structure of the BPNN extracted sufficient data, which were used as input for the ELM. The original data that were not processed by the SMOTE were used in a comparative experiment to demonstrate the robustness of the BP-ELMNN framework to unbalanced data.This study demonstrated that the use of the E-nose and a suitable Figure 9. Bar chart of the performance of the four methods (accuracy, macro-precision, macro-recall, and macro-F1 score) for the NTE.
We also used the four neural networks to classify the data not processed by the SMOTE (the TR and TE) to determine the performance of the BP-ELMNN framework when unbalanced data are used. The classification results for the original data of the TE (OTE) are shown in Table 6. Unbalanced data often results in an inability of the neural network to learn the information of the different types of data and lower classification accuracy. However, Table 6 indicates that the proposed BP-ELMNN framework also provides the best performance for the unbalanced data, with an accuracy of 0.9285, macro-precision of 0.9188, macro-recall of 0.9017, and a macro-F1 score of 0.9089.

Conclusions
In this paper, we proposed a multi-layer BP-ELMNN framework to detect brown core in Chinese pears (Huangguan) using a MOS-based E-nose device. PCA was used to extract the principal components, whose cumulative contribution was higher than 95%. However, pears with different degrees of browning could not be distinguished by the PCA. The result of PCA showed that the odors of pears with different degrees of browning were indistinguishable in two-dimensional space (Even if their cumulative contribution rate reached 97.25%) and highly similar. The proposed BP-ELMNN framework obtained the highest classification accuracy among the four neural networks, indicating that the hidden layer structure of the BPNN extracted sufficient data, which were used as input for the ELM. The original data that were not processed by the SMOTE were used in a comparative experiment to demonstrate the robustness of the BP-ELMNN framework to unbalanced data. This study demonstrated that the use of the E-nose and a suitable ANN algorithm provided excellent performance for the non-destructive detection of brown core in the Huangguan Chinese pear. The findings provide insights into the use of ANNs in the food industry, helps manufacturers monitor pear quality, and promotes the practical application of E-nose devices.