Assistive forces transmitted from wearable robots to the robot’s users are often defined by controllers that rely on the accurate estimation of the human posture. The compliant nature of the human–robot interface can negatively affect the robot’s ability to estimate the posture. In this article, we present a novel algorithm that uses machine learning to correct these errors in posture estimation. For that, we recorded motion capture data and robot performance data from a group of participants (n = 8; 4 females) who walked on a treadmill while wearing a wearable robot, the Myosuit. Participants walked on level ground at various gait speeds and levels of support from the Myosuit. We used optical motion capture data to measure the relative displacement between the person and the Myosuit. We then combined this data with data derived from the robot to train a model, using a grading boosting algorithm (XGBoost), that corrected for the mechanical compliance errors in posture estimation. For the Myosuit controller, we were particularly interested in the angle of the thigh segment. Using our algorithm, the estimated thigh segment’s angle RMS error was reduced from 6.3° (2.3°) to 2.5° (1.0°), mean (standard deviation). The average maximum error was reduced from 13.1° (4.9°) to 5.9° (2.1°). These improvements in posture estimation were observed for all of the considered assistance force levels and walking speeds. This suggests that ML-based algorithms provide a promising opportunity to be used in combination with wearable-robot sensors for an accurate user posture estimation.