Due to the sedentary life of people, back pain is a common problem in young individuals as well as for elderly persons. To prevent it, or reduce it, back stretch exercises are often prescribed by physicians, and an automated feedback system for these rehabilitative sessions can help individuals achieve their target more flexibly and efficiently. The current chapter proposes a machine-learning approach to classify different yoga exercises for back pain recovery using a Kinect sensor. In front of the sensor, subjects are asked to perform six back stretch exercises: Mermaid, seated, sumo, towel, wall, and Y. Features are then extracted based on the distance and angle between body joints from the skeletons generated by that sensor. Finally, the exercises are recognized through a hyperparameter-tuned random forest with 97.8% accuracy. The classifiers' effectiveness in classifying exercises is reliably assessed in real-time and outperforms its competitors in the related domain.