# Stream Data Load Prediction for Resource Scaling Using Online Support Vector Regression
## 6 Results
### Estimation of Stream Data Load Prediction Algorithm  
In order to verify the effectiveness of online SVR for the prediction algorithm of stream data input load time series, 4 open, nonlinear and non-stationary time series data sets, namely WordCup98 [29], Poland Electric Demand time series, Darwin Sea Level Pressures, and Darwin Sea are tested [30]. Four time series datasets are used to carry out 160 step single step prediction, and the prediction efficiency of online SVR algorithm, the improved online SVR algorithm and BPNN algorithm is compared comprehensively. Parameter selection generally adopts the method of combining cross-verification with grid search. The existing method of combining cross-validation with grid search predicts each set of parameters together on each subset and takes the parameter that ensures its average error is as small as possible. However, the object predicted in this paper is the stream data time series, which uses historical data to predict future data. Therefore, using the follow-up data to predict the previous data dose not consist characteristics of stream data series in cross-validation. This paper improves the cross-validation method. By using a subset of \(1-n\) to test subset of \(n+1\), it can improve the accuracy and stability. The specific experimental conditions are as follows: The Gauss kernel function is selected in an improved Online SVR algorithm, the penalty parameter \(C_{G}=10\), the insensitive loss function kernel function \(\varepsilon_{G}=0.1\). Parameter \(H_{G}=20\), and the length of the initial online modeling time sequence is 100. The online SVR algorithm selects the RBF kernel function, with the penalty parameter \(C_{R}=1\), the insensitive loss function kernel function \(\varepsilon_{R}\) = 0.1. Parameter \(H_{R}\) = 20, and the initial modeling time series length is 100. BPNN selects 3 layers and using sliding window method to train the network. The activation function of the forward process selects the Tansig function and the Purelin function. Target accuracy is 0.005, maximum cycle number is 5000. In the experiment, two average standards are adopted to make comprehensive comparison between algorithms: Mean Absolute Error, (MAE) and Normalized Root Mean Square Error, (NRMSE). The definitions of MAE and NRMSE are as follows:  
\[MAE =\frac{1}{n}{\sum\limits_{i=1}^{n}{\left|{x(i)-x(i)^{*}}\right|}} \tag{18}\] \[NRMSE =\frac{{\sqrt{\frac{1}{n}{\sum\limits_{i=1}^{n}{\left[{x(i)-x(i)^{* }}\right]^{2}}}}}}{{\sqrt{\frac{1}{n}{\sum\limits_{i=1}^{n}{\left[{x(i)-x^{*}} \right]^{2}}}}}} \tag{19}\]  
\(n\) is the number of data points of the dataset, \(x(i)\) is the true value, \(x(i)^{*}\) is the predicted value, and \(x^{*}\) is the mean of the time series. The results of four time series prediction accuracy and execution efficiency are shown in Table 1. The improved online SVR algorithm is superior to the standard online SVR algorithm and BPNN in prediction accuracy, the execution efficiency is higher, and the execution efficiency is improved by about 20%-30%. Therefore, the improved online SVR algorithm can predict the time series very well. ### Estimation of Stream Data Load Prediction Algorithm  
In order to verify the accuracy of the MSTW model, we first need to train the parameters of the model. We run the four benchmarks, namely Grep, Rolling Count [31], Unique Visitor, Page View, and Rolling Sort on the cloud platform and collect the MSTW when M = {1,2,3,4,5,6,7,8,9,10}, and set the number of virtual machine used to verify the model as Test of M = {7,8,9,10}. For Grep and Rolling Count, The Adventures of Tom Sawyer document data [32] is used as input, as well as Unique Visitor and random analog access. Input data payload and data processing throughput can be obtained through Java Management Extensions (JMX) monitoring. The time window T is set as 5 seconds. The parameters obtained from model learning are shown in Table 2, and \(w_{2}\), \(w_{3}\) are always 0. This shows that the model we have developed is a linear model.