[Objective] Geophysical data is often used to determine the elastic modulus of formations in oil and gas engineering, with experimental data from small sample cores used for calibration. However, acquiring core samples from every stratum is impractical, which often leads to this method's inadequate performance in complex geological settings. To improve the predictive accuracy and generalizability of rock elastic modulus, an intelligent prediction model based on fundamental rock physical properties has been introduced. [Methods] Using 397 sets of core experimental data from diverse sources, with compressional wave velocity and shear wave velocity and density as input variables, intelligent prediction models for rock elastic modulus were developed based on three ensemble learning algorithms (RandomForest, XGBoost, LightGBM), the TPE method was employed to optimize the models. The dynamic elastic modulus and static elastic modulus regression model was constructed according to the methods currently used in petroleum engineering was used to provide a comprehensive assessment of the performance of the intelligent predictive model using statistical indicators. Additionally, the SHAP method was utilized to assess the contribution of each input variable to the model. [Results]The research findings indicate that: (1) The ensemble learning model optimized using TPE is significantly better than traditional statistical regression models, and can achieve accurate prediction of elastic modulus without distinguishing geological layers, with strong generalization ability. Among them, the XGBoost model performs the best (R2=0.87, RMSE=6.94,MAE=4.96). (2) Shear wave velocity makes the greatest contribution to the model, followed by compressional wave velocity, with density having the least impact. Accurate shear wave velocity is crucial for predicting elastic modulus. [Conclusion] This method allows for the precise prediction of elastic modulus without the need for prior identification of the work area and strata, providing valuable insights for the design and implementation of oil and gas engineering projects.