Drilling of exploratory boreholes is one of the most important and costly steps in mineral exploration, which can provide us with accurate and appropriate information to continue the mining process. There are limitations on drilling the target boreholes, such as high costs, topographical problems in installation of drilling rigs, restrictions caused by previous mining operation etc. The advances in artificial intelligence can help to solve these problems. In this research, we used python as one of the most pervasive and the most powerful programming languages in the field of data analysis and artificial intelligence. In this method mean shift algorithms have been used to cluster data, random forest to estimate clusters, and gradient boosting to estimate iron grade. Finally, in the studied area of Choghart in Central Iran, more than 91% accuracy was achieved in detection of ore blocks. Also, the results of the neural network indicate the mean square error (MSE) and mean absolute error (MAE) in the training data, respectively equal to 0.001 and 0.029, in the test data is 0.002 and 0.03, and in the validation boreholes, we reached a maximum of 0.06 and 0.2.