Yapeng Sun, Gang Shi, Yixun Zhang, Yingwei Zhao
To address sample imbalance, complex factor interactions, overfitting, and weak generalization in predicting the bearing capacity of cast-in-place piles for long-period (wave period >10 s) wave-exposed offshore wharves, this study proposes a hybrid particle swarm optimization-random forest (PSO-RF) method. Historical pile data are first balanced using alternating fuzzy C-means-synthetic minority oversampling technique (AFCM-SMOTE) to mitigate skewness, and a random forest model is then employed to capture the intricate couplings among soil, pile, material, and marine factors. Particle swarm optimization (PSO) incorporating a Cauchy perturbation term is used to globally tune the random forest parameters, thereby enhancing model adaptability and stability. Experimental results demonstrate that AFCM-SMOTE effectively reduces imbalance through physically meaningful clustering, raising the imbalance ratio from 0.19 to 0.94. Meanwhile, PSO avoids local optima and substantially improves parameter optimization. The proposed PSO-RF model achieves bearing capacity prediction errors within 0.1, outperforming a single RF by an order of magnitude, and maintains stable predictive performance on datasets with consistent geological and marine environmental conditions. This approach provides an efficient and robust solution for predicting pile capacity in complex marine engineering environments.