Knowledge of layer-to-layer variations of the least principal stress, S hmin, with depth is essential for optimization of multi-stage hydraulic fracturing in unconventional reservoirs. Utilizing a geomechanical model based on viscoelastic stress relaxation in relatively clay rich rocks, we present a new method for predicting continuous S hmin variations with depth. The method utilizes geophysical log data and S hmin measurements from routine diagnostic fracture injection tests (DFITs) at several depths for calibration. We consider a case study in the Wolfcamp formation in the Midland Basin, where both geophysical logs and values of S hmin from DFITs are available. We compute a continuous stress profile as a function of the well logs that fits all of the DFITs well. We utilized several machine learning technologies, such as bootstrap aggregation (or bagging), to improve the generalization of the model and demonstrate that the excellent fit between predicted and observed stress values is not the result of over-fitting the calibration points. The model is then validated by accurately predicting hold-out stress measurements from four wells within the study area and, without recalibration, accurately predicting stress as a function of depth in an offset pad about 6 miles away.