The Prediction of Food Safety Composite Index Based on Bp Neural Network and Ga Algorithm

The study established a BP neural network prediction model to test the effect of the application to predict the food safety Index. The GA was used to optimize the weights and thresholds of BP neural network. The theoretical analysis and experimental results prove that the BP neural network prediction is feasible for the food safety Index. The index prediction has some value in the field of food index forecast.


With
the economic development and transformation of people's sense about investing, the food index is a product of the market economy.The food price is determined by its value, but influenced by economic, political and social many factors.Generally speaking, there exist many ways to predict food prices.For traditional forecasting methods, we adopt the application of regression analysis, time series analysis and Markov model.However, the complexity of the internal structure of the price system, the variability of external factors determine the enormity of the task, the traditional forecasting tools have not met this need.traditional forecasting methods are mostly based on statistical analysis of long-term, large sample and it requires high regularity of the data distribution and integrity of data.
Existing research indicates that intelligent forecasting models outperform traditional models, especially in short-term forecasting.In recent years, artificial intelligence techniques of genetic algorithms, artificial neural network and supporting vector machine methods are applied to short-term prediction of the food market by many scholars.For example, Guresen et al. (2011) evaluated the effectiveness of neural network models which were known to be dynamic and effective in food-market prediction.For example, Hassan et al. (2012) proposed a fusion model by combining the Hidden Markov Model (HMM), Artificial Neural Networks (ANN) and Genetic Algorithms (GA) to predict food price.Shen et al. (2003) used the Artificial Fish Swarm Algorithm (AFSA) to optimize RBF to forecast food indices.Armano et al. (2005) optimized ANN with GA to forecast food indices.Lee (2009) proposed a prediction model based on a hybrid feature selection method and SVM to predict the trend of food market.Ling-Jing et al. (2014) proposed a methodology which was the integration of nonlinear independent component analysis and support vector regression for food price forecasting (Ping, 2005).Yakup et al. (2014) developed two efficient models with different approaches: artificial neural network and support vector machine.Therefore, in order to improve the accuracy of prediction, this paper presents a kind of method combined the hybrid hierarchical algorithms and BP neural network and builds the fusion model to predict the food safety Index.

MATERIALS AND METHODS
Neural network probability model: A single model could only reflect the piece of information of food prices which is difficult to dig the hidden variation of price of food data.Furthermore, there are obvious limitations when using a single model, such as the slow convergence speed and poor generalization.However, the combined model could utilize the information provided by various models to a large extension, which would improve the prediction accuracy, especially in economic, management and statistical research, a number of prediction approaches have become an important way to improve forecast accuracy (Back and Sere, 2008).
Neural network probability model is the core algorithm of multi-attribute inversion.To description of the relationship between multipleattribute is the most suitable statistical relationship, the best method of multi-attribute solving the objective function is neural network and Kriging method has been widely used and spatial interpolation calculation.In this study, we combine those algorithms, which provided the core effective technology for the inversion of physical parameters of high resolution.
Firstly, according to the seismic multi-attribute and the objective function to form a multi-dimensional matrix: where, L i is the target curve.Given a set of training data: Estimate a new output curve: where, ( ) Calculate the checksum error:

Food price forecasting based on BP network:
Steps based on the BP neural network prediction are as follows: Determine the network structure and the requirement of accuracy, determine the network input node number (n), the number of output nodes (m), the number of hidden layer and each hidden layer containing the number of nodes.
Put the sample data to segmentation, some parts as learning samples, the others as the test sample select the appropriate algorithm to network training, make the network of fitting study sample as much as possible.
Use inspection sample to test the training effect of the network.If the training effect is very good, use the network to predict.If the result is bad, adjust the structure of the network, return to the previous steps immediately, until they get the better results.We can be seen from the above process, the application of neural networks in food price prediction is mainly divided into two steps as neural network training and forecasting (Kaloozadeh and Khaki, 2007).
The genetic algorithm to optimize the BP neural network prediction model: GA algorithm is a global search algorithm, the organic integration of the BP neural network and GA algorithm, GA algorithm is used to make up for the BP neural network connection weights and threshold selection on the randomness defect, not only play a mapping of BP neural network generalization ability and make the BP neural network with quick convergence and strong learning ability.This paper combines the genetic algorithm and BP neural network, an improved genetic algorithm to optimize the BP neural network prediction food index model.Basic model algorithm is as follows: Step 1: The list of to be initialized crisis-attacked sites is List, containing all the sequence of crisisattacked sites.S List is the list of initialized crisis-attacked sites and it is null Step 2: Select site A at random as the start point and make it current crisis-attacked site T. Insert site T to S List and then remove it from List Step 3: Pick a site nearest to site T as the new current crisis-attacked site T from List.Insert T to S List and remove from List Step 4: Estimate if List is null.If so, turn to step 5; otherwise, turn to step 3 Step 5: Insert 0 (quantity = (K-1)) to S List randomly Step 6: Estimate if S List meets all the constraint conditions.If not, turn to step 1; if so, end the initialization.
Step 7: The best individual of the genetic algorithm is decomposed into connection weights and threshold of BP neural network, BP neural network as prediction model of initial weights and threshold of assignment, the BP neural network prediction model are trained, chaotic time series prediction optimal solution output.

RESULTS AND DISCUSSION
Experiments and analysis: In order to verify the BP neural network optimized by GA which is feasible and effective in food prediction, comparing the performance of the method proposed in this study with the existing approaches, such as BP neural network and BP neural network optimized by GA with conducting the same experiment (Takens, 1981).This experimental data are the food safety Index closing price of 150 trading days, from May 1, 2014 to November 31, 2014, collected on the Shanghai food where, y i ' is the predicted value, y i is the actual value and N is the number of samples.When the value of MAPE and RMSE is smaller, the higher forecasting accuracy of the model is possible.To avoid the influence of random factors on the experimental results, three methods are conducted three times.The following are the result tables.
The results in the Table 1 and 2 shows that for the experiment of predicting the closing price of SCI, the values of MPAE and RMSE of RBF neural network optimized by GA are minimized.

CONCLUSION
Aimed at local minimum defects and slow convergence speed programs, this paper proposes a genetic algorithm to optimize the BP neural network of food safety index prediction method and compared with the BP model (Li and Zhang, 2008).Results show that the method reduces the BP neural network prediction model into the possibility of local minimum value, improve the convergence rate model.Compared with the BP prediction model, the method of the food safety index has better nonlinear fitting ability and higher prediction precision.

Table 1 :
The MAPE values of three models