## 3 Mapping Lithologies in the Kohat Plateau Using SVM and ANN
### Preprocessing of Data  
The ML task consists of (a) preprocessing, (b) training, and (c) testing the model. Data preprocessing is necessary to transform available data into a format containing only relevant information related to the problem [32]. For example, MNF [5] is commonly used for denoising remote sensing data. It converts a noisy data cube into output images with gradually increasing noise levels. As a result, the MNF output images gradually decrease the image quality. MNF converts a linear transform in two steps: (1) Noise whitening is performed, i.e., the noise in the data is rescaled and decorrelated using a noise covariance matrix. Thus, the noise has no band-to-band correlations and unit variance. (2) Standard PCA transform is performed on the noise-whitened data (Figure 3). In the preprocessing stage, PCA is a widely accepted statistical technique that transforms raw multivariate, often intercorrelated, dataset variables into a new set of uncorrelated variables represented by a group of principal components. The first principal component contains the most variability in the data, and each subsequent component has a lower representation of variance in data [32]. PCA enhances spectral characteristics of surface material by minimizing the irradiance effects that dominate all bands, removing redundant data of different bands, confining information within a few crucial bands [18]. These bands are retained as input to the ML algorithms for further analysis. Training samples were selected carefully by analyzing the vegetation (Figure 5) and comparing (1) polygons for all classes (Figure 5) from the previous geological map (Figure S1), (2) the chosen principal components (Figure 6), and (3) MNF (Figure 6). The NIR (B8) and SWIR (B11 and B12)  
Figure 4: Average surface reflectance based on training samples selected from Sentinel-2 data for ten lithological units.  
bands of Sentinel-2 were used to classify lithological units. The total area of the study region is 6671.8 km\({}^{2}\), 105.45 km along easting and 63.27 km along northing.  
Figure 5: NDVI (top) of the study area after preprocessing; sample polygons (bottom) collected and annotated by information from published geological map (Figure S1), PCA and MNF results (Figure 4) of the study area defined by (1) 33 30\({}^{\prime\prime}\).83\({}^{\prime\prime}\) N, 70 45\({}^{\prime\prime}\).205\({}^{\prime\prime}\) E; (2) 33 30\({}^{\prime\prime}\).83\({}^{\prime\prime}\) N, 71 54\({}^{\prime\prime}\).87\({}^{\prime\prime}\) E; (3) 32 55\({}^{\prime\prime}\)37.63\({}^{\prime\prime}\) N, 71 54\({}^{\prime\prime}\).87\({}^{\prime\prime}\) E; and (4) 32 55\({}^{\prime\prime}\)37.63\({}^{\prime\prime}\) N, 70 45\({}^{\prime\prime}\).205\({}^{\prime\prime}\) E.  
Samples from the selected polygons were converted into 30 m pixels using GEE built-in function to assign relevant labels before classification, as shown in Table 1. Out of 24,340 pixels, 70% were selected randomly for training, while 30% were used as test dataset to evaluate the machine learning model.  
Figure 6: MNF (**top**) and false-color composite (**bottom**) of PC components (PC-3, PC-4, and PC-5) of the study area defined by corner points (1) 33 30\({}^{\prime}\)9.83\({}^{\prime\prime}\) N, 70 45\({}^{\prime}\)2.05\({}^{\prime\prime}\) E; (2) 33 30\({}^{\prime}\)9.83\({}^{\prime\prime}\) N, 71 54\({}^{\prime}\)14.87\({}^{\prime\prime}\) E; (3) 32 55\({}^{\prime}\)37.63\({}^{\prime\prime}\) N, 71 54\({}^{\prime}\)14.87\({}^{\prime\prime}\) E; and (4) 32 55\({}^{\prime}\)37.63\({}^{\prime\prime}\) N, 70 45\({}^{\prime}\)2.05\({}^{\prime\prime}\) E.