An automated classification algorithm for the detection of expiratory ineffective efforts in patient-ventilator interaction is developed and validated. Using this algorithm, 5624 breaths from 23 patients in a pulmonary ward were examined. The participants (N = 23) underwent both conventional and non-invasive ventilation. Tracings of patient flow, pressure at the airway, and transdiaphragmatic pressure were manually labeled by an expert. Overall accuracy of 94.5% was achieved with sensitivity 58.7% and specificity 98.7%. The results demonstrate the viability of using pattern classification techniques to automatically detect the presence of asynchrony between a patient and their ventilator.