Background: Compensatory movements are commonly employed by stroke survivors during seated reaching and may have negative effects on their long-term recovery. Detecting compensation is useful for coaching the patient to reduce compensatory trunk movements and improving the motor function of the paretic arm. Sensor-based and camera-based systems have been developed to detect compensatory movements, but they still have some limitations, such as causing object obstructions, requiring complex setups and raising privacy concerns. To overcome these drawbacks, this paper proposes a compensatory movement detection system based on pressure distribution data and is unobtrusive, simple and practical. Machine learning algorithms were applied to classify compensatory movements automatically. Therefore, the purpose of this study was to develop and test a pressure distribution-based system for the automatic detection of compensation movements of stroke survivors using machine learning algorithms. Methods: Eight stroke survivors performed three types of reaching tasks (back-and-forth, side-to-side, and up-anddown reaching tasks) with both the healthy side and the affected side. The pressure distribution data were recorded, and five features were extracted for classification. The k-nearest neighbor (k-NN) and support vector machine (SVM) algorithms were applied to detect and categorize the compensatory movements. The surface electromyography (sEMG) signals of nine trunk muscles were acquired to provide a detailed description and explanation of compensatory movements. Results: Cross-validation yielded high classification accuracies (F1-score>0.95) for both the k-NN and SVM classifiers in detecting compensation movements during all the reaching tasks. In detail, an excellent performance was achieved in discriminating between compensation and noncompensation (NC) movements, with an average F1score of 0.993. For the multiclass classification of compensatory movement patterns, an average F1-score of 0.981 was achieved in recognizing the NC, trunk lean-forward (TLF), trunk rotation (TR) and shoulder elevation (SE) movements. Conclusions: Good classification performance in detecting and categorizing compensatory movements validated the feasibility of the proposed pressure distribution-based system. Reliable classification accuracy achieved by the machine learning algorithms indicated the potential to monitor compensation movements automatically by using the pressure distribution-based system when stroke survivors perform seated reaching tasks.