# Analysis and Prediction of the IPv6 Traffic over Campus Networks in Shanghai
## Evaluation
### Experimental Setup  
(1) Implementation details: We pre-train the two LSTM and two SARIMA models by predicting the IPv4 traffic volume or IPv6 traffic volume of the next time slot. We train a dedicated LS6 model for each dataset. We implement the deep learning model using PyTorch and build the SARIMA model by Python's statsmodels library. The experiments are implemented on a server with an Intel i7-9750H CPU, an NVIDIA GeForce RTX 1650 8 GB graphics card, and a DDR4 8 GB memory. The LSTM model has a hidden layer with 10-dimension hidden units, containing 12 LSTM cells, so the input historical time slot number is fixed as 12. For SARIMA, we set the seasonal cycle as 12 and select the best SARIMA model based on the Akaike information criterion (AIC) [52]. The MLP is composed of one input and one output layer, and one hidden layer with 100 units using the ReLU activation function. We select Adam [53] as the optimizer for the deep learning model. The learning rate is set to 0.001 and the batch size is set to 8 in DHU and 16 in ECNU. The hyperparameter \(\alpha\) is set to 0.01.  
(2) Baselines: To verify the prediction performance of our model, we compare LS6 with some existing approaches.  
* Naive-2h: Naive-2h uses the IPv6 traffic volume of the previous time slot as the predicted value. We use Naive-2h to show the traffic difference between adjacent time slots.
* Naive-24h: Naive-24h uses the IPv6 traffic volume 24 h ago, in other words, the traffic value of the corresponding time slot of the previous day, as the predicted value. We use Naive-24h to show the traffic difference between adjacent days.
* ARIMA: We only use the previous IPv6 traffic data to fit an ARIMA model and then predict the IPv6 traffic volume at the next time slot with ARIMA.
* SARIMA: We only use the previous IPv6 traffic data to fit a SARIMA model which is used as a part of traffic encoding in LS6 and then predict IPv6 traffic volume at the next time slot with SARIMA.
* SVM: SVM is a classic supervised machine learning algorithm which can be used for regression. We only use the IPv6 traffic data to train an SVM and use the output of the SVM as the predicted IPv6 traffic volume.
* LSTM: We only use the IPv6 traffic data to train an LSTM network which is used as a part of traffic encoding in LS6. The output of the LSTM network is fed to a fully connected layer to get the predicted IPv6 traffic volume.
* Bi-LSTM [54]: Bidirectional LSTM is a variant of LSTM composed of a forward LSTM and a backward LSTM, which can save information from both the past and future. We train it the same way we train the LSTM network. The output of the Bi-LSTM network is fed to a fully connected layer to get the predicted IPv6 traffic volume.
* PLSTM [55]: Phased LSTM (PLSTM) is a variant of LSTM and extends the LSTM model by adding a new time gate, which achieves faster convergence than the vanilla LSTM on long sequences tasks. It has also been applied in time series prediction [56; 57; 58; 59]. Wetrain it the same way we train the LSTM network. The output of the PLSTM network is fed to a fully connected layer to get the predicted IPv6 traffic volume.  
(3) Metrics: The evaluation metric mean absolute percentage error (MAPE) compares the prediction performance of different approaches. MAPE has been widely used for time series prediction problems in a variety of domains such as network traffic [60], vehicle speed [61], electrical power [62], and remaining service duration of bearings [63]. Denoting the real traffic volume as \(y\) and the predicted traffic volume as \(\hat{y}\), the MAPE metric is defined as follows:  
\[MAPE=\frac{100\%}{N}\sum_{1}^{N}\left|\frac{\hat{y}_{i}-y_{i}}{y_{i}}\right| \tag{14}\]  
where \(N\) is the number of data samples in the test set. The smaller the MAPE value is, the better the prediction performance is.