REM Detection and Individual Training of REM Detectors

There are two main kinds of REM detection applicable with the Sleeator 2: First, REM detection using external devices and classification, such as the Zeo’s internal REM detection, and second, REM detectors using the raw data or its transformations.

As described above, advantages for the first way are that it is easy to use, needs less resources on the computer for classification, and offers a buy-in of external experience (e.g. from Zeo’s manufacturer). Benefits of the second variant are that it is individually trainable for each subject, adjustable according to one’s own wishes, understandable (“white box” instead of “black box”) and can be further developed.

A REM detector can be selected on the fourth tab. It is also possible to use multiple classifiers simultaneously. Figure to Figure demonstrate how to train an own REM classifier.

For training a new REM classifier, first a name has to be specified with which the training data are named (1). After having specified class names with which the training data can be associated (2), the user can mark data in the plot by draging the mouse over it (3, 4, 5). Depending on the mouse button used for dragging, the corresponding classes are assigned to the data.
The classes assigned to the data are automatically plotted in color above the time frequency plot, here class "1" for REM in purple (1) and class "0" for NREM in black (2).
On the second tab, a new REM detector can be trained (1). For doing so, a set of training data has to be chosen (2), a machine learning algorithm has to be selected (3), and eventually further parameters can be set (4).
After training the classifier using n-fold cross validation (here: k-nearest neighbor algorithm), the performance and the time needed for training are displayed (1), and the selected REM detector can be saved (2).
Finally, on the fourth tab of the Sleeator 2 (1), a custom REM classifier can be selected (2, 3, 4, 5 and 6) for detecting REM.

There exist numerous machine learning classification algorithms (for an overview, see for example Kotsiantis et al., 2007). In Sleeator 2, three different “standard” algorithm types can be used to build a REM classifier: support vector machines, artificial neural networks, and a k-nearest neighbor classifier. These supervised learning algorithms are programmed to make use of n-fold cross validation. Two more classifier types who simply use thresholds of specific frequency bands as REM detection criterion are also available. After training, the trained classifier and its parameters can be saved into an *.RCL file (RemCLassifier file).