# A Forecast Model of the Number of Containers for Containers by Voyage
## 3 Mixed Kernel Function SVM Prediction Model
### Parameter Optimization  
The prediction accuracy of the mixed kernel function SVM is related to the insensitive loss parameter \(\varepsilon\), penalty parameter \(C\), polynomial kernel function parameter \(q\), width of the radial basis kernel function \(\sigma\), and the weight adjustment factor \(\rho\). At present, when the SVM is used for regression fitting prediction, the methods for determining the penalty parameters and kernel parameters mainly include the experimental method [39], grid method [40], ant colony algorithm [41], and particle swarm algorithm [42]. Although the relevant parameters for the experiment can be obtained by a large number of calculations, the efficiency is low and the selected parameters do not necessarily measure up to the global optimum. By setting the step size for the data within the parameter range, the grid method sequentially optimizes and compares the results to obtain the optimal parameter values. If the parameter range is large and the set step size is small, the time spent in the optimization process is too long, and the result obtained may be a local optimum. As a general stochastic optimization method, the ant colony algorithm has achieved good results in a series of combinatorial optimization procedures. However, the parameter setting in the algorithm is usually determined by experimental methods resulting in a close interdependence between the optimization performance of the method and human experience, making it difficult to optimize the performance of the algorithm. Due to the loss of diversity of species in search space, the particle swarm algorithm leads to premature convergence and poor local optimization ability [43; 44]. Therefore, it is of great importance to apply the appropriate optimization algorithm for optimal combinatorial results of the parameters of the support vector of the mixed kernel functions to obtain the SVM with the best performance [45], which will ensure an accurate prediction of the number of allocated containers of the container ship for one voyage. The GA [46] is the most widely used successful algorithm in intelligent optimization. It is a general optimization algorithm with a relatively simple coding technique using genetic operators. Its optimization is not restrained by restrictive conditions and its two most prominent features are implicit parallelism and global solution space search. Therefore, GA is used in this study to optimize the parameter combination \((\varepsilon\ C\ q\ \sigma\ \rho)\) consisting of 5 parameters. In the optimization of the SVM parameter combination of the mixed kernel function by using GA, each chromosome represents a set of parameters and the chromosome species search for the optimal solution through the GA (including interlace operation and mutation operation) and strategy selection. As the objective of optimizing the SVM parameters of the mixed kernel function is to obtain better prediction accuracy, the mixed kernel function \((\varepsilon_{n}\ C_{n}\ q_{n}\ \sigma_{n}\ \rho_{n})\) SVM model is trained and then tested by 5 \(\times\) cross validation. Proportional selection is the selection strategy adopted in this study. After the probability is obtained, the roulette wheel is used to determine the selection operation and hence, the fitness function is defined as the reciprocal of the prediction error of the mixed kernel function SVM as given below:  
\[F=1\Bigg{/}\frac{1}{5}\sum_{i=1}^{5}\Bigg{[}\frac{1}{m}\sum_{j=1}^{NP}\big{(} \hat{P}_{ij}-P_{ij}\big{)}^{2}\Bigg{]} \tag{12}\]  
where NP is the number of data in each sample subset, \(\hat{P}_{ij}\) is the predicted value, and \(P_{ij}\) is the actual value. Thus, the chromosome with the minimum fitness function value in the whole chromosome swarm as well as its index among the chromosome swarm is determined.