WMWilhelm Masarczyk

Wilhelm Masarczyk

*This is an algorithmically generated author record based on publicly available information.

Current Organizations / Institutes

The organizations/institutes from the scholar's latest article


Wilhelm Masarczyk has a total of 26 co-authors. Here are the top co-authors by number of shared publications:


Latest Publications

  • Open Access

    Deep learning approach for automatic assessment of schizophrenia and bipolar disorder in patients using R-R intervals

    by Kamil Książek, Wilhelm Masarczyk, Przemysław Głomb, Michał Romaszewski, Krisztián Buza, Przemysław Sekuła, Michał Cholewa, Katarzyna Kołodziej, Piotr Gorczyca, Magdalena Piegza

    Schizophrenia and bipolar disorder are severe mental illnesses that significantly impact quality of life. These disorders are associated with autonomic nervous system dysfunction, which can be assessed through heart activity analysis. Heart rate variability (HRV) has shown promise as a potential biomarker for diagnostic support and early screening of those conditions. This study aims to develop and evaluate an automated classification method for schizophrenia and bipolar disorder using short-duration electrocardiogram (ECG) signals recorded with a low-cost wearable device. We conducted classification experiments using machine learning techniques to analyze R-R interval windows extracted from short ECG recordings. The study included 60 participants—30 individuals diagnosed with schizophrenia or bipolar disorder and 30 control subjects. We evaluated multiple machine learning models, including Support Vector Machines, XGBoost, multilayer perceptrons, Gated Recurrent Units, and ensemble methods. Two time window lengths (about 1 and 5 minutes) were evaluated. Performance was assessed using 5-fold cross-validation and leave-one-out cross-validation, with hyperparameter optimization and patient-level classification based on individual window decisions. Our method achieved classification accuracy of 83% for the 5-fold cross-validation and 80% for the leave-one-out scenario. Despite the complexity of our scenario, which mirrors real-world clinical settings, the proposed approach yielded performance comparable to advanced diagnostic methods reported in the literature. The results highlight the potential of short-duration HRV analysis as a cost-effective and accessible tool for aiding in the diagnosis of schizophrenia and bipolar disorder. Our findings support the feasibility of using wearable ECG devices and machine learning-based classification for psychiatric screening, paving the way for further research and clinical applications.


  • Open Access

    Deep learning approach for automatic assessment of schizophrenia and bipolar disorder in patients using R-R intervals

    by Kamil Książek, Wilhelm Masarczyk, Przemysław Głomb, Michał Romaszewski, Krisztián Buza, Przemysław Sekuła, Michał Cholewa, Katarzyna Kołodziej, Piotr Gorczyca, Magdalena Piegza

    Schizophrenia and bipolar disorder are severe mental illnesses that significantly impact quality of life. These disorders are associated with autonomic nervous system dysfunction, which can be assessed through heart activity analysis. Heart rate variability (HRV) has shown promise as a potential biomarker for diagnostic support and early screening of those conditions. This study aims to develop and evaluate an automated classification method for schizophrenia and bipolar disorder using short-duration electrocardiogram (ECG) signals recorded with a low-cost wearable device. We conducted classification experiments using machine learning techniques to analyze R-R interval windows extracted from short ECG recordings. The study included 60 participants – 30 individuals diagnosed with schizophrenia or bipolar disorder and 30 control subjects. We evaluated multiple machine learning models, including Support Vector Machines, XGBoost, multilayer perceptrons, Gated Recurrent Units, and ensemble methods. Two time window lengths (about 1 and 5 minutes) were evaluated. Performance was assessed using 5-fold cross-validation and leave-one-out cross-validation, with hyperparameter optimization and patient-level classification based on individual window decisions. Our method achieved classification accuracy of 83% for the 5-fold cross-validation and 80% for the leave-one-out scenario. Despite the complexity of our scenario, which mirrors real-world clinical settings, the proposed approach yielded performance comparable to advanced diagnostic methods reported in the literature. The results highlight the potential of short-duration HRV analysis as a cost-effective and accessible tool for aiding in the diagnosis of schizophrenia and bipolar disorder. Our findings support the feasibility of using wearable ECG devices and machine learning-based classification for psychiatric screening, paving the way for further research and clinical applications. Author summary Mental health conditions such as schizophrenia and bipolar disorder can be challenging to diagnose, but early detection is crucial to better outcomes. In our study, we explored a simple but powerful idea: using heart rate variability (HRV), the natural fluctuations in time between heartbeats, as a potential indicator of these disorders. As HRV reflects the balance of the autonomic nervous system, research has shown that people with schizophrenia and bipolar disorder often have distinct HRV patterns, suggesting that heart activity analysis could support mental health screening. We tested whether a wearable heart monitor, similar to a fitness tracker, could help recognize these patterns using artificial intelligence. By analyzing heart activity records from 60 individuals, some with these conditions and others without, we trained several machine learning models to differentiate between them. Our approach successfully classified individuals with about 80% accuracy. Although not a replacement for clinical diagnosis, heart monitoring combined with artificial intelligence could help detect signs of mental illness, leading to faster interventions. Our work opens the door for further studies and, ultimately, the development of easy-to-use tools that could support doctors and improve patient care.


  • Assessment of symptom severity in psychotic disorder patients based on heart rate variability and accelerometer mobility data

    by Kamil Książek, Wilhelm Masarczyk, Przemysław Głomb, Michał Romaszewski, Iga Stokłosa, Piotr Ścisło, Paweł Dębski, Robert Pudlo, Krisztián Buza, Piotr Gorczyca, et al.


  • Open Access

    The analysis of heart rate variability and accelerometer mobility data in the assessment of symptom severity in psychotic disorder patients using a wearable Polar H10 sensor

    by Kamil Książek, Wilhelm Masarczyk, Przemysław Głomb, Michał Romaszewski, Iga Stokłosa, Piotr Ścisło, Paweł Dębski, Robert Pudlo, Krisztián Buza, Piotr Gorczyca, et al.

    Background and Objective Advancement in mental health care requires easily accessible diagnostic and treatment assessment tools. There is an ongoing search for biomarkers that would enable objectification and automatization of the diagnostic and treatment process dependent on a psychiatric interview. Current wearable technology and computational methods make it possible to incorporate heart rate variability (HRV), an indicator of autonomic nervous system functioning and a potential biomarker of disease severity in mental disorders, into accessible diagnostic and treatment assessment frameworks. Methods We used a commercially available electrocardiography (ECG) chest strap with a built-in accelerometer, i.e. Polar H10, to record R-R intervals and activity of 30 hospitalized schizophrenia or bipolar disorder patients and 30 control participants for 1.5-2 hours time periods. We performed an analysis to assess the relationship between HRV and the Positive and Negative Syndrome Scale (PANSS) test scores. The source code for the reproduction of all experiments is available on GitHub while the dataset is available in Zenodo. Results and Conclusions Mean HRV values were lower in the patient group and negatively correlated with the results of the PANSS general subcategory. For the control group, we also discovered the inversely proportional dependency between the mobility coefficient based on accelerometer data and HRV. This relationship was less pronounced for the patient group. This indicates that HRV and mobility may be promising markers in disease diagnosis.


  • Open Access

    Analysis of Factors Influencing Polish Students’ Opinions on Euthanasia

    by Iga Stokłosa, Maciej Stokłosa, Gniewko Więckiewicz, Mateusz Porwolik, Maciej Bugajski, Wilhelm Masarczyk, Tomasz Męcik-Kronenberg, Magdalena Piegza, Robert Pudlo, Piotr Gorczyca

    Due to the continuous development of palliative care and methods of pain relief in the last moments of patients’ lives, we are faced with the question of how long we should take measures to delay inevitable death for, without providing prolonged therapy against the patient’s will. For terminally ill and people experiencing unimaginable suffering, euthanasia is considered as one of the possible options for a dignified farewell. The aim of the study was to determine the views on euthanasia in a group of students from Polish universities. Questionnaire responses were analyzed for 9686 students (79.9% of women and 20.1% of men) aged 18–35 years. Respondents were asked to complete their own questionnaire on demographic data and attitudes toward euthanasia in the case of severe terminal illness or paralysis preventing independent living. Euthanasia was significantly more acceptable among women (85% vs. 75%, p < 0.0001; 69% vs. 62%, p < 0.0001) and non-believers [98% vs. 97% (denominations other than Christian), 84% (other forms of Christianity), 69% (Roman Catholic); p < 0.0001] in every case considered. Religious affiliation was the factor that most influenced attitudes toward euthanasia. Among the other elements influencing attitudes toward euthanasia, residence and field of study were distinguished. Considering the large sample size and specific conclusions, the article should be an important argument in the discussion on euthanasia.


  • Open Access

    Thermovision analysis of the surface of the lower limbs in patients with symptomatic lumbosacral discopathy before and after surgery

    by Monika Patrycja Wideł Patrycja Wideł, Wilhelm Masarczyk, Sławomir Grzegorczyn

    Introduction: The subject of the study is analyzing of the temperature distribution on the lower limbs in patients with discopathy of the lumbosacral spine requiring surgery. Aim: The answer to the question whether surgical treatment reduces temperature differences on the lower limbs of patients undergoing surgery. Material and methods: Thermograms of the lower limbs were performed before and on the second day after microdiscectomy or microdiscectomy with posterior lumbar interbody fusion. The study group consisted of 37 patients of the Neurosurgery Department, while the control group consisted of 18 healthy people. Comparative analyzes of temperatures on the lower limb with pain with the temperatures on the lower healthy limb in the same patient indicate significant statistical differences in temperature distribution. Based on the thermograms, two region of interest’s (ROI) of the same area were determined on the thigh and the lower leg. The maximum, minimum and average temperatures were determined for those areas. Results and discussion: Comparative analyzes showed statistically significant differences for both areas and all temperatures between healthy and affected limbs in the group of patients before surgery. In turn, after surgery, no statistically significant differences were observed between the respective limb temperatures for both ROI areas. The analysis of the temperature parameters determined for analogous ROIs in the control group did not show statistically significant differences for all measured temperatures. Conclusions: After selective surgical treatment of lumbar discopathy by microdiscectomy previous significantly statistical temperature differences between the lower limbs in analogical ROIs in those patients decreased to not statistically significant differences.