The discovery of significant oil reserves in the pre-salt region along the eastern coast of Brazil marks a significant milestone in hydrocarbon exploration and production, triggering extensive discussions on the origin and composition of non-marine carbonate rocks. Dolomitization and silicification have been identified as major processes responsible for substantial syn/post-depositional alterations in pre-salt reservoir rocks. In this study, we assess the feasibility of employing machine learning techniques to identify highly dolomitized and/or silicified intervals. A 25-m-thick rock succession from a drill core in the Tupi oil field, Santos Basin, was selected for analysis. Chemical element measurements were collected at approximately 10 cm intervals using an Olympus Vanta M Series model portable XRF analyzer. Subsequently, the acquired dataset underwent preprocessing and processing steps, including: (i) standardization of the database, (ii) data cleaning and imputation, (iii) basic statistical analysis, (iv) data transformation, and (v) outlier removal. Due to the considerable number of variables, the dataset was reduced to three principal components (PCs) using principal component analysis (PCA). Unsupervised learning was performed using the k-Means clustering algorithm, which employs Euclidean distance to determine the similarity between objects. Pearson's correlation analysis was also conducted to support the chemical interpretation of the clusters by comparing them with macroscopic and microscopic geological information. To ensure the optimal representativeness of the data, five clusters (C1, C2, C3, C4, and C5) were defined. Clusters C1, C2, and C3 exhibited increasing values on PC1, while C4 and C5 were characterized by higher values on PC2 and PC3, respectively. Based on significant correlations identified by Pearson's analysis, we can conclude that there is a progressive increase in Si content represented by C1, C2, and C3, accompanied by a relative decrease in all other chemical elements measured by the portable XRF. C1 not only emerged as the most frequently occurring cluster but also displayed the most common chemical composition in the studied interval, with Ca > Si. C2 and C3 corresponded to more intensely silicified levels. C4 exhibited a stronger affinity to Ca and Mg, suggesting intensified dolomitization. C5 stood out due to its relationship with Ba, an element associated with barite, a mineral that may result from the percolation of hydrothermal fluids depending on the associated paragenesis.