An Approach of Sleep Stage Classification Based on Time-frequency Analysis and Random Forest on a Single Channel

Siyuan Bi, Qingmin Liao, Zongqing Lu2018 · DOI

Abstract An approach of sleep stage classification based on Time-Frequency analysis and Random Forest (TFRF) on a single channel is presented. Representative features are extracted using Fast Fourier Transform (FFT) in the frequency domain and Hilbert transform in the time domain, alongside Hjorth parameters, to reduce dimensionality. A Random Forest classifier is trained and evaluated using the Dreams database provided by the University of MONS-TCTS Laboratory. Following the American Academy of Sleep Medicine (AASM) standards, the model achieved a peak sensitivity of 90.4% using signals from only one channel, suggesting high potential for wearable applications.

Introduction

Traditional sleep assessment relies on Polysomnography (PSG), the clinical "gold standard" involving at least twelve channels of data, including EEG, EOG, and EMG. While accurate, PSG is expensive, uncomfortable, and requires slow, subjective manual scoring by experts.

As public interest in sleep hygiene grows, there is a massive demand for home-based monitoring. However, transitioning from a clinical 12-channel setup to a wearable 1-channel device typically results in a significant drop in accuracy. This research addresses whether high classification accuracy can be maintained using only a single EEG channel by employing sophisticated feature extraction and machine learning.

Methodology

The proposed TFRF (Time-Frequency Random Forest) algorithm utilizes a single EEG channel (CZ-A3) to classify sleep stages through a three-stage workflow.

Flowchart of the TFRF classification process, illustrating the path from data reading to experimental results.
  1. Preprocessing: Raw EEG signals are divided into 5-second epochs and grouped into 30-second windows to align with standard scoring practices.
  2. Feature Extraction: To capture both rhythmic oscillations and transient sleep events (like sleep spindles), features are extracted from multiple domains:
  3. Frequency Domain: FFT captures power spectra between 0–30Hz.
  4. Time Domain: The Hilbert transform calculates the signal's envelope and instantaneous frequency.
  5. Statistical Features: Hjorth parameters (Activity, Mobility, and Complexity) describe the statistical morphology of the brain waves.
  6. Classification: These features are processed by a Random Forest classifier, chosen for its ability to handle non-stationary signals and resist overfitting compared to standard decision trees.

Results and Discussion

The TFRF model was evaluated using the Dreams database, consisting of 20 healthy subjects. The model demonstrated impressive performance, particularly in identifying stages that constitute the majority of a night's sleep.

Sensitivity comparison across different classification models (TFRF, HMM, IWKLR, DT) for Wake (W), N2, and N3 stages.

Key performance insights include:

  • N2 Stage: Achieved 90.4% Sensitivity, significantly outperforming comparison models like Hidden Markov Models (HMM) and Importance Weighted Kernel Logistic Regression (IWKLR).
  • N3 (Deep Sleep): 89.6% Sensitivity.
  • Wakefulness: 81.6% Sensitivity.
  • Overall Accuracy: The model maintained high accuracy ranging from 86.8% to 95.8% across different stages.

While the model excels at identifying Wake, N2, and N3, a primary limitation remains the differentiation of N1 (light sleep) and REM sleep. In this study, these stages were combined into a single category because they are notoriously difficult to distinguish using only a single EEG channel without EOG data. Future research will focus on better differentiating these stages and testing the algorithm on subjects with sleep disorders to validate clinical utility.

Conclusion

By proving that a single EEG channel can provide high-quality classification data, this study paves the way for "headband" style trackers that are far less intrusive than clinical setups. The TFRF approach offers a robust, streamlined solution for the next generation of wearable sleep technology.

Summary updated

Abstract

An approach of sleep stage classification based on Time-Frequency analysis and Random Forest (TFRF) on a single channel is presented in the paper. Before classifying sleep stages, representative features are extracted by feature extraction method, such as FFT in the frequency domain of EEG signal and Hilbert transform in time domain, to reduce dimensionality and channel numbers. Other parameters are also used, e.g. Hjorth parameters. Then a Random Forest is trained by classifying the sleep stages. The TFRF is evaluated by means of Dreams database provided by University of MONS -TCTS Laboratory. The new standard of the American Academy of S leep Medicine about the sleep stage classification is obeyed. 16 objects are considered as the training samples, while the other 4 objects are regarded as the test samples. A best result of 90.4% sensitivity is got with the signals from only one channel. Its application prospect is very extensive.
BibTeX
@misc{bi2018approach,
  author = {Siyuan Bi and Qingmin Liao and Zongqing Lu},
  title = {{An Approach of Sleep Stage Classification Based on Time-frequency Analysis and Random Forest on a Single Channel}},
  year = {2018},
  doi = {10.2991/acaai-18.2018.49},
}
Figure