Skip to main content

HRV and salivary cortisol data in pregnant women


Lindsay, Karen (2022), HRV and salivary cortisol data in pregnant women, Dryad, Dataset,


Objective: To develop a machine learning algorithm utilizing heart rate variability (HRV) and salivary cortisol to detect the presence of acute stress among pregnant women that may be applied to future clinical research.

Methods: ECG signals and salivary cortisol were analyzed from 29 pregnant women as part of a crossover study involving a standardized acute psychological stress exposure and a control non-stress condition. A filter-based features selection method was used to identify the importance of different features [heart rate (HR), time- and frequency-domain HRV parameters and salivary cortisol] for stress assessment and reduce the computational complexity. Five machine learning algorithms were implemented to assess the presence of stress with and without salivary cortisol values.

Results: On graphical visualization, an obvious difference in heart rate (HR), HRV parameters and cortisol were evident among 17 participants between the two visits, which helped the stress assessment model to distinguish between stress and non-stress exposures with greater accuracy. Eight participants did not display a clear difference in HR and HRV parameters but displayed a large increase in cortisol following stress compared to the non-stress conditions. The remaining four participants did not demonstrate an obvious difference in any feature. Six out of nine features emerged from the feature selection method: cortisol, three time-domain HRV parameters, and two frequency-domain parameters. Cortisol was the strongest contributing feature, increasing the assessment accuracy by 10.3% on average across all five classifiers. The highest assessment accuracy achieved was 92.3%, and the highest average assessment accuracy was 76.5%.

Conclusion: Salivary cortisol contributed to a significant increase in accuracy of the assessment model compared to using a range of HRV parameters alone. Our machine learning model demonstrates acceptable accuracy in detection of acute stress among pregnant women when combining salivary cortisol with HR and HRV parameters.


ECG signals and salivary cortisol were collected from pregnant women at 28–32 weeks gestation over 2 study visits in a cross-over study design. Visit 1 was the control, non-stress visit (15-minute friendly conversation), and visit 2 used the standardized 15-minute Trier Social Stress Test (TSST) protocol to induce temporary psychosocial stress. On both visits, saliva samples were collected at the following intervals: baseline, 15-min (before task), 30-min (after task), 45-min, 60-min, 90-min, and 120-min. The ECG monitors (Actiheart) were placed before collecting the 15-min saliva sample and remained in place until after the last sample was collected.

All visits occurred in the morning from approximately 8:30 am–11:30 am. Salivary cortisol values were adjusted for time of awakening by computing the time interval in minutes from reported wake time until time of arrival at the research setting, regressing each cortisol value against this time interval at a given visit, and saving the standardized values. 

The Actiheart device provides Inter-beat Intervals (R-peak intervals) extracted from processed ECG signals. We used the 5-minute time windows of the Inter-beat Interval (IBI) signal to calculate the heart rate (HR, heartbeats per minute), time-domain parameters (i.e., RMSSD, AVNN, SDNN, and pNN50), and frequency-domain parameters (i.e., low frequency (LF), high frequency (HF), and LF/HF). The abnormal IBI and HRV values generated by motion artifacts were removed before proceeding with the analysis according to the removal criteria described in another study utilizing HRV measures (Cao et al., 2022, J Med Internet Res). The removal criteria are based on the normal range of HR and IBI values. 

Usage notes

Data provided in Excel.


Eunice Kennedy Shriver National Institute of Child Health and Human Development, Award: R00 HD096109