## 2 Materials and Methods
### Machine Learning Approach
#### 2.3.4 Classification  
Support Vector Machine (SVM) [29] is a supervised learning algorithm that is used to solve regression and classification problems. Classification is performed by setting a separation hyperplane in the function space. In its basic form, it performs a linear classification on two clusters. Thanks to the kernels, nonlinear classification can also be carried out. They are employed to transform the underlying feature space into an infinite or high-dimensional feature space through a kernel function and then to construct an OSH (Optimal Separating Hyper Plane) between the two classes in the transformed space, thus achieving highly nonlinear hyperplanes and gaining expert knowledge of the problem through kernel engineering. Among these great advantages is also the regularization parameter, which encourages the user to avoid overfitting. To build a non-linear support  
Figure 4: Sample input image of a Cercospora-affected leaf (**left**) with its segmented healthy area (**middle**) and extracted disease spot (**right**). Figure 5: Sample input image of an Anthracnose-affected leaf (**left**) with its segmented healthy area (**middle**) and extracted disease spot (**right**). Figure 6: Sample input image of a fire blight-affected leaf (**left**) with its segmented healthy area (**middle**) and extracted disease spot (**right**). Figure 7: Sample input image of an early blight-affected leaf (**left**) with. its segmented healthy area (**middle**) and extracted disease spot (**right**). vector classifier, we substitute the inner product (x, y) for the kernel function K (x, y), as shown in (24). \[f(x)=sgn(\sum_{i=1}^{1}(a_{i}y_{i}k\,K(x_{i})+b)) \tag{20}\]  
where f(x) sets the belongingness of x. At this point, we suppose that abnormal subjects were tagged as +1 and others as \(-1\). The SVM consists of two parts. Throughout the learning phase, the first phase chooses the basis K (x\({}_{i}\), x) = 1, 2... N from the specified kernel set, whereas the second phase builds a linear function in the space. Doing so is analogous to locating the optimum hyperplane in the resulting characteristic space. Three principal kinds of kernel functions presently exist, whose formula is given in Table 3:  
Note that polynomial kernel and RBF functions are broadly used owing to their powerful classification capabilities [30]. As a result, we performed numerous setup experiments and discovered that the Radial Basis Function with C = 100 as the normalization parameter produced the best outcomes. The accuracy obtained on the test set is 84.10%, as shown in Figure 8.  
K-Nearest Neighbors (KNN) [31] is a fairly straightforward algorithm that is frequently used to address classification issues. It does not have a training phase and is non-parametric. When selecting a sample class, KNN looks at its k nearest neighbors and decides which class it pertains to by plain majority rule, assuming that many of the samples in the same class are near to each other in the functionality space. Note that lower values of k enable greater non-linearity but are very susceptible to aberrations. In contrast, higher values of k are not suitable for complex boundaries, but they allow good generalization. The KNN classification steps are as follows:  
\(X_{\text{I}}\): learning data  
\(Y_{\text{I}}\): class labels  
Figure 8: Comparison of machine learning algorithms. \begin{table}
\begin{tabular}{c c} \hline Polynomial kernel function & K\({}_{\text{ploy}}(x,x_{i})=[(x,x_{i})+1]^{q}\) \\ The outcome is a polynomial classifier of the rank q \\ \hline Radial Basis Kernel (RBF) function & K\({}_{\text{ebf}}(x,x_{i})=\exp\left(\frac{|x_{-}x_{i}|^{2}}{\sigma^{2}}\right)\) \\ \hline Sigmoid kernel function & K\((x,x_{i})=\tan\ h(v(x.x_{i})+c)\) \\ \hline \end{tabular}
\end{table} 
Table 3: Principal kernel functions and their formulas.