The invention relates generally to data processing, and more particularly to methods of artificial intelligence and automatic computer scoring of sleep stages from data acquired during PSG and applications of the same.
The background description provided herein is for the purpose of generally presenting the context of the invention. The subject matter discussed in the background of the invention section should not be assumed to be prior art merely as a result of its mention in the background of the invention section. Similarly, a problem mentioned in the background of the invention section or associated with the subject matter of the background of the invention section should not be assumed to have been previously recognized in the prior art. The subject matter in the background of the invention section merely represents different approaches, which in and of themselves may also be inventions. Work of the presently named inventors, to the extent it is described in the background of the invention section, as well as aspects of the description that may not otherwise qualify as prior art at the time of filing, are neither expressly nor impliedly admitted as prior art against the invention.
Sleep plays a vital role in good health and well-being throughout our life. It is not surprising that sleep is often sacrificed when people are pressed for time. However, the lack of sleep has been discussed as the underlying mechanism for many diseases, including obesity, diabetes, cardiovascular diseases and hypertension, and immune dysfunction. Since medical conditions resulting from lack of sleep are not immediate, it is difficult to prove the causality of sleep deprivation and the disease.
Normal sleep is characterized by sleep stages, which are typically defined by the neural activity of the brain and by the activity of peripheral muscles. The stages are called awake, non-rapid eye movement sleep divided into stage N1, stage N2, and stage N3, and the rapid eye movement (REM) sleep. In 1937, Loomis discovered distinct visual features such as sleep spindles, K-complex, and delta waves in the electroencephalogram (EEG) of individuals during night sleep (Loomis, Harvey, and Hobart, 1937). He also discovered that those visual features exhibit cyclic phases throughout the entire sleep study. In 1968, Rechtschaffen and Kales classified sleep into five different stages (plus a wake stage) that can be identified using visual markers (Silber et al., 2007). Their manual, often called the R & K sleep manual, which remained the standard for identifying sleep stages until it was replaced in 2007 by a new standard set up by the American Academy of Sleep Medicine (AASM) (Berry et al., 2013). The AASM standard classified sleep into four stages plus a wake stage, the assessment of which is decided visually using the electroencephalogram (EEG), electrooculogram (EOG), and electromyogram (EMG) of individuals. Using the traces of the neurological recording the wake stage or wakefulness is characterized by the presence of alpha (8-13 Hz) and beta (18-25 Hz) waves dominating the occipital EEG. Other features of the wake stage include rapid eye movements and/or blinking. Stage N1 is often described as the transitional stage between the wake stage and stage N2 and is characterized by a transition from a typical alpha rhythm in the EEG recordings into low-amplitude mixed frequency (LAMF, 4-7 Hz) signals. Other markers include slow eye movements and a decrease in the EMG tone. Sleep stage N2 is characterized by the existence of K-complexes and sleep spindles. K-complex is defined as a sharp vertex wave with highest amplitude in the frontal region. Sleep spindle is defined a train of 11-16 Hz sinusoidal wave most distinct in the central region. Sleep stage N3 is characterized by slow delta (0-2 Hz) waves dominating the frontal region. The delta waves are often large in amplitude (>75 mV). Sleep stage R is characterized by LAMF and/or rapid eye movements. Often, there exist sawtooth-like waves in the 2-8 Hz range.
In the clinic, highly trained professionals (usually MDs) identify and visually score sleep stages. This process, also known as “sleep scoring” is done according to standard guidelines released by the AASM. The sleep medicine professional scores each 30 seconds epoch of a full sleep cycle. Since the scoring is mostly visual and relies on intuitions and personal training, the inter-scorer and intra-scorer accuracy is not very high. For example, scoring of 72 subjects by two experienced professionals using the AASM standard only yield an 82% agreement between the two scorers (Danker-Hopfe t al., 2009). Consequently, every 5 epochs or every 2.5 minutes, the scorers disagree. If the average subject sleeps for 7.5 hours, two professionals would disagree, on average, 90 minutes of sleep time about which sleep stages should the subject be in. To fasten the scoring process, methods have been developed to automatically score sleep stages. A listing of some automatic scoring algorithm is shown in Table 1.
The majority of algorithms require extracting multiple features (up to 30 or more) and supervised learning method with the training and testing set often from the same dataset of patients. More recently, more sophisticated and complex models were applied to score sleep studies. The later require extensive training to score stages.
Therefore, a heretofore unaddressed need exists in the art to address the aforementioned deficiencies and inadequacies.
One of the objectives of this invention is to provide a method/algorithm for scoring sleep stages that extract only 12 features total from the EEG leads and requires no prior information nor training dataset from other patients. Instead, the method/algorithm relies on clustering methods to cluster accurately sleep stages in their multi-directional space. The method/algorithm is a robust approach of pattern recognition, which is competitive with professional scorers using as little as 2 leads to record brain activity instead of using several leads in the later method mentioned above. The sleep stages includes awake, non-rapid eye movement sleep divided into N1, N2, and N3 stages, and rapid eye movement (REM) sleep.
In one aspect of the invention, the method for scoring sleep stages of a mammal subject, comprising extracting features from polysomnography (PSG) data; grouping the extracted features into clusters that are assigned to different sleep stages; and scoring the sleep stages based on the clusters. The mammal subject is a human subject or a non-human subject.
In one embodiment, the method further comprises, prior to said extracting step, acquiring the PSG data by electroencephalogram (EEG) leads placed on predetermined positions on the mammal subject.
In one embodiment, the PSG data is pre-acquired by EEG leads placed on predetermined positions on the mammal subject.
In one embodiment, said extracting step is performed with a continuous wavelet transform (CWT).
In one embodiment, said extracting step comprises separating each signal recorded with an EEG lead into epochs of a period of time without overlaps; applying the CWT onto each epoch using a mother wavelet to obtain a CWT coefficient matrix; dividing the obtained CWT coefficient matrix into six frequency bands; and summing up the CWT coefficient matrix of each frequency band over the entire sleep epoch to obtain a feature corresponding to said frequency band for said EEG lead, wherein in the end, each epoch taken from said EEG lead has six features extracted.
In one embodiment, said six frequency bands are 0-1 Hz, 1-2 Hz, 2-4 Hz, 4-8 Hz, 8-16 Hz, and 16-32 Hz.
In one embodiment, the mother wavelet is a Morlet wavelet.
In one embodiment, the period of time is in a range of about 20-40 seconds.
In one embodiment, said grouping step is performed with unsupervised learning.
In one embodiment, said grouping step comprises identifying a wake stage; identifying an N1 stage; identifying REM and N2 stages; and identifying an N3 stage.
In one embodiment, said detecting the arousal or sudden movements comprises eliminating outliers using a density-based spatial clustering of applications with a noise (db-scan) algorithm.
In one embodiment, said eliminating the outliers comprises applying the db-scan) algorithm on the frequency features extracted from the PSG data acquired from a occipital (O1-A2) lead, with five frequency features at frequencies 2-4 Hz, 4-8 Hz, 8-16 Hz, and 16-32 Hz, respectively.
In one embodiment, a epsilon distance and nminpoints are adapted in the db-scan algorithm, such that when a group of minimum points are at most epsilon distance apart from each other's, the db-scan algorithm groups them into one cluster, and when there exist any points that are beyond the epsilon distance apart from any available clusters, the db-scan algorithm classifies them as the outliers, where the epsilon distance is a distance used to locate the points in the neighborhood of any point, and the nminpoints are the minimum number of points required to form a dense region.
In one embodiment, said five frequency features are z-score normalized using the epsilon distance of 0.7 and the nminpoints of 15, wherein any outliers registered from the step are scored as a wake stage and discarded before moving on to the next step.
In one embodiment, said identifying the wake stage is performed with hierarchical clustering using a Ward's method, by starting with each point as a cluster of its own; merging two clusters that are the most similar into a new cluster; and repeating the staring and merging steps until there is only one cluster, where the Ward's method groups the clusters that minimized the variance.
In one embodiment, said identifying the wake-sleep stage is performed with three frequency features at frequencies 4-8 Hz, 8-16 Hz, and 16-32 Hz, respectively, extracted from the PSG data acquired from the O1-A2 lead, so as to differentiate awake from sleep.
In one embodiment, said identifying the N1 stage is performed by examining visually cluster groups of the N1 and N2 stages to determine if there are enough points in the N1 stage to classify it as a separated stage; and with insufficient number of points in the N1 stage, marking any transitional points between the wake stage to the N2 stage as the N1 stage.
In one embodiment, said identifying the REM and N2 stages is performed with hierarchical clustering using Ward's criteria with three frequency features at frequencies 2-4 Hz, 4-8 Hz, and 8-16 Hz, respectively, extracted from the PSG data acquired from a frontal (F3-A2) lead, so as to differentiate the REM and N2 stages.
In one embodiment, said identifying the N3 stage is performed with hierarchical clustering using Ward's criteria four frequency features at frequencies 0-1 Hz, 1-2 Hz, 2-4 Hz, and 4-8 Hz, respectively, extracted from the PSG data acquired from the F3-A2 lead, so as to differentiate stage N3 from the other sleep stages.
In one embodiment, said grouping step further comprises smoothing the sleep stages to increase reproducibility of the scoring, which eliminates any outliers that are 2 or less epochs outside of their surrounding neighbors.
In one embodiment, the method further comprises comparing scores of the sleep stages to that given by a professional; and calculating accuracy that is the number of true positive and true negative over the total number of observations, precision that is a ratio of correctly predicted positive observations to the total predicted positive observations, and sensitivity that is a ratio of correctly predicted positive observations to the all observations in actual class.
In another aspect, the invention relates to a non-transitory tangible computer-readable medium storing instructions which, when executed by one or more processors, cause a system to perform a method for scoring sleep stages of a mammal subject, comprising extracting features from the PSG data; grouping the extracted features into clusters that are assigned to different sleep stages; and scoring the sleep stages based on the clusters.
In one embodiment, said extracting step comprises separating each signal recorded with an EEG lead into epochs of a period of time without overlaps; applying the CWT onto each epoch using a mother wavelet to obtain a CWT coefficient matrix; dividing the obtained CWT coefficient matrix into six frequency bands; and summing up the CWT coefficient matrix of each frequency band over the entire sleep epoch to obtain a feature corresponding to said frequency band for said EEG lead, wherein in the end, each epoch taken from said EEG lead has six features extracted.
In one embodiment, said six frequency bands are 0-1 Hz, 1-2 Hz, 2-4 Hz, 4-8 Hz, 8-16 Hz, and 16-32 Hz.
In one embodiment, the mother wavelet is a Morlet wavelet.
In one embodiment, the period of time is in a range of about 20-40 seconds.
In one embodiment, said grouping step is performed with unsupervised learning.
In one embodiment, said grouping step comprises identifying a wake stage; identifying an N1 stage; identifying REM and N2 stages; and identifying an N3 stage.
In one embodiment, said detecting the arousal or sudden movements comprises eliminating outliers using a db-scan algorithm.
In one embodiment, said eliminating the outliers comprises applying the db-scan) algorithm on the frequency features extracted from the PSG data acquired from the O1-A2 lead, with five frequency features at frequencies 2-4 Hz, 4-8 Hz, 8-16 Hz, and 16-32 Hz, respectively.
In one embodiment, a epsilon distance and nminpoints are adapted in the db-scan algorithm, such that when a group of minimum points are at most epsilon distance apart from each other's, the db-scan algorithm groups them into one cluster, and when there exist any points that are beyond the epsilon distance apart from any available clusters, the db-scan algorithm classifies them as the outliers, where the epsilon distance is a distance used to locate the points in the neighborhood of any point, and the nminpoints are the minimum number of points required to form a dense region.
In one embodiment, said five frequency features are z-score normalized using the epsilon distance of 0.7 and the nminpoints of 15, wherein any outliers registered from the step are scored as a wake stage and discarded before moving on to the next step.
In one embodiment, said identifying the wake stage is performed with hierarchical clustering using a Ward's method, by starting with each point as a cluster of its own; merging two clusters that are the most similar into a new cluster; and repeating the staring and merging steps until there is only one cluster, where the Ward's method groups the clusters that minimized the variance.
In one embodiment, said identifying the wake-sleep stage is performed with three frequency features at frequencies 4-8 Hz, 8-16 Hz, and 16-32 Hz, respectively, extracted from the PSG data acquired from the O1-A2 lead, so as to differentiate awake from sleep.
In one embodiment, said identifying the N1 stage is performed by examining visually cluster groups of the N1 and N2 stages to determine if there are enough points in the N1 stage to classify it as a separated stage; and with insufficient number of points in the N1 stage, marking any transitional points between the wake stage to the N2 stage as the N1 stage.
In one embodiment, said identifying the REM and N2 stages is performed with hierarchical clustering using Ward's criteria with three frequency features at frequencies 2-4 Hz, 4-8 Hz, and 8-16 Hz, respectively, extracted from the PSG data acquired from the F3-A2 lead, so as to differentiate the REM and N2 stages.
In one embodiment, said identifying the N3 stage is performed with hierarchical clustering using Ward's criteria four frequency features at frequencies 0-1 Hz, 1-2 Hz, 2-4 Hz, and 4-8 Hz, respectively, extracted from the PSG data acquired from the F3-A2 lead, so as to differentiate stage N3 from the other sleep stages.
In one embodiment, said grouping step further comprises smoothing the sleep stages to increase reproducibility of the scoring, which eliminates any outliers that are 2 or less epochs outside of their surrounding neighbors.
In one embodiment, the method further comprises comparing scores of the sleep stages to that given by a professional; and calculating accuracy that is the number of true positive and true negative over the total number of observations, precision that is a ratio of correctly predicted positive observations to the total predicted positive observations, and sensitivity that is a ratio of correctly predicted positive observations to the all observations in actual class.
In yet another aspect, the invention relates to a system for scoring sleep stages of a mammal subject, comprising one or more computing devices comprising one or more processors; and a non-transitory tangible computer-readable medium storing instructions which, when executed by the one or more processors, cause the one or more computing devices to perform a method for scoring sleep stages of a mammal subject, comprising extracting features from the PSG data; grouping the extracted features into clusters that are assigned to different sleep stages; and scoring the sleep stages based on the clusters.
In one embodiment, said extracting step comprises separating each signal recorded with an EEG lead into epochs of a period of time without overlaps; applying the CWT onto each epoch using a mother wavelet to obtain a CWT coefficient matrix; dividing the obtained CWT coefficient matrix into six frequency bands; and summing up the CWT coefficient matrix of each frequency band over the entire sleep epoch to obtain a feature corresponding to said frequency band for said EEG lead, wherein in the end, each epoch taken from said EEG lead has six features extracted.
In one embodiment, said six frequency bands are 0-1 Hz, 1-2 Hz, 2-4 Hz, 4-8 Hz, 8-16 Hz, and 16-32 Hz.
In one embodiment, the mother wavelet is a Morlet wavelet.
In one embodiment, the period of time is in a range of about 20-40 seconds.
In one embodiment, said grouping step is performed with unsupervised learning.
In one embodiment, said grouping step comprises identifying a wake stage; identifying an N1 stage; identifying REM and N2 stages; and identifying an N3 stage.
In one embodiment, said detecting the arousal or sudden movements comprises eliminating outliers using a db-scan algorithm.
In one embodiment, said eliminating the outliers comprises applying the db-scan) algorithm on the frequency features extracted from the PSG data acquired from the O1-A2 lead, with five frequency features at frequencies 2-4 Hz, 4-8 Hz, 8-16 Hz, and 16-32 Hz, respectively.
In one embodiment, a epsilon distance and nminpoints are adapted in the db-scan algorithm, such that when a group of minimum points are at most epsilon distance apart from each other's, the db-scan algorithm groups them into one cluster, and when there exist any points that are beyond the epsilon distance apart from any available clusters, the db-scan algorithm classifies them as the outliers, where the epsilon distance is a distance used to locate the points in the neighborhood of any point, and the nminpoints are the minimum number of points required to form a dense region.
In one embodiment, said five frequency features are z-score normalized using the epsilon distance of 0.7 and the nminpoints of 15, wherein any outliers registered from the step are scored as a wake stage and discarded before moving on to the next step.
In one embodiment, said identifying the wake stage is performed with hierarchical clustering using a Ward's method, by starting with each point as a cluster of its own; merging two clusters that are the most similar into a new cluster; and repeating the staring and merging steps until there is only one cluster, where the Ward's method groups the clusters that minimized the variance.
In one embodiment, said identifying the wake-sleep stage is performed with three frequency features at frequencies 4-8 Hz, 8-16 Hz, and 16-32 Hz, respectively, extracted from the PSG data acquired from the O1-A2 lead, so as to differentiate awake from sleep.
In one embodiment, said identifying the N1 stage is performed by examining visually cluster groups of the N1 and N2 stages to determine if there are enough points in the N1 stage to classify it as a separated stage; and with insufficient number of points in the N1 stage, marking any transitional points between the wake stage to the N2 stage as the N1 stage.
In one embodiment, said identifying the REM and N2 stages is performed with hierarchical clustering using Ward's criteria with three frequency features at frequencies 2-4 Hz, 4-8 Hz, and 8-16 Hz, respectively, extracted from the PSG data acquired from the F3-A2 lead, so as to differentiate the REM and N2 stages.
In one embodiment, said identifying the N3 stage is performed with hierarchical clustering using Ward's criteria four frequency features at frequencies 0-1 Hz, 1-2 Hz, 2-4 Hz, and 4-8 Hz, respectively, extracted from the PSG data acquired from the F3-A2 lead, so as to differentiate stage N3 from the other sleep stages.
In one embodiment, said grouping step further comprises smoothing the sleep stages to increase reproducibility of the scoring, which eliminates any outliers that are 2 or less epochs outside of their surrounding neighbors.
In one embodiment, the method further comprises comparing scores of the sleep stages to that given by a professional; and calculating accuracy that is the number of true positive and true negative over the total number of observations, precision that is a ratio of correctly predicted positive observations to the total predicted positive observations, and sensitivity that is a ratio of correctly predicted positive observations to the all observations in actual class.
These and other aspects of the present invention will become apparent from the following description of the preferred embodiment taken in conjunction with the following drawings, although variations and modifications therein may be affected without departing from the spirit and scope of the novel concepts of the disclosure.
The accompanying drawings illustrate one or more embodiments of the invention and together with the written description, serve to explain the principles of the invention. Wherever possible, the same reference numbers are used throughout the drawings to refer to the same or like elements of an embodiment.
The present invention will now be described more fully hereinafter with reference to the accompanying drawings, in which exemplary embodiments of the present invention are shown. The present invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art. Like reference numerals refer to like elements throughout.
The terms used in this specification generally have their ordinary meanings in the art, within the context of the invention, and in the specific context where each term is used. Certain terms that are used to describe the invention are discussed below, or elsewhere in the specification, to provide additional guidance to the practitioner regarding the description of the invention. For convenience, certain terms may be highlighted, for example using italics and/or quotation marks. The use of highlighting and/or capital letters has no influence on the scope and meaning of a term; the scope and meaning of a term are the same, in the same context, whether or not it is highlighted and/or in capital letters. It will be appreciated that the same thing can be said in more than one way. Consequently, alternative language and synonyms may be used for any one or more of the terms discussed herein, nor is any special significance to be placed upon whether or not a term is elaborated or discussed herein. Synonyms for certain terms are provided. A recital of one or more synonyms does not exclude the use of other synonyms. The use of examples anywhere in this specification, including examples of any terms discussed herein, is illustrative only and in no way limits the scope and meaning of the invention or of any exemplified term. Likewise, the invention is not limited to various embodiments given in this specification.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various elements, components, regions, layers and/or sections, these elements, components, regions, layers and/or sections should not be limited by these terms. These terms are only used to distinguish one element, component, region, layer or section from another element, component, region, layer or section. Thus, a first element, component, region, layer or section discussed below can be termed a second element, component, region, layer or section without departing from the teachings of the present invention.
It will be understood that, as used in the description herein and throughout the claims that follow, the meaning of “a”, “an”, and “the” includes plural reference unless the context clearly dictates otherwise. Also, it will be understood that when an element is referred to as being “on,” “attached” to, “connected” to, “coupled” with, “contacting,” etc., another element, it can be directly on, attached to, connected to, coupled with or contacting the other element or intervening elements may also be present. In contrast, when an element is referred to as being, for example, “directly on,” “directly attached” to, “directly connected” to, “directly coupled” with or “directly contacting” another element, there are no intervening elements present. It will also be appreciated by those of skill in the art that references to a structure or feature that is disposed “adjacent” to another feature may have portions that overlap or underlie the adjacent feature.
It will be further understood that the terms “comprises” and/or “comprising,” or “includes” and/or “including” or “has” and/or “having” when used in this specification specify the presence of stated features, regions, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, regions, integers, steps, operations, elements, components, and/or groups thereof.
Furthermore, relative terms, such as “lower” or “bottom” and “upper” or “top,” may be used herein to describe one element's relationship to another element as illustrated in the figures. It will be understood that relative terms are intended to encompass different orientations of the device in addition to the orientation shown in the figures. For example, if the device in one of the figures is turned over, elements described as being on the “lower” side of other elements would then be oriented on the “upper” sides of the other elements. The exemplary term “lower” can, therefore, encompass both an orientation of lower and upper, depending on the particular orientation of the figure. Similarly, if the device in one of the figures is turned over, elements described as “below” or “beneath” other elements would then be oriented “above” the other elements. The exemplary terms “below” or “beneath” can, therefore, encompass both an orientation of above and below.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
As used in this disclosure, “around”, “about”, “approximately” or “substantially” shall generally mean within 20 percent, preferably within 10 percent, and more preferably within 5 percent of a given value or range. Numerical quantities given herein are approximate, meaning that the term “around”, “about”, “approximately” or “substantially” can be inferred if not expressly stated.
As used in this disclosure, the phrase “at least one of A, B, and C” should be construed to mean a logical (A or B or C), using a non-exclusive logical OR. As used herein, the term “and/or” includes any and all combinations of one or more of the associated listed items.
The methods and systems will be described in the following detailed description and illustrated in the accompanying drawings by various blocks, components, circuits, processes, algorithms, etc. (collectively referred to as “elements”). These elements may be implemented using electronic hardware, computer software, or any combination thereof. Whether such elements are implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. By way of example, an element, or any portion of an element, or any combination of elements may be implemented as a “processing system” that includes one or more processors. Examples of processors include microprocessors, microcontrollers, graphics processing units (GPUs), central processing units (CPUs), application processors, digital signal processors (DSPs), reduced instruction set computing (RISC) processors, systems on a chip (SoC), baseband processors, field programmable gate arrays (FPGAs), programmable logic devices (PLDs), state machines, gated logic, discrete hardware circuits, and other suitable hardware configured to perform the various functionality described throughout this disclosure. One or more processors in the processing system may execute software. Software shall be construed broadly to mean instructions, instruction sets, code, code segments, program code, programs, subprograms, software components, applications, software applications, software packages, routines, subroutines, objects, executables, threads of execution, procedures, functions, etc., whether referred to as software, firmware, middleware, microcode, hardware description language, or otherwise.
Accordingly, in one or more example embodiments, the functions described may be implemented in hardware, software, or any combination thereof. If implemented in software, the functions may be stored on or encoded as one or more instructions or code on a computer-readable medium. Computer-readable media includes computer storage media. Storage media may be any available media that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise a random-access memory (RAM), a read-only memory (ROM), an electrically erasable programmable ROM (EEPROM), optical disk storage, magnetic disk storage, other magnetic storage devices, combinations of the aforementioned types of computer-readable media, or any other medium that can be used to store computer executable code in the form of instructions or data structures that can be accessed by a computer.
The description below is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses. The broad teachings of the invention can be implemented in a variety of forms. Therefore, while this invention includes particular examples, the true scope of the invention should not be so limited since other modifications will become apparent upon a study of the drawings, the specification, and the following claims. For purposes of clarity, the same reference numbers will be used in the drawings to identify similar elements. It should be understood that one or more steps within a method may be executed in different order (or concurrently) without altering the principles of the invention.
According to the American Academy of Sleep Medicine (AASM), sleep can be divided into different stages N1, N2, N3, REM and awake. The time spent in each stage as well as the cycling between the stages hold clinical importance. Therefore, it is of utmost importance to score sleep stages correctly. Standard procedure requires sleep professionals to score sleep stages using polysomnography (PSG), also known as sleep study data. These sleep professionals are trained and follow the AASM guidelines to recognize and score visual and temporal features of each sleep stage. However, it has been shown that these sleep professionals' performance has limited inter- and intra-patient reproducibility.
One of the objectives of the invention is to provide a novel computer-based method/algorithm for scoring sleep stages that does not require prior visual knowledge of sleep stages nor supervised training. Instead, the novel algorithm extract features from the PSG data using the continuous wavelet transform, then build clusters of data that are assigned to different sleep stages. When comparing to professional scorers, the algorithm, agrees on average with the professional scorers 80% of the time, which is comparable to how much the scorers agrees with each other, which is 85% of the time on average. Since the outcome of computer scoring is always reproducible independent of how often the sleep study is scored or the location where it is scored, the use of the computer could lead to an increased inter-site and overall rigor and reproducibility of the results among different sleep disorder centers. The inter-scorer variability is also removed.
Referring to
The method may further include, prior to said extracting step, acquiring the PSG data by electroencephalogram (EEG) leads placed on predetermined positions on the mammal subject. According to the invention, the PSG data used for scoring the sleep stages are signals acquired from only two leads: a frontal (F3-A2) lead and an occipital (O1-A2) lead, as shown in
In one embodiment, said extracting step is performed with a continuous wavelet transform (CWT).
In one embodiment shown in
In one embodiment, said grouping step is performed with unsupervised learning.
In one embodiment, said grouping step comprises identifying a wake stage; identifying an N1 stage; identifying REM and N2 stages; and identifying an N3 stage.
In one embodiment, said detecting the arousal or sudden movements comprises eliminating outliers using a density-based spatial clustering of applications with a noise (db-scan) algorithm. In the db-scan algorithm, a epsilon distance and nminpoints are adapted such that when a group of minimum points are at most epsilon distance apart from each other's, the db-scan algorithm groups them into one cluster, and when there exist any points that are beyond the epsilon distance apart from any available clusters, the db-scan algorithm classifies them as the outliers, where the epsilon distance is a distance used to locate the points in the neighborhood of any point, and the nminpoints are the minimum number of points required to form a dense region.
In one embodiment, said eliminating the outliers comprises applying the db-scan) algorithm on the frequency features extracted from the PSG data acquired from the O1-A2 lead, with five frequency features at frequencies 2-4 Hz, 4-8 Hz, 8-16 Hz, and 16-32 Hz, respectively.
In one embodiment, said five frequency features are z-score normalized using the epsilon distance of 0.7 and the nminpoints of 15, where any outliers registered from the step are scored as a wake stage and discarded before moving on to the next step. It should be appreciated that other values of the epsilon distance and the nminpoints can also be utilized to practice the invention.
In one embodiment, said identifying the wake stage is performed with hierarchical clustering using a Ward's method, by starting with each point as a cluster of its own; merging two clusters that are the most similar into a new cluster; and repeating the staring and merging steps until there is only one cluster, where the Ward's method groups the clusters that minimized the variance.
In one embodiment, said identifying the wake stage is performed with three frequency features at frequencies 4-8 Hz, 8-16 Hz, and 16-32 Hz, respectively, extracted from the PSG data acquired from the O1-A2 lead, so as to differentiate awake from sleep.
In one embodiment, said identifying the N1 stage is performed by examining visually cluster groups of the N1 and N2 stages to determine if there are enough points in the N1 stage to classify it as a separated stage; and with insufficient number of points in the N1 stage, marking any transitional points between the wake stage to the N2 stage as the N1 stage.
In one embodiment, said identifying the REM and N2 stages is performed with hierarchical clustering using Ward's criteria with three frequency features at frequencies 2-4 Hz, 4-8 Hz, and 8-16 Hz, respectively, extracted from the PSG data acquired from the F3-A2 lead, so as to differentiate the REM and N2 stages.
In one embodiment, said identifying the N3 stage is performed with hierarchical clustering using Ward's criteria four frequency features at frequencies 0-1 Hz, 1-2 Hz, 2-4 Hz, and 4-8 Hz, respectively, extracted from the PSG data acquired from the F3-A2 lead, so as to differentiate stage N3 from the other sleep stages.
In one embodiment, said grouping step further comprises smoothing the sleep stages to increase reproducibility of the scoring, which eliminates any outliers that are 2 or less epochs outside of their surrounding neighbors.
In one embodiment, the method further comprises comparing scores of the sleep stages to that given by a professional; and calculating accuracy that is the number of true positive and true negative over the total number of observations, precision that is a ratio of correctly predicted positive observations to the total predicted positive observations, and sensitivity that is a ratio of correctly predicted positive observations to the all observations in actual class.
In another aspect, the invention relates to a system for scoring sleep stages of a mammal subject. The system includes one or more computing devices comprising one or more processors configured to perform the method for scoring sleep stages as disclosed above. Furthermore, the system also includes a non-transitory tangible computer-readable medium storing instructions which, when executed by the one or more processors, cause the one or more computing devices to perform the method for scoring sleep stages of a mammal subject, as disclosed above.
It should be noted that all or a part of the steps according to the embodiments of the present invention is implemented by hardware or a program instructing relevant hardware. Yet another aspect of the invention provides a non-transitory tangible computer-readable medium storing instructions which, when executed by one or more processors, cause a system to perform the method for scoring sleep stages of a mammal subject, as disclosed above. The computer executable instructions or program codes enable a computer or a similar computing system to complete various operations in the above disclosed method for privilege management. The storage medium/memory may include, but is not limited to, high-speed random access medium/memory such as DRAM, SRAM, DDR RAM or other random access solid state memory devices, and non-volatile memory such as one or more magnetic disk storage devices, optical disk storage devices, flash memory devices, or other non-volatile solid state storage devices.
These and other aspects of the present invention are further described below. Without intent to limit the scope of the invention, examples according to the embodiments of the present invention are given below. Note that titles or subtitles may be used in the examples for convenience of a reader, which in no way should limit the scope of the invention. Moreover, certain theories are proposed and disclosed herein; however, in no way they, whether they are right or wrong, should limit the scope of the invention so long as the invention is practiced according to the invention without regard for any particular theory or scheme of action.
In certain embodiments, the algorithm for the computer-based scoring of the sleep studies uses the CWT. The wavelet transform is a powerful method to analyze signals due to its ability to be both a time- and frequency-localized transformation. The transform was first conceived as a continuous transform, where a continuous wavelet (called the “mother wavelet”) is scaled and translated over the entire continuous signal, giving a continuous two-dimensional function of inner product values. In certain embodiments, the algorithm uses the “Morlet” mother wavelet. In the past, seizures (Ocak, 2009), sleep onset (Lee, Lee, & Chung, 2014), and sleep spindles (Al-Salman, Li, & Wen, 2019) have been predicted with the CWT.
In certain embodiments, each signal recorded with one lead was separated into epochs of 30 seconds without overlaps. Then, the CWT was applied onto each epoch using the Morlet mother wavelet. The resulting CWT coefficient magnitude was divided into six frequency bands, as shown in
Arousal Detection: Arousal or sudden movements produce outliers in the datasets, which potentially skew the clustering algorithm. To eliminate outliers, a density-based spatial clustering of applications with noise (db-scan) algorithm is used. The algorithm required two parameters: a neighboring value epsilon and a neighboring number nminpoints. If a group of minimum points are at most epsilon distance apart from each other's, then the algorithm groups them into one cluster. If there exist any points that are beyond epsilon distance apart from any available clusters, then the algorithm classifies them as outliers or noise. In certain embodiments, the db-scan is applied on the frequency features extracted from the O1-A2 lead, because the occipital leads are more susceptible to arousal. Five features 2-4 Hz, 4-8 Hz, 8-16 Hz, and 16-32 Hz are considered. These features were z-score normalized. An epsilon value of 0.7 and a nminpoints value of 15 were used. Any outliers registered from this step were scored as wake stage and discarded before moving on to the next step.
Wake-Sleep Identification: For wake-sleep stage identification, hierarchical clustering using Ward's method was used. The basic of hierarchical clustering was iterative: (1) start with each point as a cluster of its own. (2) Merge two clusters that are the most similar into a new cluster. (3) repeat (1) and (2) until there is only one cluster. The complexity comes from the metrics used to specified distance for merging. Ward's method groups the clusters that minimized the variance. This method worked best on clusters that followed an elliptical distribution when plotted on a multi-dimensional scatter plot. Furthermore, Ward suggested that the algorithm should be used on large (n>100) dataset, which the sleep epochs satisfy (n>700).
Only the O1-A2 lead was used for wake sleep stage identification. Three features 4-8 Hz, 8-16 Hz, and 16-32 Hz were used to differentiate awake from sleep. The data had outliers removed from the previous step in the arousal detection. The data was then log-normalized and then rescaled on a 0-1 scale. Calinski-Harabasz's method of cluster identification was used to provide the optimal amount of clusters present. Hierarchical clustering using Ward's method was used with the optimal clusters number as input. After completing the clustering by the computer, an individual examines the machine clustering visually through a scatterplot and can then decide and assign if the clusters belong to the sleep stages or the wake stage.
N1 Identification: In a healthy individual, stage N1 should take only 5% of the entire sleep stages. This stage has no clear features by which it can be identified and separated from other sleep stages. Therefore, it is hard to identify clusters within the N1 group. As a result, the cluster group N1 and N2 was examined visually to determine if there are enough points in stage N1 to classify it as a separated stage. With insufficient number of points in stage N1, any transitional points between wake stage to stage N2 was marked as stage N1.
REM and N2 Identification: Only the F3-A2 lead was used for REM and N2 identification. Three features 2-4 Hz, 4-8 Hz, and 8-16 Hz were used to differentiate stage REM and N2. The arousal, wake, and N3 stages identified from the previous step were removed. The data was log-normalized, but not rescaled. Hierarchical clustering using Ward's criteria was used for this step. However, the number of clusters was forced to two clusters. An individual who examines the machine clustering visually through a scatterplot can then assign the clusters to the REM or N2 sleep stages.
Stage N3 Identification: Only the F3-A2 lead was used for stage N3 identification. Four features 0-1 Hz, 1-2 Hz, 2-4 Hz, and 4-8 Hz were used to differentiate stage N3 from the other sleep stages. The arousal and wake sleep stages identified from the previous step were removed to improve the quality of the clustering algorithm. The data was log-normalized, but not rescaled. Hierarchical clustering using Ward's criteria was used for this step, similar to how Wake-Sleep was identified in the previous step. Calinski-Harabasz's method was used to provide the optimal amount of clusters present. This optimal number was used as the input to the clustering algorithm. An individual who examines the machine clustering visually through a scatterplot can then assign if the clusters belong to stage N3 or to the other sleep stages.
Smoothing Sleep Stages: Smoothing sleep stages is a method proposed by Liang et al. (Liang et al., 2012) to increase reproducibility of the scoring. Since sleep stages were often unchanged throughout the entire sleep, it appeared better to change “outlier” sleep stages to their proceeding sleep stage. An algorithm to smooth sleep stages was developed. This algorithm eliminates any outliers that are 2 or less epochs outside of their surrounding neighbors.
Comparison Metrics: After clustering, the scoring given by the computer was compared to the scoring given by a professional. Accuracy (the number of true positive and true negative over the total number of observations), precision (ratio of correctly predicted positive observations to the total predicted positive observations), and sensitivity (ratio of correctly predicted positive observations to the all observations in actual class) were calculated.
Subjects: The EEG dataset, which is pre-acquired and is publicly available online (https://sleeptight.isr.uc.pt/ISRUC_Sleep/) was used for this study. The recordings originate from 100 adult subjects with evidence for sleep disorders and 10 healthy subjects, which were used as a control group (
Data were acquired using a sampling rate of 200 Hz with 16-bit resolution. The filter settings of the cutoff frequencies were 0.5-30 Hz for EEG/EOG. In the original dataset, the last 25 minutes or 30 epochs of data were not included. Included with the database was the scoring given by two independent professionals for each patient. The professional scores used all the traces acquired during the PSG according to the AASM manual.
Existence of Clusters:
One observation was that more defined clusters of stages correlate well with a higher agreement among the scorers to distinguish between the sleep stages.
The scatterplot shown in
Wake-Sleep-N1 Detection: Table 2 shows the accuracy between wake and sleep stages for the 61 patients in the adult population with OSA, along with the scorers' agreements accuracy. Table 3 shows the same values for the 10 healthy individuals. A sleep stage smoothing algorithm was applied. Across all patients with OSA, the algorithm achieved a precision of 73.0±17.7% against scorer 1 and 76.5±17.0% against scorer 2; the algorithm achieved a sensitivity (recall) of 84.0±10.9% against scorer 1 and 82.5±11.5% against scorer 2. Across all healthy individuals, the algorithm achieved a precision of 71.3±16.9% against scorer 1 and 66.9±16.3% against scorer 2; the algorithm achieved a sensitivity (recall) of 86.6±7.1% against scorer 1 and 89.0±7.2% against scorer 2.
N2 Detection: Table 4 shows the accuracy of classifying REM stages for the 61 patients in the adult population with OSA, along with the scorers' agreements accuracy. Table 5 shows the same value for the 10 healthy individuals. A sleep stage smoothing algorithm was applied. Across all healthy individuals, the algorithm achieved a precision of 62.3±8.0% against scorer 1 and 67.3±9.1% against scorer 2; the algorithm achieved a sensitivity (recall) of 73.2±17.5% against scorer 1 and 73.7±17.6% against scorer 2.
N3 Detection: Table 6 shows the accuracy of classifying N3 stages for the 61 patients in the adult population with OSA, along with the scorers' agreements accuracy. Table 7 shows similar value for the 10 healthy individuals. A sleep stage smoothing algorithm was applied. Across all patients with OSA, the algorithm achieved a precision of 77.0±20.9% against scorer 1 and 76.5±21.4% against scorer 2; the algorithm achieved a sensitivity (recall) of 77.4±21.0% against scorer 1 and 79.2±22.4% against scorer 2. Across all healthy individuals, the algorithm achieved a precision of 87.3±8.0% against scorer 1 and 88.1±8.9% against scorer 2; the algorithm achieved a sensitivity (recall) of 78.6±14.7% against scorer 1 and 91.2+/−8.5% against scorer 2.
REM Detection: Table 8 shows the accuracy of classifying REM stages for the 61 patients in the adult population with OSA, along with the scorers' agreements accuracy. Table 9 shows the same value for the 10 healthy individuals. A sleep stage smoothing algorithm was applied. Across all patients with OSA, the algorithm achieved a precision of 66.7±12.2% against scorer 1 and 66.3±14.7% against scorer 2; the algorithm achieved a sensitivity (recall) of 69.6±15.8% against scorer 1 and 79.4±12.6% against scorer 2. Across all healthy individuals, the algorithm achieved a precision of 60.2±16.7% against scorer 1 and 67.3±17.4% against scorer 2; the algorithm achieved a sensitivity (recall) of 85.0±5.6% against scorer 1 and 84.8±6.7% against scorer 2.
Overall Accuracy: Table 10 shows the overall accuracy for all five stages for the 61 patients in the adult population with OSA, along with the scorers' agreements accuracy. Table 11 shows the same value for the 10 healthy individuals. Across all patients with OSA, the algorithm achieved an accuracy of 68.8±7.2% against scorer 1 and 69.5±7.4% against scorer 2. Across all healthy individuals, the algorithm achieved an accuracy of 69.0±6.0% against scorer 1 and 71.2±6.5% against scorer 2.
Sleep Stages, by Percentages: For clinical significance, one important factor is the percentage contribution of sleep stages to the overall sleep time. Table 12 shows the five-stage percentage contribution for the 61 patients in the adult population with OSA, along with the scorers' agreements accuracy. Table 13 shows the same value for the 10 healthy individuals.
Sleep Stages, by Time: When grading sleep stages, professional use the knowledge of the previous sleep stages to infer on the current sleep stage (Berry et al., 2013).
Selection of Features: The AASM recommends that to score sleep stages accurately, EEG leads O1-A2, C3-A2, and Fp1-A2 along with one EOG lead and one chin EMG are needed. In contrary to the recommendation, we show and suggest that only two EEG leads are sufficient for classifying sleep stages. In one embodiment, it began by extracting the EEG signal in the frontal lead (F3-A2) and the occipital lead (O1-A2). These signals are divided into 30-second epochs, the time stated by the AASM to score sleep stages in. For each epoch, we applied the CWT on the EEG signal, then sum up the coefficients within frequency bands to extract the features. In total, six features are extracted from each epoch. Since there are two leads, each epoch has twelve features extracted in total. Typically, approaches for computer algorithms used in sleep staging use either many features or very few features. While using too little features can fail to infer the actual sleep stages, using too much features can make the system prone to overfitting. Further research to explore the effect and optimize the use of less features may be needed, as they can significantly reduce the computing time and computing power, especially when considering that the purpose of the algorithm is to replace human scorers in term of time and cost.
Choice of Wavelets: The Morlet mother wavelet is a very common wavelet choice for the CWT and is available for implementation in both Python and MATLAB. However, we theorize that the shape of the Morlet mother wavelet means that only certain sleep stages are more likely to be classified correctly than others. To understand this, recall that CWT is a series of sliding and scaling the mother wavelet over a one-dimensional signal to produce coefficients. If the mother wavelet is similar to the features within the signal, then the coefficient is high. The shape of the Morlet mother wavelet is most similar to the shape of the delta and alpha waves, which means stages N3 and W are more likely to be classified correctly compared to other stages. Therefore, a direction with which to take our research would be to derive custom mother wavelets that can better classify stages N1, N2, and REM.
Unsupervised Learning: Most existing methods of sleep stages classification are supervised using trained datasets from professionals. However, the trained datasets suffer a selection bias. It is consistently shown that human professionals have low intra- and inter-patient reliability. As such, using professionals as standard for training can lead to flawed machine-learning systems. Hence, the invention develops new methods that can automatically learn the number of different sleep stages and assign which stages correspond to the actual AASM classification. This observation that unsupervised learning is possibly comes from visual examination of the features scatterplot.
Replacement of Human Scorer:
The definite advantage of the algorithm has over the human scorer is that the algorithm is replicable over different machine configurations. The result section shows that across all 61 OSA patients and 10 healthy individuals, two professionals scoring the same sleep EEG will only agree with others 81±5% of the time. If the same algorithm were running on two different machines and score the same dataset, they would arrive at the same result, 100% of the time. Since the algorithm is under-performing compared to the professionals, we recommend the result of this algorithm be verified by at least one professional still.
In sum, aspects of the invention have demonstrated a novel method/algorithm of classifying sleep stages using the wavelet transform as the means of feature extraction and clustering as the means of classification. The algorithm performed the best when classifying stages W, N3, and REM. It performed the worst when classifying stages N1 and N2. The algorithm, while not performing as well as its human counterpart, nevertheless is very capable and replicable across different machines. This work produced promising results in replacing at least one scorer, and will be able to replace both scorers in the future.
The foregoing description of the exemplary embodiments of the invention has been presented only for the purposes of illustration and description and is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Many modifications and variations are possible in light of the above teaching.
The embodiments were chosen and described in order to explain the principles of the invention and their practical application so as to enable others skilled in the art to utilize the invention and various embodiments and with various modifications as are suited to the particular use contemplated. Alternative embodiments will become apparent to those skilled in the art to which the present invention pertains without departing from its spirit and scope. Accordingly, the scope of the present invention is defined by the appended claims rather than the foregoing description and the exemplary embodiments described therein.
Some references, which may include patents, patent applications and various publications, are cited and discussed in the description of this invention. The citation and/or discussion of such references is provided merely to clarify the description of the present invention and is not an admission that any such reference is “prior art” to the invention described herein. All references cited and discussed in this specification are incorporated herein by reference in their entireties and to the same extent as if each reference was individually incorporated by reference.
This application claims priority to and the benefit of U.S. provisional patent application Ser. No. 62/938,999, filed Nov. 22, 2019, which is incorporated herein in its entirety by reference.
This invention was made with government support under HL119810 awarded by the National Institutes of Health. The government has certain rights in the invention.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/US2020/061739 | 11/23/2020 | WO |
Number | Date | Country | |
---|---|---|---|
62938999 | Nov 2019 | US |