Shale porosity is a key petrophysical property that controls the production of hydrocarbons in shale reserves. Accurate determination of this parameter in such formations is challenging due to the complex pore structures, diverse mineral compositions, and high organic content, which complicate the establishment of a physical relationship between reservoir properties and logging data. This study addresses these challenges by developing machine learning models to estimate shale porosity logs using core and well-logging data. Three supervised machine learning algorithms were employed: support vector regressor, multilayer perceptron, and random forest with different ranges of data proportions. These models were evaluated using the correlation coefficient and root mean square error (RMSE) scores for both training and testing datasets. Among these, the random forest model demonstrated its effectiveness by combining predictions from multiple decision trees and handling nonlinear relationships within the input data. It required minimal preprocessing and parameter tuning, enabling accurate shale porosity predictions, with a high data correlation of 93.8 % and a low RMSE of 0.206. These results confirmed the model's suitability for managing limited and complex datasets. In contrast, the multilayer perceptron and support vector regressor were more sensitive to hyperparameter configurations and prone to overfitting. These limitations resulted in reduced accuracy and weaker correlation values compared to the random forest model. In addition, a randomization process was introduced during the training phase with an accurate data proportion, to assess the model's reliability and minimize overfitting. The results indicated that this process had no significant impact on data performance, confirming its effectiveness in ensuring data accuracy.