## 3 Materials and Methods
### Support Vector Machine (SVM) Classification  
In this paper, we used SVM classification of morphological features for cell nucleus and lumen to predict the Gleason grading of prostate cancer. Classification of the various Gleason grade groups from microscopic biopsy images is a very challenging task [31; 32]. The classification accuracy depends on different classifiers and their kernel types. An SVM is a supervised learning technique, but it can be applied to both classification and regression problems [33; 34]. SVMs can generate optimal hyperplane in an iterative manner that maximizes the margin, where the margin is the largest distance to the nearest training data point of any class.  
For classification purposes, we experimented with a few classifiers, such as logistic regression (LR), linear discriminant analysis (LDA), and SVMs. We selected SVMs for this analysis because they achieved better accuracy. Supervised learning approaches generally proceed as follows: prepare the data set for training and testing; choose an appropriate algorithm; select features to fit the model; train the model; use the trained model for prediction. In SVM classification, linear and Gaussian kernel are used to classify samples as benign and malignant and discriminate between Grade 3 vs. Grade 4, 5 and Grade 4 vs. Grade 5 of the Gleason grade groups [35].  
We used 2-fold cross-validation to train the model and compared the performance of the different classification models. Later, we adjusted the K-fold cross-validation manually to improve the accuracy [36; 37]. The linear kernel, \(K\), maps the original data with the kernel function,  
\[K(x)=(x\.\ x^{\prime}+c) \tag{10}\]  
where \(x\) is the data and \(c\) is a constant.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Feature Type** & **Feature Description** \\ \hline Nucleus features & Area, perimeter, major axis length, minor axis length, circularity, diameter, compactness, nucleus to nucleus average distance, nucleus to nucleus minimum distance \\ \hline Lumen features & Area, perimeter, major axis length, minor axis length, eccentricity \\ \hline \hline \end{tabular}
\end{table}
Table 1: Proposed features for support vector machine (SVM) binary classification to classify Gleason grading of prostate cancer.  
In SVM classification, the gaussian kernel function, used for binary classification was expressed by:  
\[K(x,x^{\prime})=exp(-\gamma\|x-x^{\prime}\|^{2}),\ \gamma=\frac{1}{2\sigma^{2}} \tag{11}\]  
where \(x,x^{\prime}\) is the feature vector, \(\|x-x^{\prime}\|^{2}\) is the Euclidean distance between two feature vectors, \(\gamma\) is a hyper-parameter, which changes the smoothness of the kernel function, and \(\sigma\) is a free parameter.  
To classify Gleason grade groups, we used the proposed binary classification approach, which divides the multi-category classification into multiple two-category groupings. Each division in Figure 6 represents a separate and independent classification, amounting to three binary divisions. In the first sequence, all of the samples in the dataset were classified as \"malignant\" vs. \"benign\". Within the cancer group, we separated the dataset between Grade 3 vs. Grade 4+5, and Grade 4 vs. Grade 5, and further classified these using different SVM models [38; 39; 40].