Establishing an accurate in situ stress field is important for analyzing the rock-mass stability of the underground cavern at the Huangdeng hydropower station in China. Because of the complexity and importance of the in situ stress field, existing back analysis methods do not provide the necessary accuracy or sufficiently recognize nonlinear relations between the distribution of the in situ stress field and its formative factors. Those factors are related to the geological structures of high compressive tectonic stress regimes, including geological faults and tuff interlayers. The new two-stage optimization algorithm proposed in this paper is a combination of stepwise regression (SR), difference evolution (DE), support vector machine (SVM), and numerical analysis techniques. Stepwise regression is used to find the set of unknown parameters that best match the modeling prediction and determine the range of parameters to be recognized. Difference evolution is used to determine the optimum parameters of the SVM. The SVM is used to create the DE-SVM nonlinear reflection model to obtain the optimal values of the parameters from measured stress data. We compare the new two-stage optimization algorithm to other two popular methods, a multiple linear regression (MLR) analysis method and an artificial neural network (ANN) method, to estimate the in situ stress field for the actual underground cavern at the Huangdeng hydropower station. The two-stage optimization algorithm produces a more realistic estimate of the stress distribution within the investigated area. Thus, this technique may have practical applications in realistic scenarios requiring efficient and accurate estimations of the in situ stress in a rock-mass.