Next Article in Journal
First Results of Pediatric Robotic Inguinal Hernia Repair with the Senhance® Surgical System: A Matched Cohort Study
Previous Article in Journal
Nurses’ Role in Obesity Management in Adults in Primary Healthcare Settings Worldwide: A Scoping Review
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Machine Learning and Wearable Technology: Monitoring Changes in Biomedical Signal Patterns during Pre-Migraine Nights

by
Viroslava Kapustynska
1,*,†,
Vytautas Abromavičius
1,†,
Artūras Serackis
1,
Šarūnas Paulikas
1,
Kristina Ryliškienė
2 and
Saulius Andruškevičius
2
1
Faculty of Electronics, Vilnius Gediminas Technical University, Plytinės st. 25, 10105 Vilnius, Lithuania
2
Center of Neurology, Vilnius University, Santariškių st. 2, 08406 Vilnius, Lithuania
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Healthcare 2024, 12(17), 1701; https://doi.org/10.3390/healthcare12171701
Submission received: 29 July 2024 / Revised: 19 August 2024 / Accepted: 23 August 2024 / Published: 26 August 2024

Abstract

:
Migraine is one of the most common neurological disorders, characterized by moderate-to-severe headache episodes. Autonomic nervous system (ANS) alterations can occur at phases of migraine attack. This study investigates patterns of ANS changes during the pre-ictal night of migraine, utilizing wearable biosensor technology in ten individuals. Various physiological, activity-based, and signal processing metrics were examined to train predictive models and understand the relationship between specific features and migraine occurrences. Data were filtered based on specified criteria for nocturnal sleep, and analysis frames ranging from 5 to 120 min were used to improve the diversity of the training sample and investigate the impact of analysis frame duration on feature significance and migraine prediction. Several models, including XGBoost (Extreme Gradient Boosting), HistGradientBoosting (Histogram-Based Gradient Boosting), Random Forest, SVM, and KNN, were trained on unbalanced data and using cost-sensitive learning with a 5:1 ratio. To evaluate the changes in features during pre-migraine nights and nights before migraine-free days, an analysis of variance (ANOVA) was performed. The results showed that the features of electrodermal activity, skin temperature, and accelerometer exhibited the highest F-statistic values and the most significant p-values in the 5 and 10 min frames, which makes them particularly useful for the early detection of migraines. The generalized prediction model using XGBoost and a 5 min analysis frame achieved 0.806 for accuracy, 0.638 for precision, 0.595 for recall, and 0.607 for F1-score. Despite identifying distinguishing features between pre-migraine and migraine-free nights, the performance of the current model suggests the need for further improvements for clinical application.

1. Introduction

Migraine is a complex neurovascular disorder that affects more than a billion people worldwide, making it one of the most prevalent neurological conditions globally [1]. The impact of migraine extends far beyond the physical pain it causes, negatively influencing several critical aspects of an individual’s life such as marriage, parenting, and family relationships, as well as career prospects, financial stability, and general health [2]. The unpredictable nature of migraine attacks is particularly distressing for sufferers, as highlighted in numerous studies [3,4,5,6]. Consequently, individuals suffering from migraines are three times more likely to develop generalized anxiety disorders compared to the general population.
The desire for better management and predictability of migraine attacks has been clearly expressed by those affected. A survey of 565 people concluded that 88.8% would like a device to predict migraine attacks, most preferring a wrist-worn option [7]. Almost all participants in another study [8] agreed that they would want information on when a migraine might occur. With the advent of personal health tools such as apps, smartphones, and wearable devices, it is now possible to capture objective and prospective data on a large scale. This development facilitates the collection of massive datasets that can be used to develop prediction models with less effort and cost, enabling studies at both the individual and population levels. The biomedical signals measured by wearable devices can provide valuable information on physiological changes, such as variations in skin temperature (SkinTEMP), pulse, and sleep quality, offering insights into changes that occur before the onset of migraines.
In this study, we used the newer Empatica Embrace Plus device [9], which offers enhanced features over the commonly used Empatica E4 [10,11,12,13]. Our focus is on understanding pre-migraine symptoms, which could lead to earlier interventions and better patient outcomes [14]. However, the reliability of triggers in predicting an attack varies between and within individuals, adding complexity to the development of prediction models [15].
According to the third edition of the International Classification of Headache Disorders (ICHD-3) [16], some patients experience various prodromal symptoms that can start up to two days before the onset of headache. In the PRODROME trial [17], scientists analyzed prodromal symptoms in 920 participants who stated that they could identify migraine attacks with prodromal symptoms reliably followed by headache and showed that treatment during the prodrome prevents the onset of moderate or severe headaches and reduces functional disability. Clarifying our understanding of pre-headache symptoms could improve our ability to study the underlying mechanisms of attack onset and may lead to earlier treatment during the prodrome, with the intention of shortening the prodrome, preventing headaches, and improving function. Given the complex nature of migraine attacks, more studies are required at the individual and population levels [14].
Studies have shown that changes in biomedical signals regulated by the autonomic nervous system (ANS) are significant in chronic diseases, including migraine [18]. Various signal processing techniques and machine learning models have been explored to predict migraines [19,20,21,22].
AI models have shown good results in the detection and classification of headache disorders, including migraine, using deep learning and ML techniques [23].
Among the relatively small number of studies focused on migraine prediction, we selected those that used monitoring through electronic journals [17,24], wearable sensors [8,10,11,12,13,25], finger-held peripheral capillary oxygen saturation devices (SpO2), and ECG patches [18]. These studies are notable for their data collection methods that involve migraine participants and their significant contributions to the development of migraine prediction models [12,18,25,26,27].
Researchers who have conducted studies on migraine prediction have identified specific biomedical signals that are considered particularly informative in the prediction of migraine episodes. For example, in their work in [18], the authors highlighted the importance of a multivariate analysis involving the HR, EDA, SkinTEMP, and SpO2 signals for the prediction of migraine.
To collect their data, the researchers used an SpO2 finger-sized device and affixed ECG patches. During their investigation, the authors of [18] observed that there was a lack of sufficiently useful models for migraine prediction, except in cases involving the combination of SkinTEMP, HR, and SpO2. In this combination, they found that four different models performed reasonably well in predicting migraine attacks in two participants with migraine. However, the prediction accuracy using the combination of SkinTEMP, EDA, HR, and SpO2 exhibited a relatively high false positive rate (FPR) in their investigation.
In the study in [25], the authors included eight participants with episodic migraine and recorded real-time hemodynamic signals, including TEMP, HR, and EDA, obtained from a wrist-wearable device for 24 h. Personalized prediction models were generated using artificial recurrent neural networks, such as long short-term memory (LSTM), to compute on a one-minute basis if pain would appear in the next 120 min. Data were balanced in pain–no-pain time periods to train the models. The algorithm was able to predict migraine attacks with a sensitivity of 95% throughout the sample.
The study in [12] used the Empatica E4 wristband to collect data from seven volunteers with different types of migraine. What distinguishes this research from previous studies is its exclusive focus on data collected during sleep periods. The authors chose this approach based on findings from a prior study [13], which highlighted the impact of physical activity on heart rate (HR).
The fundamental hypothesis of the study in [12] posits that focusing on the signals acquired during sleep allows a rough estimate of the probability that a migraine attack occurs the following day. To test this hypothesis, sleep data were classified into two classes: (1) nights preceding a day without a migraine, and (2) nights preceding days with a migraine. Consequently, class (2) contained information related to the prodromal stage of a migraine attack. The features used in the analysis included accelerometers (Accs), blood volume pulse (BVP), TEMP, EDA, RR, and pulse rate variability (PRV).
In a study, quadratic discriminant analysis (QDA) and linear discriminant analysis (LDA) were compared, and the authors found that QDA produces better results than LDA (84.1% vs. 70.2% in personal recognition models). The authors of [12] also tested user-independent recognition models, but found that they could not detect migraine attacks, the balanced recognition accuracy was below 50%. To gain a better understanding of how well a user-independent model can detect migraine attacks in advance, data should be collected from much larger user groups, or the study should focus only on one type of migraine attack [12].
The body of research that confirms changes in biomedical signals during migraine episodes, together with the presence of observable prodromal symptoms in some individuals before the onset of a migraine, coupled with intriguing findings from other studies in the field of migraine prediction, strongly suggests the potential for abnormalities in biomedical signals during the prodromal phase. This hypothesis has driven our investigation, where we leveraged the expertise of colleagues who have conducted similar research on migraine using modern analytical tools and technologies.
The main contributions of this paper are outlined as follows:
  • A comprehensive investigation into the application of wearable technology in conjunction with machine learning models to predict migraine attacks by analyzing physiological signals collected during nocturnal sleep.
  • A detailed examination of the effectiveness of various analysis frames in predicting migraine attacks, highlighting the most suitable time frames for accurate predictions.
  • The identification of key physiological features with the highest predictive power for detecting abnormalities that precede migraine onset, providing valuable insights into the early detection of migraines.
  • Establishing a foundation for future research by emphasizing the importance of traditional statistical metrics in feature extraction and suggesting the integration of physiological data collected over the investigated periods to improve prediction models.

2. Methods

Inspiration for this investigation was drawn from the study in [12], leading to the decision to conduct a similar investigation using biomedical signals from nocturnal sleep periods. Consequently, a labeling approach was adopted for nights based on participants’ migraine diaries, where nights preceding a day without migraines were designated as (0) and pre-migraine nights as (1); nights after a day with migraine were labeled as (2) and excluded from the investigation due to possible abnormalities. These labels were used as output in the developed ML model. The input comprised 78 features, extracted from six signals measured by the Empatica Embrace Plus wristband. A general workflow diagram of the research process is shown in Figure 1.
An important aspect of this research involved the implementation of precise criteria to define nocturnal sleep data and fit them into frames of 5, 10, 30, 60, 90, and 120 min for analysis. We used this method to expand the dataset and explore how the duration of the analysis frame impacted the precision of migraine prediction.
In the study, specific criteria were established to define nocturnal sleep data. These criteria were based on the time interval between 7 p.m. and 8 a.m., and values of the sleep detection stage (SDS) measured by Empatica Embrace Plus, which help identify different phases of sleep and limit night movements to no more than 20 steps, and require the SDS value to be exactly 101, which strictly indicates sleeping.
After identifying the nocturnal sleep data, they were subdivided into analysis frames, upon which feature extraction was subsequently performed. This approach was essential for the operation of the developed framework and the sleep-based ML model.

2.1. Empatica Embrace Plus Wristband

The Empatica Embrace Plus [9] enables extended data collection of up to 14 days due to its long battery life and increased NOR flash memory, with rapid 90 min charging for longer monitoring cycles, essential to our study.
Featuring multiple sensors, including a 3D accelerometer, gyroscope, PPG sensor (up to 64 Hz), TEMP sensor (1 Hz), and EDA sensor (up to 4 Hz), the device provides access to raw data, digital biomarkers, and reports via the Empatica Health Monitoring Platform.
Embrace Plus offers four configurations: Pulse Rate Pro, SpO2 Pro, Actigraphy Pro, and Actigraphy Optimized. Its algorithms derive digital biomarkers from raw sensor data, such as RMSSD for PRV, respiratory rate from PPG and Acc data, and continuous monitoring of SpO2.
Additional algorithms include those for SDS, activity count (ACT), activity classification, body position, and MET, using the 3-axis accelerometer; along with gait speed, skin conductance level, and continuous SkinTEMP estimation from EDA sensors. These biomarkers capture vital physiological data, although SpO2 is not included in our professional plan.
In reviewing Empatica Embrace Plus, we focus on the precision of its HR algorithm during the daytime that was questioned in the study [13,25]. The developers [28] reported that, under no motion conditions, the error of the PR algorithm is less than 3 bpm, and under typical daily activities, less than 5 bpm, both within clinically acceptable ranges. Although our study uses primarily nocturnal sleep data, these findings support the reliability of using PR data from daytime activity for further research.
In this study, digital biomarkers obtained from the device were utilized, providing insight into various physiological parameters. The signals used, their physical significance, and units of measurement are described in the following.
  • Pulse rate (PR): Continuous monitoring of the participant’s heart rate, measured in beats per minute (bpm).
  • Pulse rate variability—RMSSD: Intermittent monitoring of pulse rate variability, expressed as the root-mean-square of successive differences between consecutive systolic peaks, measured in milliseconds (ms).
  • Respiratory rate (RR): Intermittent monitoring of the participant’s breathing rate, measured in breaths per minute (brpm).
  • Sleep detection: Automatic detection of sleep periods based on physical activity data.
  • Activity count: Continuous estimation of movement intensity, measured in arbitrary units (a.U.).
  • Accelerometer magnitude standard deviation: Average standard deviation of Acc data magnitude, measured in g (gravitational force).
  • Step count: Continuous monitoring of step count, measured in steps.
  • Metabolic equivalent of task (MET): Continuous estimation of energy consumption during physical activity, measured in MET.
  • Electrodermal activity (EDA): Continuous monitoring of the participant’s skin conductance level, measured in microsiemens ( μ siemens).
  • Wearing detection: Detection of device wearing status, expressed as the proportion of time the device is worn versus not worn, measured in percentage (%).

2.2. Participants

In this study, ten migraine sufferers were enrolled according to specific inclusion criteria to assess the applicability of wearable biosensor technology to predict migraine attacks by monitoring changes in ANS during the prodrome phase. Participants were instructed to wear the device on the wrist of their non-dominant hand and continue using it until the occurrence of at least three migraine episodes was recorded. The demographic information and the number of monitoring days for each participant are shown in Table 1.
To minimize external impacts on changes in the autonomic nervous system for the most precise analysis possible, and to avoid bioethical concerns, subjects were included according to the following inclusion and exclusion criteria.

2.2.1. Inclusion Criteria

  • Age ≥ 18 years;
  • Diagnosis of episodic migraine with/without aura, meeting ICHD-3 (3rd International Classification of Headache Disorders) criteria;
  • Frequency of at least 4 migraine attacks per month;
  • Ability to write, read, and understand the Lithuanian language;
  • Ability to understand and perform all procedures defined in the study protocol.

2.2.2. Exclusion Criteria

  • Pregnant and lactating women;
  • Diagnosis of chronic and/or hemiplegic migraine;
  • Diagnosis of other headache syndrome, except for episodic tension-type headache whose frequency does not exceed 4 days per month;
  • Use of preventive migraine treatment;
  • Use of drugs with an effect on the ANS: antidepressants, cholinergic and anticholinergic drugs, antipsychotics, antihistamines, antihypertensives, antiepileptic drugs, opioids, benzodiazepines, antiparkinsonian drugs, antispasmodics, antiemetics, muscle relaxants;
  • Other diagnosis of chronic pain.

2.3. Data Pre-Processing

During the pre-processing stage of the study data, the objective was to develop individual datasets for migraine prediction models for each participant. The digital biomarkers, systematically organized into daily folders containing 14 files corresponding to different signals in the cloud, were merged into a single comprehensive file per participant.
Table 2 shows that PRV and RR signals were excluded from the research due to their high proportion of missing values. This pattern of a high percentage of missing data in the PRV and RR signals was consistently observed across all participants’ data.
The data pre-processing involved removing missing values to ensure that the data were reliable and complete. Data were normalized according to the formula
Normalized Signal = Signal min ( Signal ) max ( Signal ) min ( Signal ) .
To eliminate non-informative values in the PR signal resulting from issues such as poor device attachment, the values were clipped to predefined thresholds of 25 to 115 bpm (Figure 2).
The features were extracted using statistical measures described in the section Feature Extraction. As mentioned above and in Figure 1, each night was labeled 0, 1, or 2. Several classifiers were used: Random Forest (100 estimators, Gini criterion), HistGradientBoosting (learning rate 0.1, max depth 3, min samples leaf 20), XGBoost (learning rate 0.1, 100 estimators, max depth 3, mlogloss metric), support vector machine (SVM) algorithm (C = 1.0, RBF kernel, scale gamma), and k-nearest neighbors algorithm (KNN) (5 neighbors, uniform weights, Minkowski metric). The SVM algorithm classifies the extracted features by identifying the optimal hyperplane that maximizes the margin between migraine and non-migraine classes in our provided feature space, as used for similar classification tasks [29]. In contrast, XGBoost, a gradient boosting algorithm, iteratively updates decision trees, optimizes accuracy by reducing prediction errors, and effectively captures complex patterns within the data [30].
Stratified five-fold cross-validation ensured robust evaluation, calculating accuracy, precision, recall, and F1-score. This approach involves dividing the dataset into five equal parts, with each part serving as a test set once and as part of the training set four times. This cycling ensures that each data segment is used for both training and testing [31].
Given the dataset imbalance, random under-sampling was applied as a part of the research process to achieve a 5:1 ratio using random under-sampling, and recall metrics that were received were compared while using unbalanced data.
An ANOVA variance analysis, which is widely used in medical studies [32,33,34], was performed to compare the characteristics between nights labeled 0 and 1. The classifiers were trained and evaluated based on F1-scores for different analysis frames, with the best classifiers summarized in the results tables.

3. Feature Extraction

The feature extraction phase was dedicated to data preparation for subsequent analysis and ML applications, which involves extraction of features from biomedical signals, including EDA, PR, Acc, MET, SkinTEMP, and ACT.
As mentioned above, nocturnal sleep was divided into analysis frames to indicate the duration of the analysis frame that was most suitable for the prediction of migraine attacks. For each of these analysis intervals, a set of features was extracted, including the following.
  • Mean: The average level of the signal.
  • Median: The central tendency of the data.
  • Std: The degree of data variability relative to the mean.
  • Max: The highest recorded value.
  • Min: The lowest recorded value.
  • Clearance factor: Reflects the maximum clearance in the data.
  • Crest factor: Provides information on signal peaks.
  • Impulse factor: Indicates abrupt changes in the signal.
  • Kurtosis: Measures the distribution’s sharpness or flatness.
  • Peak value: The highest peak in the data.
  • RMS (root mean square): Magnitude of the signal.
  • Shape factor: Provides insights into the shape of the signal.
  • Skewness: Measures the symmetry or asymmetry of the data distribution.
These features were calculated using formulas from [35]. Time-domain features such as mean, median, Std, min, and max are used in similar research using wearables, for example, stress detection using Empatica E4 [36] and migraine forecast [12,37]. Other time-domain features, such as clearance factor, crest factor, impulse factor, peak value, kurtosis, RMS, shape factor, and skewness are successfully implemented in other domains [38,39]. The latter features are considered more explicable, but are not commonly used in data obtained from wearables [40,41]. This approach facilitated an exploration of the relationship between these features and migraine occurrences, providing insight into the predictive patterns of migraines.
In the learning process, the input is made up of 78 features, including 13 previously specified features for each of the six unique signals. These features are important ground for the development of classifiers, which involves training and evaluating a variety of ML models. The result of this method is a night-labeling system.

4. Results

4.1. Feature Ranking and Analysis

In the analysis performed, a variety of physiological, activity, and signal processing measurements were evaluated to determine their relative importance in predicting migraines. ANOVA feature ranking was used to evaluate the impact of the features on the prediction results. The recurrence of the signal source for the subset of features is shown in Table 3. The recurrence of features, independent of the signal source, is shown in Table 4.
Table 3 presents the recurrence results for each signal as a source within the subset of features ranked. From the initial set of 78 features, the 35 most significant were selected using analysis of variance (ANOVA), allowing us to identify the characteristics that have the most substantial impact on the predictive model. The PR and SkinTEMP signals showed the highest frequency of recurrence, highlighting their significant contribution to the overall set of features. In contrast, signals such as ACT and Acc appeared less frequently, indicating their relatively lower influence on the predictive model.
The analysis of the rank of characteristics, as illustrated in Table 4, provides information on how to predict migraine. Features such as median and min were frequently selected for a feature subset, independent of the signal source. In contrast, features such as skewness and kurtosis were less important, indicating that the shape of the data distribution might play a minor role in the prediction of migraine.

4.2. Classifier Performance Analysis

To evaluate the migraine prediction model, key metrics including accuracy, F1-score, precision, and recall were used. The analysis focused on different analysis frames, with the objective of identifying the best-performing classifier for each interval based on these metrics.
To define the most suitable classifier for each length of analysis frame, an experiment was conducted training XGBoost, HistGradientBoosting, Random Forest, SVM, and KNN models. Following this, the best ML model was chosen from the list above for each analysis frame based on the highest F1-score.
Random Forest shows strong and consistent performance across multiple participants and analysis frames. XGBoost also performs well, particularly in shorter analysis frames. HistGradientBoosting is another strong contender, particularly in medium to longer analysis frames.
Performance metrics vary significantly between participants. This could be due to individual differences in physiological signals or different levels of data quality and quantity. For some participants, a specific classifier consistently performs better, while for others, the best classifier changes with the duration of the analysis frame.
Shorter analysis frames tend to produce higher F1-scores and recall for most participants, as shown in Table 5 and Table 6. This is likely because shorter frames can capture more granular changes in physiological signals. The medium analysis frames show balanced performance, as demonstrated in Table 7 and Table 8, with some drop in F1-score and recall compared to shorter frames, but they are still useful. Longer analysis frames generally result in lower performance metrics; see Table 9 and Table 10. The ability to detect differences between migraine and non-migraine days diminishes with longer frames.
The 5 and 10 min frames are generally the best for achieving high F1-scores and recall. These shorter frames capture more detailed variations in the data, which is important for detecting the onset of migraines.

4.3. Rationale for Implementing Cost-Sensitive Learning in Classifier Training

Classification methods based on feature-level and sensitive cost functions are widely used to deal with problems related to unbalanced datasets [42]. In this context, the decision to implement cost-sensitive learning with a ratio of 5:1 in classifier training was based on the unbalanced nature of the dataset. The results shown in the previous section in Table 5, Table 6, Table 7, Table 8, Table 9 and Table 10 were derived from training of ML models on unbalanced data.
The cost ratio was experimentally deduced to find a balance between sensitivity and specificity and to avoid model overfitting. For the first participant, there were more migraine samples than non-migraine samples, while for all other participants it was the reverse, with fewer migraine samples. The goal of using cost-sensitive learning was to enhance the sensitivity of the predictive model to migraine samples, with the aim of improving the model’s precision in identifying migraine cases.

4.4. Comparative Analysis of Classifier Learning with Cost-Sensitive Approach

Cost-sensitive learning was introduced in classifier training to achieve a ratio of 5:1. The results of the recall metrics of classifiers trained with cost-sensitive learning and unbalanced data are shown in Figure A1.
The application of cost-sensitive learning in classifier training generally led to an improvement in recall for participants who initially had lower recall metrics with unbalanced data. For example, participants 1, 3, and 10 showed increases in recall in various analysis frames, indicating that cost-sensitive learning effectively improved the model’s ability to identify migraine instances. However, some participants, such as 2 and 8, experienced a decrease in recall in most analysis frames, suggesting a potential trade-off when applying this approach. For others, such as participants 5 and 9, the recall metrics remained largely unchanged, indicating that the effect of cost-sensitive learning can be participant-specific. These variations in recall performance could be attributed to inherent differences in individual physiological responses and the complexity of their data patterns. In general, the cost-sensitive approach appears to benefit those with initially lower recall, highlighting its utility in improving migraine detection in unbalanced datasets.

4.5. ANOVA Feature Analysis: Comparison of Pre-Migraine Night with Night before a Migraine-Free Day

To evaluate the analysis of various features during the pre-migraine night and the night before a migraine-free day, an analysis of variance (ANOVA) was performed [43]. Based on the results of ANOVA, heat maps were generated showing the F-statistic and the p-value for each signal feature, as shown in Figure 3, Figure 4, Figure 5, Figure 6, Figure 7, Figure 8, Figure 9, Figure 10, Figure 11, Figure 12, Figure 13 and Figure 14.
The F-statistic measures the ratio of the variability between the group means to the variability within the groups. A higher F-statistic indicates that the group means are significantly different from each other relative to the variability within the groups. In this context, it helps determine whether there are significant differences in the feature values between nights marked with 0 and those with 1. The F-statistic in ANOVA is calculated as
F = MS between MS within ,
where
MS between = SS between df between ,
MS within = SS within df within .
SS between (sum of squares between groups) is the variability due to the interaction between the groups. SS within (sum of squares within groups) is the variability within each group. df between and df within are the degrees of freedom between and within groups, respectively. These formulas were derived and used according to the principles outlined in [44,45].
The p-value indicates the probability that the observed differences between the group means occur by chance. A lower p-value suggests that the differences between the groups are statistically significant. In this study, it helps confirm whether the features vary significantly between the two types of nights.
The p-value is calculated on the basis of the F-distribution:
p - value = P ( F observed F ) .
This is the probability that the observed F-statistic would be as extreme as or more extreme than what was actually observed under the null hypothesis.
The ANOVA F-statistic and p-value heat maps (Figure 3 and Figure 4) for the EDA features indicate that the shorter analysis frames of 5 and 10 min exhibit higher F-statistic values and significant p-values (less than 0.05) for several features such as mean, median, max, min, peak value, and RMS. This suggests that these features are significantly different when comparing pre-migraine nights to migraine-free nights within these shorter time frames. As the analysis frame length increases to 30 min, 60 min, 90 min, and 120 min, the F-statistic values decrease, and p-values rise above the significance threshold, indicating a reduced variance and less significant differences.
Similarly, for PR features, the F-statistic values are higher, and p-values are significant for shorter analysis frames of 5 and 10 min, particularly for features such as the clearance factor and the shape factor. This trend diminishes with longer analysis frames, where the F-statistic values drop and p-values become non-significant, highlighting that shorter frames are more effective for capturing significant variations in PR related to migraines.
For SkinTEMP features, the ANOVA results in Figure 7 and Figure 8 show significant F-statistic values and low p-values for shorter frames, indicating notable differences in features such as mean, median, Std, max, min, clearance factor, crest factor, impulse factor, peak value, and RMS during pre-migraine nights compared to migraine-free nights. As the frame lengthens, the significance of these differences reduces, as evidenced by lower F-statistic values and higher p-values.
MET features also display higher F-statistic values and significant p-values for shorter frames, with features such as mean, median, min, clearance factor, crest factor, impulse factor, and shape factor showing notable differences. Longer frames see a decline in both the F-statistic values and the significance of the p-values, suggesting that the predictive power of these features decreases over longer periods.
For ACT features, shorter analysis frames again show higher F-statistic values and significant p-values for features like mean, median, Std, max, min, peak value, and RMS. This trend aligns with previous observations, where longer analysis frames lead to a reduction in significance and variance, indicating that shorter frames are more suitable for capturing relevant differences.
The ANOVA results for the Acc features, as shown in Figure 13 and Figure 14, further reinforce the pattern, with higher F-statistic values and significant p-values for shorter frames of 5 and 10 min, particularly for features such as mean, median, Std, max, min, peak value, and RMS. As the analysis frames extend to 30 min, 60 min, 90 min, and 120 min, the statistical significance wanes, as reflected by lower F-statistic values and higher p-values.
The ANOVA analysis clearly indicates that shorter analysis frames of 5 and 10 min are more effective in capturing significant variations in physiological features between pre-migraine nights and migraine-free nights. These shorter frames exhibit higher F-statistic values and significant p-values for various characteristics, suggesting that they contain more relevant information for the prediction of migraines. As the analysis frame length increases, the significance of the differences diminishes, pointing towards a reduced predictive power over longer periods. This insight is important for developing effective migraine prediction models, emphasizing the importance of selecting appropriate analysis frame lengths to maximize predictive accuracy and clinical relevance.
EDA, SkinTEMP, and Acc features show the highest F-statistic values and the most significant p-values in the 5 and 10 min frames, making them particularly useful for early detection of migraines. MET and ACT features also show significant differences, especially in the 5 and 30 min frames, further indicating their potential utility in migraine prediction. These findings suggest that shorter analysis frames are generally more effective, and specific signals such as EDA, SkinTEMP, and Acc data are particularly valuable for accurate and timely migraine prediction.

4.6. Generalized Model for Predicting Migraines

The final stage of the study involved the training of ML models on data from the ten participants using cost-sensitive learning with a ratio of 5:1 to evaluate the significance of performance metrics. Among all the models evaluated, XGBoost demonstrated the best performance for the generalized model in terms of F1-score across all analysis frames, highlighting its robustness and effectiveness in predicting migraines regardless of the duration of the analysis frame, as shown in Table 11.
However, the clinical implications of these metrics, particularly recall, warrant careful consideration. Although XGBoost consistently provided the best F1-scores, the recall values indicate significant limitations in the model’s sensitivity, especially for longer analysis frames. Shorter analysis frames of 5 and 10 min offer relatively better performance, but still show a need for improvement in recall to ensure clinically effective migraine prediction.
These results suggest that the current generalized model, while robust in certain metrics, may not be sufficiently sensitive for clinical application, as it risks failing to detect a substantial number of true migraine events. Consequently, there is a pressing need to enhance the model’s sensitivity and ability to distinguish between migraine and non-migraine events. This could involve incorporating additional features, further optimizing the model, or integrating it with other predictive methods to improve its overall effectiveness in a clinical setting.

5. Discussion

The primary objective of this study was to explore the impact of the duration of the analysis frame and specific features on migraine prediction using wearable biosensor data. By investigating various physiological, activity-based, and signal processing metrics, we identified effective classifiers for different analysis intervals. Focusing on pre-migraine nights was crucial for understanding the patterns preceding migraine attacks while minimizing the confounding effects of physical activity on biomarkers.
Our results demonstrated that shorter analysis frames, specifically 5 and 10 min, yielded higher F1-scores and recall metrics among various participants. This finding suggests that these shorter frames are more effective in capturing the subtle physiological changes that precede migraine attacks. However, the study also highlighted the importance of balancing sensitivity and specificity, particularly in the context of migraine detection, where false positives and false negatives have distinct implications for patient care.
The use of cost-sensitive learning with a 5:1 ratio was a key strategy to address the unbalanced nature of the dataset. This approach improved recall metrics for several participants, enhancing the model’s ability to detect migraine instances. However, the effectiveness of this method varied among the participants, indicating the need for personalized approaches in the training of the classifier.
Feature extraction played an important role in this study and traditional statistical metrics such as minimum and median values proved to be more predictive than unconventional features. This emphasizes the importance of using a comprehensive range of features to build robust predictive models. Furthermore, the integration of frequently updated raw data during the prodromal phase was found to be beneficial in capturing the significant effects of daily activities on physiological parameters, thus improving the predictive power of the model.
Compared to the reviewed studies, our results align with those found by [18], which highlighted the importance of a multivariate analysis that involves the HR, EDA, SkinTEMP, and SpO2 signals for the prediction of migraine. They found that combining these signals improved prediction accuracy, although with a relatively high false positive rate. Our research further supports these findings by confirming that the EDA, SkinTEMP, and Acc data are significant predictors, especially when analyzed in shorter time frames.
Furthermore, the researchers in [25] demonstrated the effectiveness of personalized prediction models using hemodynamic signals, including TEMP, HR, and EDA, obtained from a wrist wearable device. They achieved a sensitivity of 95% in predicting migraine attacks with LSTM models. Our study supports the use of similar physiological signals and emphasizes the utility of shorter analysis frames to improve predictive accuracy. However, it is important to note that [25] trained their data with pain–no-pain balancing, which can lead to pseudo-high predictive accuracy. Thus, finding the best balancing approach and testing it on separate datasets is crucial. We consider investigating LSTM with other balancing methods.
The methodology of the study, including the exclusion of high-missing-value signals such as PRV and RR, and the application of normalization, ensured the reliability of the processed data. The decision to focus on nocturnal sleep data, segmented into various analysis frames, provided a robust framework for feature extraction and model training.

6. Research Limitations

Despite the promising results, several limitations must be acknowledged. First, the absence of a control group without migraines limits the generalizability of the findings. The study design relied on baseline data from nights before migraine-free days, which may not fully represent the variability in physiological signals among the general population.
Second, the sample size of ten participants, while sufficient for preliminary analysis, is relatively small to develop generalized predictive models. Future research should involve a larger and more diverse participant pool to enhance the robustness and applicability of the models.
Third, the study did not incorporate other potential migraine triggers, such as meteorological conditions, space weather, or menstrual cycles, which could influence the accuracy of the predictive models. Including these factors in future research could provide a more comprehensive understanding of migraine triggers and improve the accuracy of prediction.
Lastly, while the study focused on nocturnal sleep data, the possible impact of daytime activities and stress levels on physiological signals was not explored. Future studies should consider incorporating data from both daytime and nighttime periods to develop more holistic predictive models.
Furthermore, the study examined a limited set of ML algorithms, specifically XGBoost, HistGradientBoosting, Random Forest, SVM, and KNN. Research is constrained by this selection, and exploring a wider range of classifiers, including newer and more sophisticated algorithms, is necessary to fully understand the potential for accurate migraine prediction. Future studies should investigate other classifiers to provide a more comprehensive evaluation of different modeling approaches and their effectiveness in predicting migraines.

7. Conclusions

This study has demonstrated the potential of using wearable biosensor technology and ML models to predict migraine attacks by analyzing physiological signals during nocturnal sleep periods. The findings highlight the importance of shorter analysis frames (5 and 10 min) in capturing pre-migraine abnormalities, with features such as EDA, SkinTEMP, and Acc data showing the highest predictive power.
Although the use of cost-sensitive learning improved the recall metrics for several participants, the variability in effectiveness underscores the need for personalized approaches in classifier training. The study’s emphasis on traditional statistical metrics for feature extraction provides a solid foundation for future research in this area.
To enhance the clinical applicability of migraine prediction models, future studies should involve a larger and more diverse group of participants, incorporate additional migraine triggers, and explore the integration of physiological data during the day and at night. The development of adaptive self-learning models that account for individual variability and external factors holds promise for more personalized and effective migraine management strategies.
In conclusion, the integration of wearable technology and ML offers a promising pathway toward early detection and prevention of migraine attacks. Continued research and refinement of predictive models are essential to realize the full potential of this approach in clinical settings, ultimately improving the quality of life of individuals affected by migraines and other neurological conditions.
Future work should focus on expanding the pool of participants to improve the generalizability of predictive models and incorporate a wider range of migraine triggers, such as meteorological conditions and menstrual cycles. Furthermore, future studies should explore both daytime and nighttime physiological data, as well as a wider array of machine learning algorithms, to develop more robust and accurate migraine prediction models.

Author Contributions

Conceptualization: all authors; methodology: V.K., V.A. and A.S.; software: V.K. and V.A.; validation: V.K. and V.A.; investigation: V.K., V.A. and A.S.; resources: Š.P., A.S., S.A. and K.R.; data curation: S.A., V.K. and V.A.; writing—original draft preparation: V.K. and V.A.; writing—review and editing: all authors; visualization: V.K. and V.A.; supervision: A.S., V.A., Š.P. and K.R.; project administration: Š.P. and A.S.; funding acquisition: all authors. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

The study was conducted in accordance with the Declaration of Helsinki, and the protocol was approved by the Ethics Committee of Vilnius University Hospital Santaros Klinikos (No. 2024/4-1569-1041) on 9 April 2024.

Informed Consent Statement

Written confirmation has been obtained from all participants whose data are included in this study; they consent to the use of their medical information for scientific purposes.

Data Availability Statement

The datasets presented in this article are not available, the data are part of an ongoing study.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
AccAccelerometer
ACTActivity count
AIArtificial intelligence
ANSAutonomic nervous system
bpmBats per minute
ECGElectrocardiogram
EDAElectrodermal activity
HRHeart rate
METMetabolic equivalent of task
MLMachine learning
NaNNot a number
PPGPhotoplethysmography
PRPulse rate
PRVPulse rate variability
RMSSDRoot mean square of successive differences
RRRespiratory rate
SCStep count
SDSSleep detection stage
SkinTEMPSkin temperature
SpO2Peripheral capillary oxygen saturation
TEMP        Temperature

Appendix A. Extended Data Visualization

This appendix provides extended data visualizations relating to the analysis presented in the main body of the paper. These visualizations offer a more in-depth view of the results.
Figure A1. Comparison of recall for each participant before and after applying cost-sensitive learning: (a) 5 min analysis frame; (b) 10 min analysis frame; (c) 30 min analysis frame; (d) 60 min analysis frame; (e) 90 min analysis frame; (f) 120 min analysis frame.
Figure A1. Comparison of recall for each participant before and after applying cost-sensitive learning: (a) 5 min analysis frame; (b) 10 min analysis frame; (c) 30 min analysis frame; (d) 60 min analysis frame; (e) 90 min analysis frame; (f) 120 min analysis frame.
Healthcare 12 01701 g0a1

References

  1. Ashina, M.; Katsarava, Z.; Do, T.P.; Buse, D.C.; Pozo-Rosich, P.; Özge, A.; Krymchantowski, A.V.; Lebedeva, E.R.; Ravishankar, K.; Yu, S.; et al. Migraine: Epidemiology and systems of care. Lancet 2021, 397, 1485–1495. [Google Scholar] [CrossRef]
  2. Buse, D.C.; Fanning, K.M.; Reed, M.L.; Murray, S.; Dumas, P.K.; Adams, A.M.; Lipton, R.B. Life With Migraine: Effects on Relationships, Career, and Finances From the Chronic Migraine Epidemiology and Outcomes (CaMEO) Study. Headache J. Head Face Pain 2019, 59, 1286–1299. [Google Scholar] [CrossRef] [PubMed]
  3. Falla, K.; Kuziek, J.; Mahnaz, S.R.; Noel, M.; Ronksley, P.E.; Orr, S.L. Anxiety and Depressive Symptoms and Disorders in Children and Adolescents With Migraine: A Systematic Review and Meta-analysis. JAMA Pediatr. 2022, 176, 1176–1187. [Google Scholar] [CrossRef] [PubMed]
  4. Fuller-Thomson, E.; Jayanthikumar, J.; Agbeyaka, S.K. Untangling the Association Between Migraine, Pain, and Anxiety: Examining Migraine and Generalized Anxiety Disorders in a Canadian Population Based Study. Headache 2017, 57, 375–390. [Google Scholar] [CrossRef]
  5. Messina, R.; Delussi, M.; Khalil, H.; Karimi, L.; Wijeratne, T.; Crewther, S.G.; Evans, A.E.; Ebaid, D. The Migraine-Anxiety Comorbidity Among Migraineurs: A Systematic Review. Front. Neurol. 2021, 1, 613372. [Google Scholar] [CrossRef]
  6. Irimia, P.; Garrido-Cumbrera, M.; Santos-Lasaosa, S.; Aguirre-Vazquez, M.; Correa-Fernández, J.; Colomina, I.; Pozo-Rosich, P. Impact of monthly headache days on anxiety, depression and disability in migraine patients: Results from the Spanish Atlas. Sci. Rep. 2021, 11, 8286. [Google Scholar] [CrossRef]
  7. Huttunen, H.L.; Halonen, R.; Koskimäki, H. Exploring Use of Wearable Sensors to Identify Early Symptoms of Migraine Attack. In Proceedings of the 2017 ACM International Joint Conference on Pervasive and Ubiquitous Computing and Proceedings of the 2017 ACM International Symposium on Wearable Computers, UbiComp‘17, Maui, HI, USA, 11–15 September 2017; pp. 500–505. [Google Scholar] [CrossRef]
  8. Connelly, M.A.; Boorigie, M.E. Feasibility of using “SMARTER” methodology for monitoring precipitating conditions of pediatric migraine episodes. Headache J. Head Face Pain 2021, 61, 500–510. [Google Scholar] [CrossRef] [PubMed]
  9. EmbracePlus | The World’s Most Advanced Smartwatch for Continuous Health Monitoring. Available online: https://www.empatica.com/en-int/embraceplus/ (accessed on 20 May 2024).
  10. Brouwer, M.D.; Vandenbussche, N.; Steenwinckel, B.; Stojchevska, M.; Donckt, J.V.D.; Degraeve, V.; Vaneessen, J.; Turck, F.D.; Volckaert, B.; Boon, P.; et al. mBrain: Towards the continuous follow-up and headache classification of primary headache disorder patients. BMC Med. Inform. Decis. Mak. 2022, 22, 87. [Google Scholar] [CrossRef]
  11. Gazerani, P. Intelligent Digital Twins for Personalized Migraine Care. J. Pers. Med. 2023, 13, 1255. [Google Scholar] [CrossRef]
  12. Siirtola, P.; Koskimäki, H.; Mönttinen, H.; Röning, J. Using Sleep Time Data from Wearable Sensors for Early Detection of Migraine Attacks. Sensors 2018, 18, 1374. [Google Scholar] [CrossRef]
  13. Koskimäki, H.; Mönttinen, H.; Siirtola, P.; Huttunen, H.L.; Halonen, R.; Röning, J. Early detection of migraine attacks based on wearable sensors: Experiences of data collection using Empatica E4. In Proceedings of the 2017 ACM International Joint Conference on Pervasive and Ubiquitous Computing and Proceedings of the 2017 ACM International Symposium on Wearable Computers, Maui, HI, USA, 11–15 September 2017; pp. 506–511. [Google Scholar]
  14. Lipton, R.B.; Lanteri-Minet, M.; Leroux, E.; Adams, A.M.; Lama, J.C.D.; Reed, M.L.; Fanning, K.M.; Buse, D.C. Pre- and post-headache phases of migraine: Multi-country results from the CaMEO - International Study. J. Headache Pain 2023, 24, 151. [Google Scholar] [CrossRef] [PubMed]
  15. Buse, D.C.; McGinley, J.S.; Lipton, R.B. Predicting the Future of Migraine Attack Prediction. Headache J. Head Face Pain 2020, 60, 2125–2128. [Google Scholar] [CrossRef]
  16. Headache Classification Committee of the International Headache Society (IHS). The international classification of headache disorders, (beta version). Cephalalgia 2013, 33, 629–808. [Google Scholar] [CrossRef] [PubMed]
  17. Schwedt, T.J.; Lipton, R.B.; Goadsby, P.J.; Chiang, C.C.; Klein, B.; Liu, C.; Yu, S.Y.; Severt, L.; Finnegan, M.; Trugman, J.M. Characterizing Prodrome (Premonitory Phase) in Migraine: Results from the PRODROME Trial Screening Period (S41.009). Neurology 2023, 100, 1669. [Google Scholar] [CrossRef]
  18. Pagán, J.; Risco-Martín, J.L.; Moya, J.M.; Ayala, J.L. Modeling methodology for the accurate and prompt prediction of symptomatic events in chronic diseases. J. Biomed. Inform. 2016, 62, 136–147. [Google Scholar] [CrossRef] [PubMed]
  19. Jalagam, M.K.; Mittal, V.K. Recent Studies on Applications using Biomedical Signal Processing: A Review. In Proceedings of the 2021 2nd Global Conference for Advancement in Technology (GCAT), Bangalore, India, 1–3 October 2021; pp. 1–11. [Google Scholar]
  20. Jalannavar, A.; Kanakaraddi, S.G.; Handur, V.S. Migraine Prediction Using Deep Learning Model. In Proceedings of the 2022 Fourth International Conference on Emerging Research in Electronics, Computer Science and Technology (ICERECT), Mandya, India, 26–27 December 2022; pp. 1–8. [Google Scholar]
  21. Vandana, J.; Nirali, N. A review of EEG signal analysis for diagnosis of neurological disorders using machine learning. J. Biomed. Photonics Eng. 2021, 7, 40201. [Google Scholar]
  22. Schramm, S.; Börner, C.; Reichert, M.; Baum, T.; Zimmer, C.; Heinen, F.; Bonfert, M.V.; Sollmann, N. Functional magnetic resonance imaging in migraine: A systematic review. Cephalalgia 2023, 43, 03331024221128278. [Google Scholar] [CrossRef]
  23. Menon, B.; Pillai, A.S.; Mathew, P.S.; Bartkowiak, A.M. Artificial intelligence–assisted headache classification: A review. In Augmenting Neurological Disorder Prediction and Rehabilitation Using Artificial Intelligence; Academic Press: Cambridge, MA, USA, 2022; pp. 145–162. [Google Scholar]
  24. Peris, F.; Donoghue, S.; Torres, F.; Mian, A.; Wöber, C. Towards improved migraine management: Determining potential trigger factors in individual patients. Cephalalgia 2017, 37, 452–463. [Google Scholar] [CrossRef]
  25. Gonzalez-Martinez, A.; Gálvez-Goicurría, J.; Pagán, J.; Quintas, S.; Vieira, A.; Ramiro, C.; Sobrado, M.; Ayala, J.; Vivancos, J.; Gago-Veiga, A.B. P190 Prediction of a migraine crisis in real-time using a wearable device. In Proceedings of the 16th European Headache Congress 2022 Meeting Abstracts, Vienna, Austria, 7–10 December 2022; Volume 23. [Google Scholar] [CrossRef]
  26. Pagán, J.; Orbe, M.I.D.; Gago, A.; Sobrado, M.; Risco-Martín, J.L.; Mora, J.V.; Moya, J.M.; Ayala, J.L. Robust and Accurate Modeling Approaches for Migraine Per-Patient Prediction from Ambulatory Data. Sensors 2015, 15, 15419–15442. [Google Scholar] [CrossRef] [PubMed]
  27. Pagán, J.; Moya, J.M.; Mittal, S.; Ayala, J.L. Advanced migraine prediction simulation system. In Proceedings of the SummerSim, Bellevue, WA, USA, 9–12 July 2017. [Google Scholar]
  28. Empatica. Empatica Health Monitoring Platform SPEC SHEET-E4 User Manual; Empatica: Cambridge MA, USA, 2023. [Google Scholar]
  29. Sunnetci, K.M.; Alkan, A. Biphasic majority voting-based comparative COVID-19 diagnosis using chest X-ray images. Expert Syst. Appl. 2023, 216, 119430. [Google Scholar] [CrossRef]
  30. Chen, T.; Guestrin, C. Xgboost: A scalable tree boosting system. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 785–794. [Google Scholar]
  31. Sunnetci, K.M.; Kaba, E.; Celiker, F.B.; Alkan, A. Deep network-based comprehensive parotid gland tumor detection. Acad. Radiol. 2024, 31, 157–167. [Google Scholar] [CrossRef]
  32. Kamble, K.S.; Sengupta, J. Ensemble Machine Learning-Based Affective Computing for Emotion Recognition Using Dual-Decomposed EEG Signals. IEEE Sens. J. 2022, 22, 2496–2507. [Google Scholar] [CrossRef]
  33. Al-Nafjan, A. Feature selection of EEG signals in neuromarketing. PeerJ Comput. Sci. 2022, 8, e944. [Google Scholar] [CrossRef]
  34. Yang, Y.; Wei, K.; Zhang, H.; Hu, H.; Yan, L.; Gui, W.; Liu, Y.; Chen, X. Identifying functional brain abnormalities in migraine and depression comorbidity. Quant Imaging Med Surg 2022, 12, 2288–2302. [Google Scholar] [CrossRef] [PubMed]
  35. Abromavičius, V.; Serackis, A.; Katkevičius, A.; Kazlauskas, M.; Sledevic, T. Prediction of exam scores using a multi-sensor approach for wearable exam stress dataset with uniform preprocessing. Technol. Health Care 2023, 31, 2499–2511. [Google Scholar] [CrossRef] [PubMed]
  36. Campanella, S.; Altaleb, A.; Belli, A.; Pierleoni, P.; Palma, L. A method for stress detection using empatica E4 bracelet and machine-learning techniques. Sensors 2023, 23, 3565. [Google Scholar] [CrossRef]
  37. Stubberud, A.; Ingvaldsen, S.H.; Brenner, E.; Winnberg, I.; Olsen, A.; Gravdahl, G.B.; Matharu, M.S.; Nachev, P.; Tronvik, E. Forecasting migraine with machine learning based on mobile phone diary and wearable data. Cephalalgia 2023, 43, 03331024231169244. [Google Scholar] [CrossRef] [PubMed]
  38. Buchaiah, S.; Shakya, P. Bearing fault diagnosis and prognosis using data fusion based feature extraction and feature selection. Measurement 2022, 188, 110506. [Google Scholar] [CrossRef]
  39. Murthy, H.N.; Meenakshi, D.M. Comparison of Feature Extraction Techniques: A Case Study on Myocardial Ischemic Beat Detection. Int. J. Pure Appl. Math. 2018, 119, 1389–1395. [Google Scholar]
  40. Rajanna, R.R.; Sriraam, N.; Vittal, P.R.; Arun, U. Performance evaluation of woven conductive dry textile electrodes for continuous ECG signals acquisition. IEEE Sens. J. 2019, 20, 1573–1581. [Google Scholar] [CrossRef]
  41. Aslam, M.; Rajbdad, F.; Azmat, S.; Li, Z.; Boudreaux, J.P.; Thiagarajan, R.; Yao, S.; Xu, J. A novel method for detection of pancreatic Ductal Adenocarcinoma using explainable machine learning. Comput. Methods Programs Biomed. 2024, 245, 108019. [Google Scholar] [CrossRef] [PubMed]
  42. Wang, L.; Han, M.; Li, X.; Zhang, N.; Cheng, H. Review of classification methods on unbalanced data sets. IEEE Access 2021, 9, 64606–64628. [Google Scholar] [CrossRef]
  43. Armstrong, R.A.; Eperjesi, F.; Gilmartin, B. The application of analysis of variance (ANOVA) to different experimental designs in optometry. Ophthalmic Physiol. Opt. 2002, 22, 248–256. [Google Scholar] [CrossRef] [PubMed]
  44. McDonald, J.H. Handbook of Biological Statistics; Sparky House Publishing: Baltimore, MD, USA, 2009; Volume 2. [Google Scholar]
  45. Ridgman, W. Statistical Methods, 8th edn, by GW Snedecor & WG Cochran. xx+ 503 pp. Ames: Iowa State University Press (1989). $44.95 (hard covers). ISBN 0 8138 1561 6. J. Agric. Sci. 1990, 115, 153. [Google Scholar]
Figure 1. Workflow diagram of the research process.
Figure 1. Workflow diagram of the research process.
Healthcare 12 01701 g001
Figure 2. Data pre-processing workflow.
Figure 2. Data pre-processing workflow.
Healthcare 12 01701 g002
Figure 3. ANOVA F-statistic analysis of electrodermal activity features across various analysis frames.
Figure 3. ANOVA F-statistic analysis of electrodermal activity features across various analysis frames.
Healthcare 12 01701 g003
Figure 4. ANOVA p-value analysis of electrodermal activity features across various analysis frames.
Figure 4. ANOVA p-value analysis of electrodermal activity features across various analysis frames.
Healthcare 12 01701 g004
Figure 5. ANOVA F-statistic analysis of pulse rate features across various analysis frames.
Figure 5. ANOVA F-statistic analysis of pulse rate features across various analysis frames.
Healthcare 12 01701 g005
Figure 6. ANOVA p-value analysis of pulse rate features across various analysis frames.
Figure 6. ANOVA p-value analysis of pulse rate features across various analysis frames.
Healthcare 12 01701 g006
Figure 7. ANOVA F-statistic analysis of skin temperature features across various analysis frames.
Figure 7. ANOVA F-statistic analysis of skin temperature features across various analysis frames.
Healthcare 12 01701 g007
Figure 8. ANOVA p-value analysis of skin temperature features across various analysis frames.
Figure 8. ANOVA p-value analysis of skin temperature features across various analysis frames.
Healthcare 12 01701 g008
Figure 9. ANOVA F-statistic analysis of metabolic equivalent features across various analysis frames.
Figure 9. ANOVA F-statistic analysis of metabolic equivalent features across various analysis frames.
Healthcare 12 01701 g009
Figure 10. ANOVA p-value analysis of metabolic equivalent features across various analysis frames.
Figure 10. ANOVA p-value analysis of metabolic equivalent features across various analysis frames.
Healthcare 12 01701 g010
Figure 11. ANOVA F-statistic analysis of activity counts features across various analysis frames.
Figure 11. ANOVA F-statistic analysis of activity counts features across various analysis frames.
Healthcare 12 01701 g011
Figure 12. ANOVA p-value analysis of activity counts features across various analysis frames.
Figure 12. ANOVA p-value analysis of activity counts features across various analysis frames.
Healthcare 12 01701 g012
Figure 13. ANOVA F-statistic analysis of accelerometer features across various analysis frames.
Figure 13. ANOVA F-statistic analysis of accelerometer features across various analysis frames.
Healthcare 12 01701 g013
Figure 14. ANOVA p-value analysis of accelerometer features across various analysis frames.
Figure 14. ANOVA p-value analysis of accelerometer features across various analysis frames.
Healthcare 12 01701 g014
Table 1. Demographic information and monitoring days of study participants.
Table 1. Demographic information and monitoring days of study participants.
ParticipantAgeSexMigraine TypeMigraine Duration (Years)Monthly Migraine Headache DaysMonitoring Days
130MWithout aura577
229MWith and without aura8621
333FWithout aura231452
429MWithout aura23533
522FWithout aura10833
631FWithout aura101268
739FWithout aura5620
829FWithout aura20540
962MWithout aura29725
1026MWithout aura9623
Note: F—female, M—male.
Table 2. Percentage of missing values.
Table 2. Percentage of missing values.
Signal% of Missing Values
Accelerometers14.23%
Activity count14.23%
Electrodermal activity14.23%
Metabolic equivalent of task14.23%
Pulse rate variability75.20%
Pulse rate14.23%
Respiratory rate70.81%
Sleep detection stage14.23%
Step count14.23%
Skin temperature14.23%
Wearing detection13.06%
Note: The yellow highlight indicates significantly high missing values.
Table 3. Feature ranking and recurrence of signal source.
Table 3. Feature ranking and recurrence of signal source.
Signal SourceImportance Score
EDA0.509
Pulse rate0.735
Accelerometers0.333
Activity count0.295
MET0.376
Skin temperature0.803
Table 4. Feature ranking and importance scores for statistical and signal processing measurements.
Table 4. Feature ranking and importance scores for statistical and signal processing measurements.
Feature NameImportance Score
Mean0.535
Median0.576
Standard deviation0.410
Max0.493
Min0.743
Clearance factor0.438
Crest factor0.479
Impulse factor0.458
Kurtosis0.319
Peak value0.493
RMS0.507
Shape factor0.493
Skewness0.306
Table 5. Best classifiers for each participant based on F1-score for 5 min analysis frame.
Table 5. Best classifiers for each participant based on F1-score for 5 min analysis frame.
ParticipantModelAccuracyPrecisionRecallF1-Score
1Random Forest0.8530.8520.7510.757
2SVM0.6750.6770.6750.671
3Random Forest0.8600.8490.7060.731
4XGBoost0.8680.7530.6770.689
5Random Forest0.8270.7570.6250.642
6XGBoost0.8680.5400.5170.510
7XGBoost0.8780.6080.5070.494
8HistGradientBoosting0.8290.7850.7580.768
9HistGradientBoosting0.8630.8190.6550.698
10Random Forest0.8340.8460.8100.829
Table 6. Best classifiers for each participant based on F1-score for 10 min analysis frame.
Table 6. Best classifiers for each participant based on F1-score for 10 min analysis frame.
ParticipantModelAccuracyPrecisionRecallF1-Score
1XGBoost0.8930.8760.8380.848
2KNN0.6640.6980.6630.654
3Random Forest0.8460.8030.6960.725
4XGBoost0.8530.7380.6910.709
5XGBoost0.7940.6650.6100.619
6XGBoost0.8830.6050.5350.537
7HistGradientBoosting0.8840.5820.5250.522
8HistGradientBoosting0.8470.8090.7560.776
9HistGradientBoosting0.8680.8210.6810.717
10Random Forest0.8200.7980.8000.802
Table 7. Best classifiers for each participant based on F1-score for 30 min analysis frame.
Table 7. Best classifiers for each participant based on F1-score for 30 min analysis frame.
ParticipantModelAccuracyPrecisionRecallF1-Score
1Random Forest0.9000.9430.8000.802
2XGBoost0.5890.5900.5570.555
3HistGradientBoosting0.8620.7800.7360.738
4HistGradientBoosting0.8880.8550.7110.753
5XGBoost0.7840.6420.5970.608
6XGBoost0.8910.6840.5160.508
7Random Forest0.8890.8450.5070.484
8HistGradientBoosting0.8210.7810.7160.729
9HistGradientBoosting0.8400.7490.6060.628
10Random Forest0.7950.7890.7760.775
Table 8. Best classifiers for each participant based on F1-score for 60 min analysis frame.
Table 8. Best classifiers for each participant based on F1-score for 60 min analysis frame.
ParticipantModelAccuracyPrecisionRecallF1-Score
1Random Forest0.8170.9420.8000.766
2XGBoost0.6390.6130.5780.532
3HistGradientBoosting0.8920.6690.5630.574
4XGBoost0.8480.7820.5850.597
5Random Forest0.7950.6050.5440.536
6XGBoost0.8870.6510.5350.532
7Random Forest0.8860.9430.5000.484
8KNN0.7500.7380.6200.625
9Random Forest0.8290.7530.5460.580
10Random Forest0.7520.7780.7380.767
Table 9. Best classifiers for each participant based on F1-score for 90 min analysis frame.
Table 9. Best classifiers for each participant based on F1-score for 90 min analysis frame.
ParticipantModelAccuracyPrecisionRecallF1-Score
1XGBoost0.8330.9170.8000.747
2Random Forest0.5330.5200.4250.429
3HistGradientBoosting0.8940.6880.5600.574
4XGBoost0.8480.7820.5850.597
5Random Forest0.7400.6470.4820.505
6KNN0.8850.7850.5220.506
7Random Forest0.8860.9430.5000.470
8KNN0.7500.7380.6200.625
9Random Forest0.8380.6680.5750.522
10XGBoost0.7160.7170.7020.696
Table 10. Best classifiers for each participant based on F1-score for 120 min analysis frame.
Table 10. Best classifiers for each participant based on F1-score for 120 min analysis frame.
ParticipantModelAccuracyPrecisionRecallF1-Score
1XGBoost0.8000.9000.8000.733
2KNN0.6800.6750.6000.613
3KNN0.8900.7050.5530.560
4RandomForest0.8580.9450.6500.632
5RandomForest0.7570.6890.5500.474
6RandomForest0.8800.9450.5000.471
7KNN0.8560.6780.5120.494
8XGBoost0.7270.5860.5510.546
9XGBoost0.8200.6950.6040.595
10HistGradientBoosting0.7240.7540.7130.699
Table 11. Performance metrics of the generalized migraine prediction model using XGBoost for different analysis frame durations.
Table 11. Performance metrics of the generalized migraine prediction model using XGBoost for different analysis frame durations.
Analysis FrameAccuracyPrecisionRecallF1-Score
5 min0.8060.6380.5950.607
10 min0.8110.6400.5870.599
30 min0.8160.6340.5630.572
60 min0.8030.5850.5350.533
90 min0.7900.5170.5080.495
120 min0.7940.5530.5110.498
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Kapustynska, V.; Abromavičius, V.; Serackis, A.; Paulikas, Š.; Ryliškienė, K.; Andruškevičius, S. Machine Learning and Wearable Technology: Monitoring Changes in Biomedical Signal Patterns during Pre-Migraine Nights. Healthcare 2024, 12, 1701. https://doi.org/10.3390/healthcare12171701

AMA Style

Kapustynska V, Abromavičius V, Serackis A, Paulikas Š, Ryliškienė K, Andruškevičius S. Machine Learning and Wearable Technology: Monitoring Changes in Biomedical Signal Patterns during Pre-Migraine Nights. Healthcare. 2024; 12(17):1701. https://doi.org/10.3390/healthcare12171701

Chicago/Turabian Style

Kapustynska, Viroslava, Vytautas Abromavičius, Artūras Serackis, Šarūnas Paulikas, Kristina Ryliškienė, and Saulius Andruškevičius. 2024. "Machine Learning and Wearable Technology: Monitoring Changes in Biomedical Signal Patterns during Pre-Migraine Nights" Healthcare 12, no. 17: 1701. https://doi.org/10.3390/healthcare12171701

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop