Introduction

Basundi is a dairy dessert extremely popular in western parts of India. The product represents sweetened concentrated milk with caramel flavour, creamy consistency and soft textured flakes distributed uniformly in the liquid (Aneja et al. 2002). However one of the major limitations for its marketing over long distances is its relatively limited shelf life which is less than a week at room temperature. To overcome this, a ready-to-reconstitute formulation was developed using osmo-air drying (dehydration in sugar syrup followed by air drying) process. Although the process was intended for longer shelf life, it was expected that like most other dried milk products, certain deteriorative reactions may continue to progress over prolonged storage time. These could be monitored by following the change in pH, hydroxyl methyl furfural (HMF) concentration, bulk density and insolubility index as a function of storage time and temperature. These physico-chemical events occurring in the product may thus also significantly affect the sensory quality of the product.

Shelf life prediction using mathematical models based on kinetic concept is one of the widely researched areas in food science. A kinetic model represents a series of differential equations which are integrated to give, with time, the concentrations of reaction intermediates and products. These mathematical models provide an output (such as quantitative estimate of a quality parameter) based on a set of input data (time, temperature) and can be successfully employed to predict quality parameters and shelf life of a wide range of processed foods (Albanesea et al. 2007; Corradini and Peleg 2007; Singh et al. 2009). Shelf life prediction models help the manufacturers and also the food quality regulating agencies to critically evaluate the quality of such foods in the marketing chain.

Connectionist model also known as artificial neural network (ANN) is a computational technique which mimics the structure and function of human brain to some extent (Mehrotra et al. 1996). It is capable of solving extremely complex problems with self-reliant investigation of relationship between input and output variables based on a given set of data values. The ability of learning through examples makes the ANN more versatile and has shown its merit in solving the problems dealing with uncertainties, non linear approximation and noisy data environment. It has found wide application in diverse areas of food science research viz., changes in physical properties of dried carrots (Kerdpiboon et al. 2007), food quality evaluation in production ovens (Lewis et al. 2008), sensory quality of meat (Vestergaard et al. 2007), noodles (Tulbek et al. 2003) and Ultra-high-temperature (UHT) milk ( Singh et al. 2009). The objective of this paper is therefore to develop mathematical models based on kinetic concept and connectionist model using back propagation neural network and subsequently evaluate the two for accuracy of prediction of sensory parameters of Basundi mix.

Materials and methods

Data generation

Ready-to-reconstitute Basundi mix was manufactured in the experimental dairy of National Dairy Research Institute. The product was stored at three temperatures viz. 10, 25 and 40 °C and analysed at periodic intervals for various physico-chemical and sensory attributes. Out of the several attributes evaluated during storage of the product, the quality parameters which statistically showed higher magnitude of correlation coefficients with sensory parameters were used as the input parameters for model building exercise. Besides pH, hydroxy methyl furfural (HMF) - extent of browning measured by the method of Keeney and Bassette (1959), bulk density (BD) - measure of volume of powder measured as per method recommended by Sjollema (1963) and insolubility index (II) - quantity of suspended or settled solids upon reconstitution measured by the method of ADMI (1971), the other input parameters were temperature (°C) and storage period (weeks). A sensory panel consisting of 5 trained judges drawn from the faculty of Dairy Technology Division evaluated the samples of Basundi mix. The judges were served with 30–40 ml. of reconstituted and cooled Basundi mix. A 9-point hedonic scale was used for evaluating sensory parameters namely flavour, colour and appearance, consistency and overall acceptability.

Kinetic models

Changes in the quality of foods are often described by applying fundamental principles of chemical kinetics. These changes are generally modeled by means of a zero-, 1st-, or 2nd-order reaction (Labuza 1984; Saguy and Karel 1980; Singh 2000). The general rate law for a single reactant at concentration ‘c’ can be written as:

$$ - \frac{{dc}}{{dt}} = k{c^n} $$
(1)

Linear decrease in ‘c’ implies that the rate change in the concentration of the reactant is constant throughout the period of study and it does not depend on the concentration of ‘c’, this linear relationship between the reactant and treatment time will be a zero order reaction. It follows that for n = 0 for a decomposition reaction:

$$ c = {c_o} - kt $$
(2)

Where ‘c o ’ represents initial value of the reactant and ‘c’ is the amount of that reactant at time ‘t’.

First-order reactions have also been frequently reported for many reactions in foods. It relates concentration of the reactant ‘c’ that increases in an exponential manner with storage time. The rate of change in the reaction is thus dependent on the concentration of reactant ‘c’ implying that with the progression of time, the concentration of the reactant decreases and so does the rate of reaction. Thus the equation where n = 1 can be written as:

$$ c = {c_o}\;\exp \left( { - kt} \right) $$
(3)

Where c is the quantitative estimate of reactant remaining at time ‘t’.

The influence of temperature on the reaction rate may be described by using the Arrhenius relationship:

$$ k = {A_0}\exp \left[ { - \frac{{{E_a}}}{{RT}}} \right] $$
(4)

Where, A O is “pre-exponential factor” (sometimes called the frequency factor or Arrhenius constant), E a is the activation energy (kJ/mol), R is gas constant (8.314 J/mol K) and T is the absolute temperature (K = 273 + °C).

The model for prediction of shelf life of Basundi mix was based on development of multiple regression equations with deteriorative changes such as pH, HMF, BD and II as explanatory variables while the sensory flavour (FS) and total sensory scores (TS) were the dependent variables. These equations were then integrated with the function of temperature dependence for the four explanatory variables. The performances of the two models were tested by per cent root mean square error (RMS) as described later in Eq. 8.

Connectionist model

Connectionist model is an intelligent data processing system. The predictive ability of connectionist model automatically comes from the data set presented while training the network. It consists of a set of neurons, known as processing units and these units are arranged in several parallel layers for solving complex unstructured non linear problems with high speed. Several architecture and algorithms have been proposed to address complex cognitive problems related to prediction, classification, pattern recognition etc. A multilayer feed forward network with backpropagation of error learning mechanism is the most commonly used neural network architecture and have shown excellent results in dealing with functional approximation problems (Huang et al. 2007). Such neural network consists of input layer, hidden layer(s) and output layer. Each layer has a specific role in execution of the neural network.

The backpropagation is a method to train a multilayer feed forward network for performing a given task in supervisory learning mode with a given set of input data and known results. At each iteration the output response of the network is compared with desired output and then the difference of network response and desired output is computed. This error propagates backwards from the output layer to input layer through hidden layers and in this process weights and biases of different layers are adjusted accordingly. This process continues until the number of iterations are completed or algorithm converges i.e. the error goal is achieved. A well trained neural network produces reasonable output response when given a new set of data. General architecture of a multilayer feed forward network with two hidden layers developed for this study is shown in Fig. 1.

Fig. 1
figure 1

Neural network model for prediction of sensory parameters

Network architecture

In the present study a multilayer feed forward network with backpropagation algorithm was developed with 4 nodes in input layer and the one node in output layer for producing the network response. The network was tested with 1 and 2 hidden layers with 3 to 20 nodes in each hidden layer. Initial weights and bias matrix was randomly initialized between −1 and 1. Learning rate and performance goal were set automatically by the training algorithms. A non linear transformation (or activation) function tangent sigmoid (Eq. 5) was used to compute the output from summation of weighted inputs of neurons in each hidden layer. A pure linear transformation function was used at output for getting network response.

$$ f(x)=\frac{1}{{1 + {e^{{ - \alpha x}}}}} $$
(5)

where, x is weighted sum of inputs and α is a constant

The performance of neural network model was evaluated using the relative percent root mean square (RMS) given as under:

$$ RMS = \sqrt {{\frac{1}{N}\left[ {{{\sum\limits_1^N {\left( {\frac{{{Q_{{\exp }}} - {Q_{{cal}}}}}{{{Q_{{\exp }}}}}} \right)} }^2}} \right]}} \times 100 $$
(6)

where,

Qexp :

Observed value

Qcal :

Predicted value

N:

Number of observations

The input and output layer of the network included the following variables. The network was simulated separately for predicting FS (Flavor Score) and TS (Total Sensory Score). Experimentally, 140 records were generated for input/ output data sets for modeling the network.

Input parameters

  • pH – pH Value

  • HMF – Hydroxy Methyl Furfural

  • BD – Bulk Density

  • II – Insolubility Index

Output parameters

  • FS – Flavor Score

  • TS – Total Sensory Score

Training and simulation

The modeled multilayer feed forward neural network was trained in a supervisory mode and several variant of backpropagation algorithm like Gradient descent, Widrow Hoff learning rule, Conjugate gradient, Quasi-Newton, Levenberg-Marquardt, Resilient backpropagation and Bayesian regularization were tested for a given set of input/ output data. Data set of 140 records was partitioned at random into two subsets namely training subset comprising of 112 records (80% of total records) to train the neural network and the test subset comprising of 28 records (20% of total records) to validate the network. As per the requirement of algorithms to get the best results, the data was preprocessed to scale the input and output data in the range [−1 1] using the feature prestd of neural network tool box of MATLAB 7.0. The network response was again converted to its normal values using poststd feature of neural network tool box of MATLAB 7.0.

The network was trained using the above mentioned learning algorithms for up to 2000 epochs or till the algorithms truly converged. The parameters like learning rate, performance/ error goal and learning rate increment were used at the default setting of the algorithms in the MATLAB. The number of hidden layers and number of neurons in each layer were judiciously selected based on the experience of earlier workers (Mehrotra et al. 1996; Singh et al. 2009) as very small number of nodes may not be powerful enough to learn the task whereas a large number of nodes could lead to often a cumbersome algorithm. In the present study the network was simulated with one and two hidden layers and number of neurons in each layer varied from 3 to 20. Weights and biases were adjusted automatically by the back-propagation training algorithm. Most of the time the algorithms were observed to truly converge which means that performance/ error goal was achieved. The network was trained a number of times with training data set to get consistent results. The prediction performance was tested using a new data set (test data).

One of the main problems associated with neural network is over prediction while training the network with back-propagation algorithm. The error in the training data set is computed to a very small value but when a new data set is employed to the network the error becomes large. In this situation, network memorizes the training examples but it does not learn to apply it to new situation (Mittal and Zhang 2000). To overcome the problem of over prediction, MATLAB 7.0 provides a Bayesian regularization method. This method optimizes the regularization parameters in an automated fashion.

Results and discussion

Modeling of data using reaction kinetics concept

The deteriorative changes in the ready-to-reconstitute Basundi mix represented by pH, HMF, BD and II served as the explanatory variables whereas sensory properties of the stored product evaluated in terms of flavour and total score were the dependent variables. Fitness of the data sets for the order of the reactions was determined based on r2 values obtained for each of the reactions. The results revealed that changes in pH, BD and II were best described by zero order reactions while HMF formation followed first order reaction kinetics (Table 1). Reaction rate constants of the selected reaction orders were then modeled using Arrhenius model to determine their temperature dependence over the temperature range of 10–40 °C. The Arrhenius relationship of the rate constants of pH, BD and II with temperatures of storage showed very high coefficients of determination (0.93, 0.95 and 0.99 respectively), while HMF showed a fairly acceptable fit (r 2 = 0.79). Activation energy for pH, BD and II were 447.49, 896.18 and 757.77 kJ/mol respectively whereas for HMF it was 686.20 kJ/mol. The Arrhenius equations (Eq. 710) for each of the quality parameters are given below

Table 1 Summary of kinetic parameters for stored Basundi mix
$$ {X_1} = - 3396.837 \times {e^{{\frac{{ - 3720.4}}{T}}}} \times t + p{H_0} $$
(7)
$$ {X_2} = {e^{{31327285 \times {e^{{\frac{{ - 5705}}{T}}}} \times \,\,t + \ln \left( {HM{F_0}} \right)}}} $$
(8)
$$ {X_3} = - 810368791.4 \times {e^{{\frac{{ - 7450.9}}{T}}}} \times t + B{D_0} $$
(9)
$$ {X_4} = 64488663.07 \times {e^{{\frac{{ - 6300.1}}{T}}}} \times t + I{I_0} $$
(10)

The following multiple regression equations were developed for predicting flavour score (FS) and total sensory score (TS) using the four quality parameters from experimental data:

$$ FS = - 25.66509 + 2.0299{X_1} - 0.000941{X_2} + 27.81526{X_3} + 0.007046{X_4} $$
(11)
$$ TS = - 9.803235 + 1.323248{X_1} - 0.010897{X_2} + 12.74846{X_3} - 0.585151{X_4} $$
(12)

The multiple regression equations derived with FS (Eq. 11) and TS (Eq. 12) as dependent variables were then integrated with kinetic equations (Eq. 710) of the four explanatory variables (pH, HMF, BD and II) and the following prediction models were developed.

$$ \begin{gathered} FS = - 25.66509 + 2.0299\left[ { - 3396.837 \times {e^{{\frac{{ - 3720.4}}{T}}}} \times t + p{H_0}} \right] - 0.000941\left[ {{e^{{31327285 \times {e^{{\frac{{ - 5705}}{T}}}} \times \,\,t + \ln \left( {HM{F_0}} \right)}}}} \right]\quad \\+ 27.81526\left[ { - 810368791.4 \times {e^{{\frac{{ - 7450.9}}{T}}}} \times t + B{D_0}} \right] + 0.007046\left[ {64488663.07 \times {e^{{\frac{{ - 6300.1}}{T}}}} \times t + I{I_0}} \right] \\\end{gathered} $$
(13)
$$ \begin{gathered} TS = - 9.803235 + 1.323248\left[ { - 3396.837 \times {e^{{\frac{{ - 3720.4}}{T}}}} \times t + p{H_0}} \right] - 0.010897\left[ {{e^{{31327285 \times {e^{{\frac{{ - 5705}}{T}}}} \times \,\,t + \ln \left( {HM{F_0}} \right)}}}} \right]\quad \\+ 12.74846\left[ { - 810368791.4 \times {e^{{\frac{{ - 7450.9}}{T}}}} \times t + B{D_0}} \right] - 0.585151\left[ {64488663.07 \times {e^{{\frac{{ - 6300.1}}{T}}}} \times t + I{I_0}} \right] \\\end{gathered} $$
(14)

Where t = Storage period in weeks, T = Storage temperature (K), and pH0, HMF0, BD0 and II0 are the initial values of respective input parameters.

The flavour and total sensory scores were predicted and the observed values were plotted against the predicted values. The scatter plots for flavour score (Fig. 2a) and total sensory score (Fig. 2b) showed a certain degree of spread. These observations are supported by other performance parameters listed in Table 2. The MSE and RMS for Kinetic model for flavour score (FS) were 0.38 and 12.22 respectively while in case of total sensory scores (TS), MSE and RMS were relatively lower at 0.08 and 4.28 respectively. This variation was also corroborated well by the low correlation coefficient (0.74) in case of FS as compared to value of correlation coefficient (0.80) for TS.

Fig. 2
figure 2

Predictability of the kinetic {(a) and (b)} and ANN {(c) and (d)} models for sensory scores of Basundi mix

Table 2 Performance matrix for kinetic and ANN models

ANN based modelling of data

Among all the algorithms mentioned above in materials and methods section, Bayesian regularization algorithm gave low error (RMS) and consistent results during training of the network. It has the ability to adjust the network performance parameter for improving generalisation (i.e. to avoid over fitting and under fitting) of network automatically as per the situation. Therefore only the results of this algorithm are being discussed here. Values for network parameters such as learning rate, momentum factor, performance goal etc. were set to the default values of the algorithm. The best performance of the Bayesian regularization algorithm for FS as well as TS was obtained at 280 and 340 epochs respectively with 2 hidden layers of 3 neurons in each hidden layer. The final weights and biases matrices of trained neural networks for the flavour and total sensory scores have been given in Tables 3 and 4 respectively. The observed values of the data when plotted against ANN predicted values showed high correlation coefficients (r) of 0.94 and 0.96 respectively for the FS and TSS (Table 2). The scatter plots for observed and predicted values of flavour score (Fig. 2c) and total sensory score (Fig. 2d) showed very narrow spread of data. Other performance parameters viz., MSE and RMS were 0.09 and 4.13 for FS and 0.02 and 1.71 for TSS models respectively indicating high goodness of fit for the data (Table 2). These performance parameters thus clearly established that ANN based prediction models are better positioned to predict the sensory quality as compared to the mathematical models developed using kinetic functions.

Table 3 Final weights and biases matrices for Flavour score using ANN model
Table 4 Final weights and biases matrices for Total Sensory score using ANN models

Conclusion

Mathematical models for prediction of sensory quality of Basundi Mix, an Indian dairy product were developed using two approaches: chemical kinetics and artificial neural network. The kinetic models were constructed based on the kinetic functions of the four physico-chemical indices of deteriorative changes. The connectionist models were developed using ANN back-propagation algorithms with four input parameters. The output parameters for both types of models were flavour and total sensory scores. The correlation between experimental and predicted values was worked out both in case of kinetic and ANN model for flavour and total sensory score in order to judge the performance of both the models. It was revealed that the magnitude of correlations coefficient for ANN model were 0.94 for flavour score and 0.96 for total sensory score which were relatively higher than kinetic model (0.74 for flavour score and 0.80 for total sensory score), suggesting superiority of ANN model over kinetic model. This fact is also corroborated by the relatively lower values of percent per cent root mean square and MSE for the ANN models.