## 4 Two-Stage Method for Determining the Type of Human Breathing
### Discussion  
Research concerning determining the type of human breath has a relatively wide range of aims: from diagnosing diseases via human breathing to the measurement of respiratory rate and counting the number of inhalations per minute.  
The model developed by [PERSON] et al. (2016) can detect the thoracic type of breathing with a 95% accuracy using breathing belts. This exceeds the accuracy of our model, but this model only recognizes one type of breathing: thoracic (diaphragmatic). This severely limits its use, while the model we proposed in this study attempts to classify three types of breathing at once: thoracic, abdominal, and mixed.  
It must also be noted that, according to ([PERSON] et al., 2016), the model we developed uses sensors that cost significantly less than the competitive models. Another advantage of the proposed method is the required minimum free space: the proposed system requires only 3 square meters, while other motion capture systems require at least 10-20 square meters. While this limits the amount of data we analyze and so the accuracy of the model, it can be used in home environments, which is important for rehabilitation.  
**RQ1.** Can kinematic data taken from key points of the torso be used to determine the person's characteristic type of breathing with satisfactory accuracy for respiratory rehabilitation?  
One of the goals of this study was to determine the viability of developing a software system to determine the human breathing type based on the placement of three sensors fixed on the key points of the torso: the xiphoid process, the point on the back between the 9 th and 11 th thoracic vertebrae, and the point located above the navel. According to interviewed rehabilitation experts, at least three breathing cycles out of four must be correctly determined for effective rehabilitation. The best model trained in this study--a composite model of two hist gradient boosting classifiers--had an accuracy score of 0.81 for determining the breathing type, which meets the requirements (Table 8). We plan to research further possibilities of improving the quality of predictions using various machine learning models and expanding the dataset using additional EDA sensors, heart rate sensors, SpO2, a gyroscope, and an accelerometer. It is also planned to increase the dataset by gathering data from more people of various ages and genders.  
**RQ2.** What is the difference of frequency responses of the person's torso's marker movement for different types of breathing?  
According to the above diagrams in Figures 5-10, most volunteers breathed in the frequency range of 0.15-0.30 breaths per second during thoracic breathing. The most characteristic frequency was 0.2. The frequency range for abdominal breathing was 0.156-0.312 breaths per second. The frequency of breaths increased, but not significantly. The most characteristic frequency was 0.273. When using the mixed breathing type, most frequency values were 0.11-0.24 breaths per second. The predominant frequency became 0.156 breaths per second. We encountered many frequency groups common to all the breathing types, which made it difficult to determine the correct breathing type using spectral analysis. Therefore, we do not deem it viable to rely only on frequency characteristics in determining the type of human breathing. We plan to use frequency characteristics as additional model parameters in further work. We hypothesize that it can improve the accuracy of the model and make it easier to detect outliers.