Generalisable machine learning models trained on heart rate variability data to predict mental fatigue

András Matuz, Dimitri van der Linden, Gergely Darnai, Árpád Csathó

Research output: Contribution to journalArticleAcademicpeer-review

6 Citations (Scopus)


A prolonged period of cognitive performance often leads to mental fatigue, a psychobiological state that increases the risk of injury and accidents. Previous studies have trained machine learning algorithms on Heart Rate Variability (HRV) data to detect fatigue in order to prevent its consequences. However, the results of these studies cannot be generalised because of various methodological issues including the use of only one type of cognitive task to induce fatigue which makes any predictions task-specific. In this study, we combined the datasets of three experiments each of which applied different cognitive tasks for fatigue induction and trained algorithms that detect fatigue and predict its severity. We also tested different time window lengths and compared algorithms trained on resting and task related data. We found that classification performance was best when the support vector classifier was trained on task related HRV calculated for a 5-min time window (AUC = 0.843, accuracy = 0.761). For the prediction of fatigue severity, CatBoost regression showed the best performance when trained on 3-min HRV data and self-reported measures (R2 = 0.248, RMSE = 17.058). These results indicate that both the detection and prediction of fatigue based on HRV are effective when machine learning models are trained on heterogeneous, multi-task datasets.
Original languageEnglish
Article number20023
JournalScientific Reports
Issue number1
Publication statusPublished - Dec 2022

Bibliographical note

Funding Information:
AC and AM were supported by National Research, Development and Innovation Office (NKFIH K120012). AM was supported by the ÚNKP-20-3-II-PTE-876 New National Excellence Program of the Ministry for Innovation and Technology from the source of the National Research, Development and Innovation Fund.

Publisher Copyright:
© 2022, The Author(s).

Research programs



Dive into the research topics of 'Generalisable machine learning models trained on heart rate variability data to predict mental fatigue'. Together they form a unique fingerprint.

Cite this