Machine learning’s integration into reliability analysis holds substantial potential to ensure infrastructure safety. Despite the merits of flexible tree structure and formulable expression, random forest (RF) and evolutionary polynomial regression (EPR) cannot contribute to reliability-based design due to absent uncertainty quantification (UQ), thus hampering broader applications. This study introduces quantile regression and variational inference (VI), tailored to RF and EPR for UQ, respectively, and explores their capability in identifying material indices. Specifically, quantile-based RF (QRF) quantifies uncertainty by weighting the distribution of observations in leaf nodes, while VI-based EPR (VIEPR) works by approximating the parametric posterior distribution of coefficients in polynomials. The compression index of clays is taken as an exemplar to develop models, which are compared in terms of accuracy and reliability, and also with deterministic counterparts. The results indicate that QRF outperforms VIEPR, exhibiting higher accuracy and confidence in UQ. In the regions of sparse data, predicted uncertainty becomes larger as errors increase, demonstrating the validity of UQ. The generalization ability of QRF is further verified on a new creep index database. The proposed uncertainty-incorporated modeling approaches are available under diverse preferences and possess significant prospects in broad scientific computing domains.