Online Retraining

Select a model.
Select a previously trained model.
Train a new predictive model for the staging of polysomnographic recording. While training is in progress, you may navigate away from the page or close your browser. Trained models may be saved for later use in the Analysis section of the platform. Select an existing model to test on out-of-sample data, or configure and train a new model.
Model configuration.
Configuration
Multiclass models use a Softmax function to produce probabilities for Wake, N1, N2, N3, and REM sleep stages for each analysed epoch of recording. The maximum allowed tree depth (or path length) limits the complexity of each decision tree. Higher values allow trees to model higher-order feature interactions, and increase model capacity, complexity, and the likelihood of overfitting. Lower values constrain complexity and may improve generalisation. Maximum number of histogram bins per feature used to approximate candidate split thresholds during tree building. Higher values allow finer thresholds, while lower values smooth the model.
Class imbalance (uneven sleep stage representation within the training data) may be corrected by adjusting class weights.
Model Information
Feature Selection
Feature Description
EEG Relative Delta Ratio of spectral component in the Delta (0.5-4Hz) band.
EEG Relative Theta Ratio of spectral component in the Theta (4-8Hz) band.
EEG Relative Alpha Ratio of spectral component in the Alpha (8-13Hz) band.
EEG Relative Sigma Ratio of spectral component in the Sigma (11-16Hz) band.
EEG Delta-Theta Ratio Ratio of spectral component in the Delta (0.5-4Hz) and Theta (4-8Hz) bands.
EEG Theta-Alpha Ratio Ratio of spectral component in the Theta (4-8Hz) and Alpha (8-13Hz) bands.
EEG Theta-Sigma Ratio Ratio of spectral component in the Theta (4-8Hz) and Sigma (11-16Hz) bands.
EEG Theta-Beta Ratio Ratio of spectral component in the Theta (4-8Hz) and Beta (16-24Hz) bands.
EEG SEF50 Spectral edge frequency below which 50% of total EEG power lies.
EEG SEF95 Spectral edge frequency below which 95% of total EEG power lies.
EEG P10 10th percentile value of the full-wave rectified EEG.
EEG P50 50th percentile value of the full-wave rectified EEG.
EEG P90 90th percentile value of the full-wave rectified EEG.
EEG RMS Root mean square of the EEG.
EEG Shannon Entropy Shannon entropy of the EEG. A static measure of regularity.
EEG Permutation Entropy Permutation entropy of the EEG where the embedding delay equals 1, and m equals 4. A dynamic measure of regularity.
EEG Spectral Entropy Shannon entropy of the normalised EEG power spectral density.
EEG Complexity Lempel-Ziv Complexity of the binarised EEG. A measure of repeating sequences.
EEG DFA Short Detrended fluctuation analysis of the EEG over 9 log-spaced windows, where the minimum window size is 24, and the maximum is 96. A measurement of self-affinity.
EEG DFA Long Detrended fluctuation analysis of the EEG over 9 log-spaced windows, where the minimum window size is 96, and the maximum is 360. A measurement of self-affinity.
EEG Power Total spectral component of the EEG.
EEG Power Mean First statistical moment of the EEG power spectral density.
EEG Power Variance Second statistical moment of the EEG power spectral density.
EEG Power Skewness Third statistical moment of the EEG power spectral density.
EEG Power Kurtosis Fourth statistical moment of the EEG power spectral density.
EEG Power Peak Spectral component of the EEG with the highest power.
EOG Slow Eye Movement Band Spectral component of the EOG in the 0.5-1Hz band.
EOG Rapid Eye Movement Band Spectral component of the EOG in the 1-7Hz band.
EOG P10 10th percentile value of the full-wave rectified EOG.
EOG P50 50th percentile value of the full-wave rectified EOG.
EOG P90 90th percentile value of the full-wave rectified EOG.
EOG RMS Root mean square of the EOG.
EOG Shannon Entropy Shannon entropy of the EOG. A static measure of regularity.
EOG Permutation Entropy Permutation entropy of the EOG where the embedding delay equals 1, and m equals 4. A dynamic measure of regularity.
EOG Spectral Entropy Shannon entropy of the normalised EOG power spectral density.
EOG Complexity Lempel-Ziv Complexity of the binarised EOG. A measure of repeating sequences.
EOG DFA Short Detrended fluctuation analysis of the EOG over 9 log-spaced windows, where the minimum window size is 48, and the maximum is 192. A measurement of self-affinity.
EOG DFA Long Detrended fluctuation analysis of the EOG over 9 log-spaced windows, where the minimum window size is 192, and the maximum is 360. A measurement of self-affinity.
EOG Power Total spectral component of the EOG.
EOG Power Mean First statistical moment of the EOG power spectral density.
EOG Power Variance Second statistical moment of the EOG power spectral density.
EOG Power Skewness Third statistical moment of the EOG power spectral density.
EOG Power Kurtosis Fourth statistical moment of the EOG power spectral density.
EOG Power Peak Spectral component of the EOG with the highest power.
EMG P10 10th percentile value of the full-wave rectified EMG.
EMG P50 50th percentile value of the full-wave rectified EMG.
EMG P90 90th percentile value of the full-wave rectified EMG.
EMG RMS Root mean square of the EMG.
EMG Shannon Entropy Shannon entropy of the full-wave rectified EMG. A static measure of regularity.
EMG Permutation Entropy Permutation entropy of the full-wave rectified EMG where the embedding delay equals 1, and m equals 4. A dynamic measure of regularity.
EMG Spectral Entropy Shannon entropy of the normalised EMG power spectral density.
EMG Complexity Lempel-Ziv Complexity of the full-wave rectified and binarised EMG. A measure of repeating sequences.
EMG DFA Short Detrended fluctuation analysis of the full-wave rectified EMG over 9 log-spaced windows, where the minimum window size is 12, and the maximum is 48. A measurement of self-affinity.
EMG DFA Long Detrended fluctuation analysis of the full-wave rectified EMG over 9 log-spaced windows, where the minimum window size is 48, and the maximum is 192. A measurement of self-affinity.
EMG Power Total spectral component of the EMG.
EMG Power Mean First statistical moment of the EMG power spectral density.
EMG Power Variance Second statistical moment of the EMG power spectral density.
EMG Power Skewness Third statistical moment of the EMG power spectral density.
EMG Power Kurtosis Fourth statistical moment of the EMG power spectral density.
EMG Power Peak Spectral component of the EMG with the highest power.
Select training data.
Select a precomputed dataset to use for model training. Only datasets specifically configured for training are available. Cross-validation results are available during model testing.
Training dashboard.
Bayesian Optimisation
Number of objective function evaluations.
Number of candidates evaluated per iteration.
Configure the Bayesian Optimiser and search space for each hyperparameter. The number of iterations determines how many points are evaluated, and the number of candidates controls the resolution of the acquisition search.
Training Progress

0
0.4
0.8
Iteration
Multiclass Log Loss
Bayesian Optimisation is used to search the hyperparameter ranges provided. This process attempts to balance exploration and exploitation to select the optimal values for the trained model. Gaussian Process Regression (GPR) and the Expected Improvement acquisition function are used. For each set of hyperparameters, models are trained using the appropriate solver. K-fold cross-validation is used to produce a validation error which is input into the GPR that underpins the Bayesian Optimisation. The most optimal hyperparameters, as determined by the optimisation process, are then used to train the final model. You may save the trained model when training is complete. Saved models are accessible immediately through the Analysis area of the platform.
Model testing.
Select a precomputed dataset to use for out-of-sample Model Testing. Out-of-sample data are recommended.
Model Validation

Confusion Matrix

Actual
WN1N2N3REM

Predicted

W

53562281962979

N1

118311154261

N2

1886507594624348

N3

171141349404

REM

13420632853004

Performance Metrics

Accuracy: 85%

Precision: 0.787

Recall: 0.752

F1: 0.759

Model Accuracy, Precision, Recall, and F1 are the macro-average of per-class scores using the arithmetic mean.
Model Validation data are collected from out-of-fold testing during cross-validation. These data are saved with the model and do not change. Only the first 25,000 samples are displayed.
Model Testing

Confusion Matrix

Actual
WN1N2N3REM

Predicted

W

57112111972368

N1

81323159347

N2

2165887575664319

N3

15642146241

REM

11219036343079

Performance Metrics

Accuracy: 85%

Precision: 0.798

Recall: 0.758

F1: 0.767

Model Accuracy, Precision, Recall, and F1 are the macro-average of per-class scores using the arithmetic mean.
Model Testing using the selected dataset. Data are out-of-sample and so testing results provide a reasonable indication of model generalisability. Data are not consecutive epochs from any single recording and so logarithmic smoothing is not applied. Paired label and prediction data are available for download. Classification data are represented as Stage Wake (0), N1 (1), N2 (2), N3 (3), and REM (4).
Sample Recordings

Sample Recording 1

Sample Recording 2

Sample Recording 3

Whole-of-recording Model Testing using open source data. Probabilities for each sleep stage are displayed for each epoch (30 seconds) of recording. This is an intermediate representation only. Complete sleep staging, displayed in the recording hypnogram, are a product of the displayed probabilities and logarithmic smoothing.