The present research consists of using Wenner's four electrodes method to measure the electrical resistivity of soil (e.g., clayey silt and clay), applying two machine-learning algorithms (k Nearest Neighbor (KNN) and Support Vector Machine (SVM)) to predict the type of soil. Such predictions may be leveraged, e.g., to extract parameters to help choose materials to withstand electrochemical corrosion in a hybrid environment (soil and moisture). A dataset of 162 sample points was obtained from the literature ( 151training, 11 testing points). From laboratory experiments, 26 sample points (corresponding to 130 measurements) were obtained; 6 points were added to the literature training dataset, and 20 were used as testing points for final validation. The results show that given the electrical resistivity of soil and its moisture, the KNN model is capable of predicting the type of soil with accuracy, error rate, sensitivity, specificity, and precision of 70%, 30%, 64%, 83%, and 90% respectively. In contrast, the SVM presented an error rate and accuracy of 44.1% and 55.9 % respectively.