# Quality of Experience (QoE)-Aware Fast Coding Unit Size Selection for HEVC Intra-Prediction
## 4 Proposed Fast CU Size Selection Algorithm
### Level I(L-1) SVM Models: Features and Optimal Weight Calculation
#### 4.1.3 Weight Calculation  
The weight parameters for L-1 SVM models (that utilise the objective function in (6)) are defined such that highest attainable precision is achieved for a particular decision. In this case, the precision \(\chi\) for the two SVMs (\(S^{\eta}(i)\)) for the \(i\)th CU depth level is defined as  
\[\max\chi(S^{\eta=+1}(i))=\frac{T_{p}}{T_{p}+F_{p}} \tag{8}\]  
and  
\[\max\chi(S^{\eta=-1}(i))=\frac{T_{n}}{T_{n}+F_{n}}. \tag{9}\]  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Feature Category** & **Feature** & **Depth(s)** \\ \hline Texture Information & \(\alpha_{1}\) & \(0,1,2,3\) \\  & \(\alpha_{2}\) & \(0,1\) \\ \hline Pre-analysis of current CU & \(\beta_{1}\) & \(0,1,2,3\) \\  & \(\beta_{2}\) & \(0,1\) \\ \hline Context Information & \(\gamma_{1}\) & \(0,1\) \\  & \(\gamma_{2}\) & \(0,1\) \\  & \(\gamma_{3}\) & \(2,3\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Features used for different CU depth levels [10].  
Here, \(T_{p}\), \(T_{n}\) are the \"True Positive\", and \"True Negative\" samples, whereas \(F_{p}\) and \(F_{n}\) are the \"False Positive\" and \"False Negative\" samples, respectively. In addition, \(S^{\eta=+1}\) and \(S^{\eta=-1}\) identify the SVM decision models that carry more weight into CU \"split\" and \"non-split\" decisions, respectively, with maximum confidence using the optimisation function defined in (6). Maximising the precision for \(S^{\eta=+1}\) model results in minimising the categorisation of \"non-split\" samples as \"split\". At the same time, maximising the precision for \(S^{\eta=-1}\) minimises the categorisation of \"split\" samples as \"non-split\". The logical separation of the samples, SVM models, and corresponding hyperplanes for a particular CU depth level are illustrated in Figure 4.  
The optimal weight parameters (\(W_{s}\) and \(W_{ns}\) in (6)) for each of the SVM models (\(S^{\eta=+1}\) and \(S^{\eta=-1}\)) are determined at run time after the data collection (described in Section 4.1.1) is complete for a particular depth level. Here, weight value pairs ranging from 5:1 (\(W_{s}\):\(W_{ns}\)) and 1:5 (\(W_{ns}\):\(W_{s}\)) with a step size of 0.5 are evaluated for \(S^{\eta=+1}\) and \(S^{\eta=-1}\) SVM models, respectively. Then, the weight pair that achieves the highest precision in (8) and (9) for \(S^{\eta=+1}\) and \(S^{\eta=-1}\), respectively, is selected for the corresponding optimisation function in (6). Here, the \(N=2000\) data points collected are equally divided to form training and cross-validation sets. For optimal weight calculation for the SVMs, cross-validation is done over predetermined weight value pairs to ensure that time consumed for the process is minimised. The kernel function selected for the SVMs is Radial Basis Function (RBF), given its ability to work efficiently with small numbers of features while performing well with nonlinear decision boundaries [46]. In order to minimise the impact of model tuning time during the encoding process, other hyper-parameters with RBF kernel, i.e., cost parameter, gamma parameter, and the number of training samples, are predetermined and are not tuned during the model building process. The cost parameter is set at 100, giving a large penalty for misclassification, when compared with the default value of 1. The value for gamma is set at the default value, i.e., \(1/numproffeatures\) for each model.