The task of identifying autonomous pits from a numerical perspective resembles anomaly detection in numerical datasets, as the majority of optical data should display similar numerical patterns, except for the pits, which are expected to differ strikingly. Anomaly detection is a well-established concept in data processing and can be addressed using dimensionality reduction methods, particularly Uniform Manifold Approximation and Projection for Dimension Reduction (UMAP), which has demonstrated excellent performance in both the literature and our previous work. UMAP often surpasses other dimensionality reduction techniques due to its ability to effectively preserve complex data manifolds, handle nonlinear structures, and maintain computational efficiency for large datasets. The locations of pitting patterns observed in UMAP projections were clustered using the Density-Based Spatial Clustering of Applications with Noise (DBSCAN) method. The task of clustering optical signatures related to the formation of a passive layer prior to pitting is more nuanced compared to pit detection. In this case, the optical signatures should represent a relatively homogeneous change in reflectivity values, unlike the striking intensity differences associated with pits. Segmenting regions in optical images with continuous changes is similar to image segmentation tasks, where the K-means algorithm has proven to be both simplistic and highly efficient. Consequently, it was utilized in this work for the segmentation process, which formed the basis of the pitting prediction procedure.