The accurate estimation of in situ stress tensor has an inevitable role in solving problems facing the development of oil and gas fields. Two components of three, vertical stress (๐ ๐ฃ ) and minimum horizontal stress (๐ โ ), could be computed through direct methods. The last and most challenging component, maximum horizontal stress (๐ ๐ป ), is commonly computed based on the elastic theory assumptions and shape of the borehole breakouts from well-logging data. Due to the abundance of borehole breakouts data, methods based on the shape of breakouts are highly valued. Field observations show that such breakouts commonly occur in the weak layers, which contradict elastic assumptions.Furthermore, finding the consistent relationship between the shape of the breakouts and loading conditions remains the main issue for such approaches. The process's initiation and development until stabilization have been simulated by borehole breakout modeling considering inelastic deformation. Machine learning algorithms have been implemented to ascertain the relationship between applied in situ stress and obtained borehole breakouts. In this paper, first using the finite element method and elastoplastic model, a set of in situ stress and their corresponding shape of borehole breakouts is obtained. Then, the data set is used to train four machine learning algorithms (XGBoost, LightGBM, CatBoost, and AdaBoost) to find the relationship between the in situ stress and the shape of breakouts. Finally, employing the inversed analysis to the trained algorithms, the in situ stress is estimated from the shape of breakouts. Even though, the numerical experiments show that all four algorithms are promising for predicting the in situ stress, the XGBoost algorithm indicates more accuracy than the others.