A kind of data preprocessing method of the many kinds price forecasting of commodity based on neural network
Technical field
The invention belongs to data processing field, be particularly related to a kind of data preprocessing method of the many kinds price forecasting of commodity based on neural network, can be applicable to the data pre-service of the price forecasting of commodity in price forecasting of commodity analysis and the merchandise sales decision support system (DSS).
Background technology
The Forecasting Methodology of commodity price is the basis of Market Forecast Analysis and commodity production Authorize to X, it is a major issue in the market forecast field, in a lot of problems such as commodity production, sale, play key effect, and the data preprocessing method in the Forecasting Methodology there is very large impact to versatility and the accuracy of Forecasting Methodology.Because popularizing of the development of network technology and online store, therefore in recent years, people more and more pay attention to the research to the Forecasting Methodology of commodity price.The forecasting problem of commodity price can be regarded as the data of time-based sequence and processes and data analysis problems, is divided into data acquisition, data processing and three aspects of forecast model.The open price data acquisitions such as stock market, futures market, electricity market are comparatively easy, and the model that is used for price expectation mainly contains least square regression, neural network, grey Markov chain, wavelet theory and GM (1,1) model etc.Acquisition methods for consumer commodity price data, commodity price data preprocess method and dynamic price prediction, 2010 to 2012, the article sales data that provided Zhu Quanyin etc. extracts with the method for data mining and based on preprocess method and performance prediction method (the Quanyin Zhu of the commodity price of Web, Yunyang Yan, Jin Ding and Yu Zhang.The Commodities Price Extracting for Shop Online, 2010International Conference on Future Information Technology and Management Engineering, Changzhou, Jiangsu, Chian, Dec.2010, Vol.2, pp.317-320; Quanyin Zhu, Yunyang Yan, Jin Ding and Jin Qian.The Case Study for Price Extracting of Mobile Phone Sell Online.IEEE 2nd International Conference on Software Engineering and Service Science, Beijing, Chian, July.2011, pp.281-295; Quanyin Zhu, Sunqun Cao, Jin Ding and Zhengyin Hah.Research on the Price Forecast without Complete Data based on Web Mining, 2011Distributed Computing andApplications to Business, Engineering and Science, Wuxi, Jiangsu, Chian, Oct.2011, pp.120-123; Quanyin Zhu, Hong Zhou, Yunyang Yan, Jin Qian and Pei Zhou.Commodities Price Dynamic Trend Analysis Based on Web Mining.The International Conference on Multimedia Information Networking and Security, Shanghai, Chian, Nov.2011, pp.524-527; Jianping Deng, Fengwen Cao, Quanyin Zhu, and Yu Zhang.The Web Data Extracting and Application for Shop Online Based on Commodities Classified.Communications in Computer and Information Science, Vol.234 (4): 189-197; Quanyin Zhu, Suqun Cao, Pei Zhou, Yunyang Yan, Hong Zhou.Integrated Price Forecast based on Dichotomy Backfilling and Disturbance Factor Algorithm.International Review on Computers and Software, 2011.Vol.6 (6): 1089-1093; Quan-yin Zhu, Pei Zhou, Yun-Yang Yan, Yong-Hua Yin.Exchange Rate Forecasting based on Adaptive Sliding Window and RBF Neural Network.International Review on Computers and Software, 2011.Vol.6 (7): 1290-1296; Jiajun Zong, Quanyin Zhu.Price Forecasting for Agricultural Products Based on BP and RBF Neural.ICSESS2012, p.607-610; Hong Zhou, Quanyin Zhu, Pei Zhou.A Hybrid Price Forecasting Based on Linear Backfilling and Sliding Window Algorithm.International Review on Computers andSoftware, 2011.Vol.6 (6): 1131-1134; Wang Hongyan, Zhu Quanyin, Yan Yunyang, money advances. and two kinds of WEB mining algorithms of commodity price data are relatively. microelectronics and computing machine .2011.Vol.28 (19): 168-172).
RBF (Radical Basis Function) neural network:
RBF is a kind of feed forward type neural network, and it has simulated the local neural network structure of adjusting, mutually covering acceptance domain in the human brain, has very strong biological background and the ability of Approximation of Arbitrary Nonlinear Function.It is a kind of feedforward network of three-decker: ground floor is input layer, is comprised of the signal source node.The second layer is hidden layer, and the transforming function transformation function formula of hidden unit is a kind of non-negative nonlinear function of local distribution, and it is to central point radial symmetry and decay.The unit number of hidden layer is determined by the needs of description problem.The 3rd layer is output layer, and the output of network is the linear weighted function of hidden unit output.Wherein, input layer only transmits input signal to hidden layer; The basis function of hidden layer is nonlinear, and it is to the response that input signal produces a localization, and namely each implicit node has a parameter vector to be referred to as the center.This center is used for comparing to produce the radial symmetry response with the network input vector, only when input dropped in the very little appointed area, implicit node was just made significant non-zero response, and response is between 0 to 1, input is nearer with the distance of Basis Function Center, and hidden node response is larger; Output unit is linear, and namely output unit carries out the linear weighted function combination to hidden node output.
BP (Back Propagation) neural network:
BP is a kind of Multi-layered Feedforward Networks by the Back Propagation Algorithm training.It can learn and store a large amount of input-output mode map relations, and need not to disclose the math equation of describing this mapping relations in advance.Its learning rules are to use method of steepest descent, constantly adjust weights and the threshold value of network by backpropagation, make the error sum of squares minimum of network.The BP neural network is a kind of three layers of feedforward network, comprises input layer, hidden layer and output layer.Each neuron of input layer is responsible for receiving the input message that comes from the outside, and passes to each neuron of middle layer; The middle layer is the internal information processing layer, is responsible for information conversion, and according to the demand of information change ability, the middle layer can be designed as single hidden layer or many hidden layer configurations; Last hidden layer is delivered to each neuronic information of output layer, after further processing, finishes the once forward-propagating processing procedure of study, by output layer to extraneous output information result.When reality output is not inconsistent with desired output, enter the back-propagation phase of error.Error is by output layer, by each layer of mode correction weights of error gradient decline, to the successively anti-pass of hidden layer, input layer.The information forward-propagating that goes round and begins again and error back propagation process, it is the process that each layer weights are constantly adjusted, also be the process of neural network learning training, the error that this process is performed until network output reduces to the acceptable degree, perhaps till the predefined study number of times.
Above algorithm no matter be predictablity rate, or Algorithm Learning all exists very large uncertainty on the time when being used for price expectation.The self-defining uncertainty of function partial parameters among the technique computes language MATLAB that uses in the algorithm, increased on the Algorithm Learning time and the uncertainty on the precision of prediction, this uncertainty makes algorithm have significant limitation in the prediction that is used for commodity price.In order to utilize above algorithm, a lot of improved price expectation methods have been proposed: based on the k-means cluster Forecasting of Stock Prices of BP neural network model; IPO based on the adaptive algorithm of BP neural network presses down the valency prediction; Agricultural product price forecast model based on the time series models of combined BP neural network; A kind of improved forecast of crude oil price based on wavelet transformation and RBF neural network; Based on Forecast of Nonlinear Time Series of dynamic RBF neural network etc.In the improvement Forecasting Methodology that proposes, the specific aim of these Forecasting Methodologies is all stronger, lack versatility, improved Forecasting Methodology is only applicable to a kind of commodity or same class commodity, and the ginseng of deciding of Forecasting Methodology makes Forecasting Methodology lack dirigibility, in accuracy that can not the guaranteed price prediction during the same kind of goods in the face of same class.Lacking dirigibility makes these improved Forecasting Methodologies can not satisfy vast dealer to the active demand of different consumption kind commodity market forecast analysis and merchandise sales decision-making with versatility, therefore, need to find and a kind ofly can be applicable to the variety classes commodity price or with the Forecasting Methodology of the different commodity prices of kind, or find a kind of data preprocessing method for the variety classes commodity price, to obtain the predictablity rate of the better versatility of Forecasting Methodology and Geng Gao.
Summary of the invention
The objective of the invention is normalization raw data order of magnitude method is combined with improved RBF neural network and BP nerve net Forecasting Methodology, utilize improved RBF neural network and BP neural network that the commodity price data of web mining is calculated its optimum number magnitude, the commodity price number is carried out the pre-service of normalization data magnitude with the optimum number magnitude that calculates, utilize afterwards improved RBF neural network and BP god network to be carried out the prediction of commodity price, improve the predictablity rate of RBF neural network and BP neural network, improve simultaneously RBF neural network and the versatility of BP neural network for different price forecasting of commodities.
Technical scheme of the present invention is by the normalization raw data order of magnitude method data that webpage takes to be carried out pre-service, realizing that the data set behind the normalization order of magnitude utilizes improved RBF neural network and BP neural computing to draw the best magnitude of commodity price data, with the optimum number magnitude that calculates the commodity price number is carried out the pre-service of normalization data magnitude, and then finish the market price prediction of commodity.
For ease of understanding the present invention program, at first be described as follows to theoretical foundation of the present invention:
In the price expectation field based on neural network, proposed a lot of improved data preprocessing methods for price expectation, and all obtained obvious improvement effect.Specific aim is stronger but these are improved one's methods, and has ignored dirigibility and the versatility of Forecasting Methodology, makes improved price expectation method have significant limitation.The data preprocessing method of the normalization raw data order of magnitude can well improve versatility and the predictablity rate of Forecasting Methodology.Normalization raw data order of magnitude method, for the price data of a certain commodity, relative reduce the fluctuation range of commodity price data, improved the stability of Forecasting Methodology, the accuracy rate when having improved simultaneously Forecasting Methodology for this price forecasting of commodity; Price data for different commodity, relative reduce the difference between different commodity price datas, simultaneously for a certain particular commodity, relative reduce the fluctuation range of this commodity price data, strengthen the versatility of Forecasting Methodology when having improved the stability of Forecasting Methodology, obtained higher predictablity rate; Utilize improved RBF neural network and the BP neural network price data after the normalization magnitude to realize the price expectation of commodity, obtain higher price forecasting of commodity accuracy rate.
Specifically, the present invention program realizes the price forecasting of commodity of the normalization raw data order of magnitude and improved RBF neural network and BP neural network by following each step:
Title, model, type and the price data of commodity are set up the data set X={A that h commodity are arranged in step 1, the extraction webpage
1, A
2..., A
h, the price data of establishing i commodity extraction is n, A
i={ x
1, x
2..., x
n, i ∈ [1, h] wherein, x
1, x
2..., x
nRefer to A
iN the price data that individual commodity extract;
Step 2, calculate the price magnitude of i different commodity, obtain the price magnitude M={b of different commodity
1, b
2..., b
h;
Step 3, self-defined one comprise the forecast sample that data amount check is z, need altogether forecast price number D;
Step 4, selected forecast model;
Step 5, when selected forecast model is the RBF neural network, execution in step 6 is to step 12; When selected forecast model is the BP neural network, execution in step 14 is to step 21;
Step 6, setting model training function are newrbe (P, T, the SPREAD) function among the technique computes language MATLAB, this function is used for strict radial basis function network of design, wherein P is input vector, and T is target vector, and SPREAD is the distribution of radial basis function; The model prediction function be among the technique computes language MATLAB sim (' MODEL ', PARAMETERS) function, this function are used for neural network of emulation, wherein MODEL is the network model that trains, PARAMETERS is input vector; Set the Distribution Value Spreads={spread of j different radial basis function
1, spread
2..., spread
j;
Step 7, with commodity A
iThe selling price order of magnitude be normalized to magnitude b
i, obtain
Step 8, with input vector P, target vector T bring into the training function newrbe (P, T, SPREAD), train j heterogeneous networks net
Ij=newrbe (P, T, spread
j), set up forecast sample Test=[t
1, t
2..., t
z],
Step 9, commodity A
iN+1 days j predicted value Y
Ij=sim (net
Ij, Test), establish commodity A
iN+1 days best predictor be y
i, y
i∈ Y
Ij
Step 10, definition coupling weights W=(w
1, w
2, w
3), establish commodity A
iThe value of distribution of three optimum prediction radial basis function of n+1 days be Bspread
I1∈ Spreads, Bspread
I2∈ Spreads, Bspread
I3∈ Spreads tries to achieve the value of the distribution of best radial basis function
Step 11, training constant network net=newrbe (P, T, Bspread);
Step 12, bring best predictor y into
iPredict next time that as forecast sample method is new forecast sample [t
1, t
2..., t
z] middle t
1=last time forecast sample [t
1, t
2..., t
z] in t
2, new forecast sample [t
1, t
2..., t
z] middle t
2=last time forecast sample [t
1, t
2..., t
z] in t
3..., new forecast sample [t
1, t
2..., t
z] middle t
Z-1=last time forecast sample [t
1, t
2..., t
z] in t
z, new forecast sample [t
1, t
2..., t
z] middle t
z=y
i, obtain new forecast sample Test=[t
1, t
2..., t
z], n+2 days predicted value yi=sim (net, Test) of commodity;
Step 13, repeating step 12 obtain commodity A
iAll predicted values; Repeating step 7 obtains the predicted value of all commodity on the varying number level among the data set X, and obtains optimum prediction order of magnitude O, O ∈ M to step 12;
Step 14, setting model training function are the NET=newff (P among the technique computes language MATLAB, T, NEURON) function and NET '=train (NET, P, T) function, wherein newff () function is used for creating a feedforward BP network, P is input vector, and T is target vector, and NEURON is the hidden neuron number, train () function is used for neural network of training, and NET is the feedforward BP network that creates; The model prediction function be NET ' (Test), wherein Test is forecast sample; Set the value Neurons={neuron of j different hidden neuron number
1, neuron
2..., neuron
j;
Step 15, with commodity A
iThe selling price order of magnitude be normalized to magnitude b
i, obtain
Step 16, with input vector P, target vector T brings training function NET=newff (P, T, NEURON) and NET '=train (NET, P, T) into, trains with regard to j heterogeneous networks net
Ij=newff (P, T, Neurons), net
Ij=train (net
Ij, P, T); Set up forecast sample Test=[t
1, t
2..., t
z],
Step 17, commodity A
iN+1 days j predicted value Y
Ij=net
i(Test), establish commodity A
iN+1 days best predictor be y
i, y
i∈ Y
Ij
Step 18, definition coupling weights W=(w
1, w
2, w
3), establish commodity A
iThe value of three optimum prediction hidden neuron numbers of n+1 days be Bneuron
I1∈ Neurons, Bneuron
I2∈ Neurons, Bneuron
I3∈ Neurons tries to achieve the value of best hidden neuron number
Step 19, training constant network net=newff (P, T, Bneuron), net=train (net, P, T);
Step 20, bring best predictor y into
iPredict next time that as forecast sample method is new forecast sample [t
1, t
2..., t
z] middle t
1=last time forecast sample [t
1, t
2..., t
z] in t
2, new forecast sample [t
1, t
2..., t
z] middle t
2=last time forecast sample [t
1, t
2..., t
z] in t
3..., new forecast sample [t
1, t
2..., t
z] middle t
Z-1=last time forecast sample [t
1, t
2..., t
z] in t
z, new forecast sample [t
1, t
2..., t
z] middle t
z=y
i, obtain new forecast sample Test=[t
1, t
2..., t
z], n+2 days predicted value y of commodity
i=net (Test);
Step 21, repeating step 20 obtain commodity A
iAll predicted values; Repeating step 15 obtains the predicted value of all commodity on the varying number level among the data set X, and obtains optimum prediction order of magnitude O, O ∈ M to step 20.
The title, model, type and the price data that extract commodity in the webpage described in the step 1 refer to, utilize any Web data pick-up algorithm, extract title, model, type and price data that commodity show at webpage; X wherein
1, x
2..., x
nCan be i commodity A
iN the price data that extracts from a webpage also can be n average price data that extract from a plurality of webpages.
Step 2 is the price data of arbitrary commodity to be calculated the magnitude of this commodity price data of acquisition.
Step 3 is selected for setting parameter and the forecast model of any one commodity when the price expectation to step 5, and wherein the z value is generally 3,5,7, D value and is generally 3,7.
Technique computes language MATLAB is the product of MathWorks company in step 6 and the step 14, and version is R2011b.
Step 6 is for any one commodity price data of same date predicted value under improved RBF neural network not in a webpage to step 12, or the predicted value of the mean value price data of same date under improved RBF neural network not in a plurality of webpage.
Step 14 is for any one commodity price data predicted value under the improved BP neural network of same date not in a webpage to step 20, or the predicted value of mean value price data under the improved BP neural network of same date not in a plurality of webpage.
Input vector P in step 6, step 8, step 14 and the step 16 is training sample set, and target vector T is the data set of training test predicted value.
Predefined j value is generally 40 in the step 6, and predefined j value is generally 10 in the step 14.
Be that the price data order of magnitude with arbitrary commodity normalizes to unified magnitude in step 7 and the step 15, the order of magnitude of the price data of commodity is identical with normalized magnitude, and the order of magnitude of the price data of these commodity does not carry out the pre-service of normalization magnitude; The order of magnitude of the price data of commodity is different with normalized magnitude, and the order of magnitude of the price data of these commodity carries out the pre-service of normalization magnitude, and magnitude is generally 1,10, and 100,1000.
The coupling weight w=[2 of definition in step 10 and the step 18,4,2].
Data preprocessing method in the various price expectations compared to existing technology, the present invention chooses the price data of the webpage commodity of excavation, utilize improved RBF neural network and BP neural network, calculate the best magnitude of commodity price raw data, adopt the best magnitude of calculating gained, the raw data of commodity price is carried out unified normalization magnitude process; Adopt the preprocess method of the normalization order of magnitude of raw data of the present invention, for a certain particular commodity, reduced the fluctuation range of the price data of these commodity; For different commodity, reduced the difference between the price data of different commodity, limitation when having remedied existing price expectation method factor data preprocess method and being applied to different price forecasting of commodity has improved the accuracy rate of prediction when having improved the versatility of Forecasting Methodology.
Description of drawings
Fig. 1 is the process flow diagram of the specific embodiment of the invention.
Embodiment
Below in conjunction with accompanying drawing technical scheme of the present invention is elaborated:
As shown in Figure 1, embodiment of the present invention is carried out according to following steps:
Title, model, type and the price data of commodity are set up the data set X={A that h commodity are arranged in step 1, the extraction webpage
1, A
2..., A
h, the price data of establishing i commodity extraction is n, A
i={ x
1, x
2..., x
n, i ∈ [1, h] wherein, x
1, x
2..., x
nRefer to A
iN the price data that individual commodity extract;
Step 2, calculate the price magnitude of i different commodity, obtain the price magnitude M={b of different commodity
1, b
2..., b
h;
Step 3, self-defined one comprise the forecast sample that data amount check is z, need altogether forecast price number D;
Step 4, selected forecast model;
Step 5, when selected forecast model is the RBF neural network, execution in step 6 is to step 12; When selected forecast model is the BP neural network, execution in step 14 is to step 21;
Step 6, setting model training function are newrbe (P, T, the SPREAD) function among the technique computes language MATLAB, this function is used for strict radial basis function network of design, wherein P is input vector, and T is target vector, and SPREAD is the distribution of radial basis function; The model prediction function be among the technique computes language MATLAB sim (' MODEL ', PARAMETERS) function, this function are used for neural network of emulation, wherein MODEL is the network model that trains, PARAMETERS is input vector; Set the Distribution Value Spreads={spread of j different radial basis function
1, spread
2..., spread
j;
Step 7, with commodity A
iThe selling price order of magnitude be normalized to magnitude b
i, obtain
Step 8, with input vector P, target vector T bring into the training function newrbe (P, T, SPREAD), train j heterogeneous networks net
Ij=newrbe (P, T, spread
j), set up forecast sample Test=[t
1, t
2..., t
z],
Step 9, commodity A
iN+1 days j predicted value Y
Ij=sim (net
Ij, Test), establish commodity A
iN+1 days best predictor be y
i, y
i∈ Y
Ij
Step 10, definition coupling weights W=(w
1, w
2, w
3), establish commodity A
iThe value of distribution of three optimum prediction radial basis function of n+1 days be Bspread
I1∈ Spreads, Bspreadd
I2∈ Spreads, Bspread
I3∈ Spreads tries to achieve the value of the distribution of best radial basis function
Step 11, training constant network net=newrbe (P, T, Bspread);
Step 12, bring best predictor y into
iPredict next time that as forecast sample method is new forecast sample [t
1, t
2..., t
z] middle t
1=last time forecast sample [t
1, t
2..., t
z] in t
2, new forecast sample [t
1, t
2..., t
z] middle t
2=last time forecast sample [t
1, t
2..., t
z] in t
3..., new forecast sample [t
1, t
2..., t
z]] middle t
Z-1=last time forecast sample [t
1, t
2..., t
z] in t
z, new forecast sample [t
1, t
2..., t
z] middle t
z=y
i, obtain new forecast sample Test=[t
1, t
2..., t
z, n+2 days predicted value y of commodity
i=sim (net, Test);
Step 13, repeating step 12 obtain commodity A
iAll predicted values; Repeating step 7 obtains the predicted value of all commodity on the varying number level among the data set X, and obtains optimum prediction order of magnitude O, O ∈ M to step 12;
Step 14, setting model training function are the NET=newff (P among the technique computes language MATLAB, T, NEURON) function and NET '=train (NET, P, T) function, wherein newff () function is used for creating a feedforward BP network, P is input vector, and T is target vector, and NEURON is the hidden neuron number, train () function is used for neural network of training, and NET is the feedforward BP network that creates; The model prediction function be NET ' (Test), wherein Test is forecast sample; Set the value Neurons={neuron of j different hidden neuron number
1, neuron
2..., neuron
j;
Step 15, with commodity A
iThe selling price order of magnitude be normalized to magnitude b
i, obtain
Step 16, with input vector P, target vector T brings training function NET=newff (P, T, NEURON) and NET '=train (NET, P, T) into, trains with regard to j heterogeneous networks net
Ij=newff (P, T, Neurons), net
Ij=train (net
Ij, P, T); Set up forecast sample Test=[t
1, t
2..., t
z],
Step 17, commodity A
iN+1 days j predicted value Y
Ij=net
i(Test), establish commodity A
iN+1 days best predictor be y
i, y
i∈ Y
Ij
Step 18, definition coupling weights W=(w
1, w
2, w
3), establish commodity A
iThe value of three optimum prediction hidden neuron numbers of n+1 days be Bneuron
I1∈ Neurons, Bneuron
I2∈ Neurons, Bneuron
I3∈ Neurons tries to achieve the value of best hidden neuron number
Step 19, training constant network net=newff (P, T, Bneuron), net=train (net, P, T);
Step 20, bring best predictor y into
iPredict next time that as forecast sample method is new forecast sample [t
1, t
2..., t
z] middle t
1=last time forecast sample [t
1, t
2..., t
z] in t
2, new forecast sample [t
1, t
2..., t
z] middle t
2=last time forecast sample [t
1, t
2..., t
z] in t
3..., new forecast sample [t
1, t
2..., t
z] middle t
Z-1=last time forecast sample [t
1, t
2..., t
z] in t
z, new forecast sample [t
1, t
2..., t
z] middle t
z=y
i, obtain new forecast sample Test=[t
1, t
2..., t
z], n+2 days predicted value y of commodity
i=net (Test);
Step 21, repeating step 20 obtain commodity A
iAll predicted values; Repeating step 15 obtains the predicted value of all commodity on the varying number level among the data set X, and obtains optimum prediction order of magnitude O, O ∈ M to step 20.
The title, model, type and the price data that extract commodity in the webpage described in the step 1 refer to, utilize any Web data pick-up algorithm, extract title, model, type and price data that commodity show at webpage; X wherein
1, x
2..., x
nCan be i commodity A
iN the price data that extracts from a webpage also can be n average price data that extract from a plurality of webpages.
Step 2 is the price data of arbitrary commodity to be calculated the magnitude of this commodity price data of acquisition.
Step 3 is selected for setting parameter and the forecast model of any one commodity when the price expectation to step 5, and wherein the z value is generally 3,5,7, D value and is generally 3,7.
Technique computes language MATLAB is the product of MathWorks company in step 6 and the step 14, and version is R2011b.
Step 6 is for any one commodity price data of same date predicted value under improved RBF neural network not in a webpage to step 12, or the predicted value of the mean value price data of same date under improved RBF neural network not in a plurality of webpage.
: step 14 is for any one commodity price data predicted value under the improved BP neural network of same date not in a webpage to step 20, or the predicted value of mean value price data under the improved BP neural network of same date not in a plurality of webpage.
Input vector P in step 6, step 8, step 14 and the step 16 is training sample set, and target vector T is the data set of training test predicted value.
Predefined j value is generally 40 in the step 6, and predefined j value is generally 10 in the step 14.
Be that the price data order of magnitude with arbitrary commodity normalizes to unified magnitude in step 7 and the step 15, the order of magnitude of the price data of commodity is identical with normalized magnitude, and the order of magnitude of the price data of these commodity does not carry out the pre-service of normalization magnitude; The order of magnitude of the price data of commodity is different with normalized magnitude, and the order of magnitude of the price data of these commodity carries out the pre-service of normalization magnitude, and magnitude is generally 1,10, and 100,1000.
The coupling weight w=[2 of definition in step 10 and the step 18,4,2].
For the validity of this method is described better, 8 kinds of different RMB exchange rates that utilization is extracted from webpage from Dec 31,1 day to 2011 January in 2011 every day the average price data as raw data, the magnitude that calculates raw data is 1,10 and 100, and the raw data order of magnitude is carried out the normalized experiment.
Under the experimental situation of improved RBF neural network, when not carrying out the pre-service of normalization magnitude, the experimental result of raw data is: the average error of Dollar A is 3.9%, the average error of Hongkong dollar is 11.82%, the average error of Canadian Dollar is 640.84%, the average error of dollar is 21571.04%, Euro average error be 1.66%, the average error of yen is 1.15%, the average error of Swiss franc is 2.77%, the average error of Singapore dollar is 28959.17%, and the average error of experiment is 6399.04%; Be normalized at 100 o'clock in the data magnitude, experimental result is: the average error of Dollar A is 3.9%, the average error of Hongkong dollar is 1.97%, the average error of Canadian Dollar is 640.84%, dollar average error be 21571.04%, Euro average error be 1.66%, the average error of yen is 1233177%, the average error of Swiss franc is 2.77%, and the average error of Singapore dollar is 28959.17%, and the average error of experiment is 160544.8%; Be normalized at 10 o'clock in the data magnitude, experimental result is: the average error of Dollar A is 1.77%, the average error of Hongkong dollar is 0.94%, the average error of Canadian Dollar is 0.39%, dollar average error be 0.11%, Euro average error be 224438.5%, the average error of yen is 1.05%, the average error of Swiss franc is 1.57%, and the average error of Singapore dollar is 0.50%, and the average error of experiment is 28055.6%; Be normalized at 1 o'clock in the data magnitude, experimental result is: the average error of Dollar A is 0.98%, the average error of Hongkong dollar is 0.94%, the average error of Canadian Dollar is 0.41%, dollar average error be 0.09%, Euro average error be 1.12%, the average error of yen is 1.29%, the average error of Swiss franc is 1.91%, and the average error of Singapore dollar is 0.16%, and the average error of experiment is 0.86%.Conclusion is that the data magnitude is normalized at 1 o'clock, has obtained best predicting the outcome, and the Average Accuracy of prediction reaches 99.14%.
Under the experimental situation of improved BP neural network, when not carrying out the pre-service of normalization magnitude, the experimental result of raw data is: the average error of Dollar A is 1.31%, the average error of Hongkong dollar is 0.17%, the average error of Canadian Dollar is 0.28%, the average error of dollar is 0.26%, Euro average error be 1.41%, the average error of yen is 1.24%, the average error of Swiss franc is 1.65%, the average error of Singapore dollar is 0.21%, and the average error of experiment is 0.82%; Be normalized at 100 o'clock at the order of magnitude, experimental result is: the average error of Dollar A is 1.31%, the average error of Hongkong dollar is 0.24%, the average error of Canadian Dollar is 0.46%, dollar average error be 0.03%, Euro average error be 2.21%, the average error of yen is 1.14%, the average error of Swiss franc is 1.59%, and the average error of Singapore dollar is 2.98%, and the average error of experiment is 1.25%; Be normalized at 10 o'clock in the data magnitude, experimental result is: the average error of Dollar A is 1.09%, the average error of Hongkong dollar is 0.28%, the average error of Canadian Dollar is 0.13%, dollar average error be 0.48%, Euro average error be 1.38%, the average error of yen is 2.54%, the average error of Swiss franc is 1.93%, and the average error of Singapore dollar is 0.06%, and the average error of experiment is 0.99%; Be normalized at 1 o'clock in the data magnitude, experimental result is: the average error of Dollar A is 0.39%, the average error of Hongkong dollar is 0.18%, the average error of Canadian Dollar is 0.37%, dollar average error be 0.40%, Euro average error be 1.43%, the average error of yen is 1.18%, the average error of Swiss franc is 1.74%, and the average error of Singapore dollar is 0.28%, and the average error of experiment is 0.75%.Conclusion is that the data magnitude is normalized at 1 o'clock and has obtained best predicting the outcome, and the Average Accuracy of prediction is up to 99.25%.
Above experimental data has illustrated that this data preprocessing method is to the versatility with the different commodity of kind, in order to illustrate that this data preprocessing method is to the versatility of variety classes commodity, 10 kinds of different agricultural product that utilization is extracted from webpage from year February in January, 2011 to 2012 all average price data in totally 59 weeks as raw data, the magnitude that calculates raw data is 1 and 10, and the raw data order of magnitude is carried out the normalization Pretreatment Test.
Under the experimental situation of improved RBF neural network, when not carrying out the pre-service of normalization magnitude, the experimental result of raw data is: the average error of beef is 3149934%, the average error of soya-bean oil is 17.96%, the average error of egg is 1.61%, the average error of peanut oil is 2.89%, the average error of flour is 0.11%, the average error of pork is 542574.4%, the average error of rice is 0.34%, and the average error of white granulated sugar is 0.44%, and the average error of blending stock is 6.61%, the average error of mutton is 325260%, and the average error of experiment is 401779.9%; Be normalized at 10 o'clock in the data magnitude, experimental result is: the average error of beef is 3149934%, the average error of soya-bean oil is 17.96%, the average error of egg is 1.61%, the average error of peanut oil is 2.89%, the average error of flour is 0.12%, the average error of pork is 542574.4%, the average error of rice is 0.34%, the average error of white granulated sugar is 0.44%, the average error of blending stock is 6.61%, and the average error of mutton is 325260%, and the average error of experiment is 401779.9%; Be normalized at 1 o'clock in the data magnitude, experimental result is: the average error of beef is 2.44%, and the average error of soya-bean oil is 17.96%, and the average error of egg is 1.61%, the average error of peanut oil is 0.91%, the average error of flour is 0.11%, and the average error of pork is 7.35%, and the average error of rice is 0.34%, the average error of white granulated sugar is 0.44%, the average error of blending stock is 0.13%, and the average error of mutton is 0.41%, and the average error of experiment is 3.17%.Conclusion is that the data magnitude is normalized to 1 o'clock experiment and has obtained best predicting the outcome, and the Average Accuracy of prediction reaches 96.83%.
The present invention can be combined with computer system, thereby automatically finishes the prediction of commodity price.
The proposition of the invention a kind of data preprocessing method of the many kinds price forecasting of commodity based on neural network, and this data preprocessing method is applied to the pre-service of the commodity price datas such as RMB exchange rate, agricultural product, utilize improved RBF neural network and BP neural network in the prediction of the enterprising product price of doing business of pretreated price data, improved the versatility of Forecasting Methodology, obtain higher predictablity rate, had very high practical value.
Data pre-service when the data preprocessing method of the present invention proposes a kind of many kinds price forecasting of commodity based on neural network not only can be used for RMB exchange rate and the price expectation of agricultural product production and sales field, the data pre-service in the time of also can being used for other consumer price forecasting of commodities.