Method of preparing training data for use in training a health event identification machine-learning model

GB2606700BActive Publication Date: 2025-02-19PREVAYL INNOVATIONS LIMITED
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
GB2021005697
Authority / Receiving Office
GB · GB
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-04-21
Publication Date
2025-02-19
Estimated Expiration
2041-04-21

Smart Images

  • Figure 00000001_0000
    Figure 00000001_0000
  • Figure 00000001_0001
    Figure 00000001_0001
  • Figure 00000002_0000
    Figure 00000002_0000
Patent Text Reader

Abstract

Training data for use in training a health event identification machine learning model for identifying a health event in a cardiac signal, such as atrial or ventricular fibrillation, includes obtainin
Need to check novelty before this filing date? Find Prior Art

Description

The present invention is directed towards a method and system for preparing training data for use in training a health event identification machine-learning model, along with the subsequent training of the model using the training data, and the use of the model to identify a health event in a cardiac signal. Background Cardiac activity sensing is widely used by health professionals to identify health events for the subject under measurement. Health events may indicate that the heart of the subject under measurement is acting abnormally which may in turn indicate that the subject is at risk of morbidity and adverse outcomes such as a stroke and heart failure. Some example health events that may be identified from cardiac activity sensing include cardiac arrhythmias, coronary heart disease, heart attacks and cardiomyopathy. All of these conditions can be considered as cardiac anomalies. Cardiac arrhythmia refers to a group of conditions indicated by irregular or unusual cardiac activity. This can include an irregular heartbeat and / or a heartbeat that is too fast / slow. Atrial fibrillation (AF) is the most common type of cardiac arrhythmia and is found in 1-2% of the general population. Zoni-Berisso M, Lercari F, CarazzaT, Domenicucci S. Epidemiology of atrial fibrillation: European perspective. Clin Epidemiol. 2014;6:213-220. Published 2014 Jun 16. doi:10.2147 / CLEP.S47385. AF can be effectively treated if identified in a subject. Treatments include medications, surgery and the use of implantable devices such as pacemakers. Other types of cardiac arrhythmia include atrial flutter, tachycardia, bradycardia, heart block and ventricular fibrillation. A common method for sensing cardiac activity is to place electrodes in contact with the skin of the subject and record electrocardiography (ECG) signals. The electrodes may be incorporated into a wearable device such as a garment. ECG sensing is used to provide a plethora of information about a person’s heart. It is one of the simplest and oldest techniques used to perform cardiac investigations. In its most basic form, it provides an insight into the electrical activity generated within heart muscles that changes over time. By detecting and amplifying these differential biopotential signals, a lot of information can be gathered quickly, including the heartrate. Among professional medical staff, individual signals have names such as “the QRS complex,” which is the largest part of an ECG signal and is a collection of Q, R, and S signals, including the P and T waves. Typically, the detected ECG signals can be displayed as a trace to a user for information. The user may be a clinician who is looking to assess cardiac health or may be a lay user using the electronics module as a fitness or health and wellness assessment device. A typical ECG waveform or trace is illustrated in Figure 1 showing the QRS complex. Figure 2 shows an ECG waveform of two successive heartbeats. The time difference between the two R peaks in the ECG waveform is the inter-beat interval (IBI) also known as the R-R interval. This time is usually expressed in milliseconds. IBI values represent the time between successive heartbeats. Machine-learning systems have been deployed to aid a health care professional in the identification of health events such as cardiac arrhythmias from a cardiac signal. Machine-learning systems are typically implemented as computer programs run on one or more computers. The computers may all be located at a common location or may be distributed across different locations. Figure 3 shows such an example machine-learning system 1. The machine-learning system 1 comprises a machine-learning model 2 that receives a machine-learning input 3 at each of a plurality of time steps and generates a machine-learning output 4. The machine-learning output 4 identifies whether a health event is present in a cardiac signal and typically provides a classification of the input cardiac signal. The classification may be for example as “normal” or “indicating cardiac arrhythmia” if cardiac arrhythmia identification is being performed. If the machine-learning system 1 identifies a health event in the cardiac signal, the subject may be referred to a health care professional for a medical diagnosis and, if appropriate, medical intervention. US 2020 / 0352461 A1 discloses a recurrent neural network (RNN) architecture-based classification of atrial fibrillation using single lead ECG. The RNN architecture comprises two long short-term memory (LSTM) networks arranged in parallel. The outputs from the two LSTM networks are merged at a dense layer along with a set of hand-crafted statistical features to create a composite feature set for classification of atrial fibrillation. Another existing machine-learning model 2 used in a machine-learning system 1 for identifying health events in a cardiac signal is shown in Figure 4. The machine-learning model 2 includes an input layer 8 which outputs to a convolutional neural network 5. The convolutional neural network 5 comprises two convolutional neural network layers 9, 11 which are both followed by a maximum (max) pooling layer 10,12. The max pooling layers 10,12 perform a form of non-linear down-sampling of the outputs from the convolutional neural network layers 9,11. Max pooling is commonly used to down-sample the outputs of convolutional network layers 9, 11. The convolutional neural network 5 outputs to a recurrent neural network 6. The recurrent neural network 6 comprises a pair of stacked bidirectional long short-term memory (LSTM) layers 13, 14. The recurrent neural network 6 outputs to classification layers 7. The classification layers 7 are configured to process the output from the recurrent neural network 6 and generate an output representing whether a health event has been identified in the cardiac signal. In effect, the classification layers 7 act to sum up the outputs from the recurrent neural network 6 into a classification. The classification layers 7 include, in sequence, a flatten layer 15, a dense layer 16, a dropout layer 17, a batch normalization layer 18, and a final dense layer 19. The function and structure of the flatten, dense, dropout and batch normalization layers 15,16, 17,18, 19 are known to the skilled person and a detailed explanation is omitted. Figure 5 shows a more detailed view of the recurrent neural network 6. Each bidirectional LSTM layer 13, 14 includes two independent LSTM layers 20, 21. One of the LSTM layers 20 operates in the positive time direction and the other of the LSTM layers 21 operate in the negative time direction. Bidirectional LSTMs allow the recurrent neural network to have both backward and forward information about the sequence at every time step. Each LSTM layer includes a number of LSTM cells 22. The machine-learning model 2 has been claimed to achieve an accuracy of at best 96% in identifying atrial fibrillation when trained on the MIT-BIH Atrial Fibrillation Database (https: / / phvsionet.orq / co ntent / afdb / 1.0.0 / ) and tested on test data samples extracted from this database. The database includes 25 individual ECG recordings of human subjects with atrial fibrillation each of 10 hours duration. The individual recordings contain two ECG signals each sample at 250 samples per second with 12-bit resolution over a range of ±10 millivolts. The ECG signals were manually annotated with the following annotations AFIB (atrial fibrillation), AFL (atrial flutter), J (AV junctional rhythm), and N (used to indicate all other rhythms). Along with the annotations an annotation sample index is provided which indicates the sample in the ECG signal that the annotation relates to. It is an object of the present disclosure to improve the performance of machine-learning models for identifying health events in a cardiac signal. The health events may be cardiac anomalies such as cardiac arrhythmia. Summary According to the present disclosure there is provided a method and system as set forth in the appended claims. Other features of the invention will be apparent from the dependent claims, and the description which follows. According to a first aspect of the disclosure, there is provided a computer-implemented method of preparing training data for use in training a health event identification machine-learning model for identifying a health event in a cardiac signal. The method comprises (a) obtaining a cardiac signal for a subject, the cardiac signal comprising a temporal sequence of cardiac activity values each representative of the activity of the heart of the subject at a time step. The method comprises (b) obtaining at least one data label for the cardiac signal, the data label comprising an annotation identifying the presence or absence of a health event in the cardiac signal and an annotation index indicating the cardiac activity value associated with the annotation. The method comprises (c) generating at least one first dataset from the cardiac signal, the first dataset comprising a cardiac activity value indicated by the annotation index, a number R of cardiac activity values occurring before the annotation index and a number S of cardiac activity values occurring after the annotation index. The method comprises (d) applying an offset value to the annotation index to form a shifted annotation index. The method comprises (e) generating a second dataset from the cardiac signal, the second dataset comprising a cardiac activity value indicated by the shifted annotation index, R cardiac activity values occurring before the shifted annotation index and S cardiac activity values occurring afterthe shifted annotation index, wherein one of the R or S cardiac activity values is the cardiac activity value indicated by the annotation index associated with the shifted annotation index. The method comprises (f) forming the training data, the training data comprising a plurality of training input sequences and, for each training input sequence, a target output, wherein the training input sequences comprise the first and second datasets, and wherein target outputs comprise the respective annotations associated with the first and second datasets. The method uses an offset value to generate a second dataset from the cardiac signal. The second dataset contains the cardiac activity value indicated by the annotation index but the position of the cardiac activity value is shifted within the second dataset when compared to the first dataset. For example, a cardiac activity value may be located at index 250 in the first dataset but is located at index 250 - offset value in the corresponding second dataset. In preferred examples, a number of different offset values are used to generate a number of datasets from the cardiac signal. Advantageously, this means that, in the training phase, the machine-learning model is not sensitive to the particular location of the cardiac activity value associated with the annotation in each of the datasets. This makes the trained machine-learned model more robust to variations in the location of the health event in the cardiac signal. This is particularly the case when the dataset comprises cardiac activity values for multiple heartrates. This improves the performance of the trained machine-learned model in identifying health events in a cardiac signal. In more detail, using the offset value, enables the health event identification machine-learning model to be better at detecting what is interesting in the datasets even if multiple heart rates are represented. For example, the first data set may comprise three heartbeats with the centre heartbeat being annotated as indicating AFIB (i.e. [normal, AFIB, normal]). The second dataset may also comprise three heartbeats but the location of the heartbeat annotated as AFIB has been shifted (e.g. [AFIB, normal, normal]). By presenting both datasets (and optional additional datasets using different offset values), the health event identification machine-learning model is able to better detect the features of interest in the datasets associated with AFIB as it is not sensitive to the locations of the peaks within the data sets. The offset value may be a positive value such that the shifted annotation index has a higher value than its associated annotation index. The offset value may be less than S. The offset value may be a negative value such that the shifted annotation index has a lower value than its associated annotation index. The magnitude of the offset value may be less than R. The offset value may be an integer value. The offset value may be a random integer value having a value between 1 and S or 1 and R. The offset value may be a positive or negative integer value having a magnitude between 1 and S or R, optionally between 10 and S or R, optionally between 20 and S or R, optionally between 30 and S or R, optionally between 40 and S or R, optionally between 50 and S or R. The offset value may be a random integer value such as a random integer value having a magnitude with the ranges mentioned in the preceding sentence. R may equal S or may be approximately equal to S. This means that a cardiac activity value indicated by the annotation index is at the centre (or approximate centre) of the first dataset. R may be different to S. This means that the cardiac activity value is not located in the centre of the first dataset. Each of the first and second datasets may comprise a number Q of cardiac activity values where Q = R+S+1. The method may comprise repeating steps (d) and (e) using different offset values to form at least one additional dataset from the cardiac signal. The additional dataset may be added to the training data along with its respective annotation to provide an additional training set for use in training the machine-learning model. The cardiac activity values may be electrical values. The cardiac activity values may be voltage values. The cardiac activity values may be obtained from an electrocardiography signal measured from the subject. The method may further comprise applying noise to at least one of the first and second datasets to form at least one third dataset. The training input sequences may further comprise the third dataset. The target outputs may further comprise the annotation associated with the third dataset. Advantageously, additional datasets may be obtained from the first and second datasets with added noise. Noisy signals may be generated particularly when the cardiac signals are not obtained in a clinical setting. For example, the cardiac signals may be recorded using electrodes incorporated into wearable articles. Such electrodes are typically ‘dry’ electrodes which do not use a conductive gel medium for adhering the electrode to the skin. With such noisy signals it can be challenging to easily identify the target components in the cardiac signal. Moreover, such wearable articles are typically worn when the subject performs activities which contrasts to a clinical setting where the subject is typically stationary. This can introduce motion artefacts into the cardiac activity values. Providing additional noisy datasets in the training phase makes the trained machine-learned model more robust in classifying noisy signals. Step (b) may comprise obtaining a plurality of data labels for the cardiac signal. Each of the data labels comprising an annotation and an annotation index. Step (c) may comprise generating a first plurality of datasets. Each of the first plurality of datasets comprises a cardiac activity value indicated by one of the annotation indexes. Step (d) may comprise applying an offset value to the annotation indexes to form a plurality of shifted annotation indexes. Step (e) may comprise generating a second plurality of datasets. Each of the second plurality of datasets comprises a cardiac activity value indicated by one of the shifted annotation indexes. According to a second aspect of the disclosure, there is provided a computer-implemented method of training a health event identification machine-learning model for identifying a health event in a cardiac signal. The method comprises: obtaining training data prepared according to the method of the first aspect of the disclosure; and training the health event identification machine-learning model on the training data. The health event identification machine-learning model may comprise a convolutional neural network comprising one or more convolutional neural network layers. The convolution neural network may comprise three convolutional neural network layers. The use of two convolution neural network layers is conventional pattern detection in onedimensional signals such as cardiac signals. Advantageously, the third convolution neural network adds spatial invariance to the position of the peaks in the datasets which strengthens the peak detection window. In more detail, a convolutional neural network layer acts to apply a filter on each part of the input data and return the dot product of the data and the filter. In effect, the convolutional neural network layer identifies the shape found in the signal. Adding the second and the third convolutional neural network layers enable the detected shapes to be more complex. In this example, the first layer identifies where the future shapes will be, and the second and third layers are be able to perform a ‘normal’ convolutional product as if all the signal was centred around the interesting peak. At least one of the convolutional neural network layers may be followed by a batch normalization layer. The batch normalization layer performs a function that sums up the output from all of the N signals in the batch by normalising the output based on the standard deviation and average of all N signals. The batch normalisation layer helps the training optimiser to go in the right direction when determining the best node weights. The batch normalization layer may be followed by a linear activation function layer. The liner activation function layer may comprise a rectified linear activation function layer (ReLU). The ReLU may be a leaky ReLU. Advantageously, the use of a linear activation function layer improves the performance of the machine-learned model as compared to other approaches such as max pooling layers. In addition, the use of a linear activation function, and in particular a ReLU, following the batch normalization layer improves the time invariance of the model. The health event identification machine-learning model may further comprise a recurrent neural network arranged to receive a neural network output from the convolutional neural network. The recurrent neural network may comprise a bidirectional recurrent neural network layer. The recurrent neural network may comprise a first long short-term memory, LSTM, layer. The first LSTM layer may be a bidirectional LSTM layer. The recurrent neural network may comprise a second long short-term memory, LSTM, layer. The second LSTM layer may be a bidirectional LSTM layer. The first LSTM layer and the second LSTM layer may each be one or a plurality of LSTM layers in an ordered stack of layers. The first LSTM layer may be lower in the stack than the second LSTM layer. The health event may be a cardiac anomaly. The health event may be a cardiac arrhythmia. The cardiac arrhythmia may be atrial fibrillation. The health event identification machine-learning model may further comprise one or more classification layers arranged to receive a neural network output from the recurrent neural network. The one or more classification layers may comprise a flatten layer. The one or more classification layers may comprise a dense layer. The one or more classification layers may comprise a dropout layer. The one or more classification layers may comprise a batch normalization layer. The one or more classification layers may comprise a further dense layer. According to a third aspect of the disclosure, there is provided a computer-implemented method of identifying a health event in a cardiac signal. The method comprises obtaining a health-event identification machine-learning model trained according to the method of the second aspect of the disclosure. The method comprises obtaining a cardiac signal for a subject, the cardiac signal comprising a temporal sequence of cardiac activity values each representative of the activity of the heart of the subject at a time step. The method comprises processing, using the health-event identification machine-learning model, the cardiac signal to generate data that represents the presence or absence of the healthevent in the cardiac signal. According to a fourth aspect of the disclosure, there is provided a computer readable medium having instructions recorded thereon which, when executed by a computer apparatus, is operable to cause the computer apparatus to perform the method of any previous aspect of the disclosure. According to a fifth aspect of the disclosure, there is provided an apparatus comprising: a processor; and a memory having instructions stored thereon that, when executed by the processing device, cause the processing device to perform the method of any previous aspect of the disclosure. The processing device may be operatively connected to a cardiac sensor. The cardiac sensor may be incorporated into a wearable article. In the above examples of the present disclosure, the cardiac signal may be an electrocardiogram, ECG, signal but this is not required in all examples and other signals indicative of the cardiac activity are within the scope of the present disclosure. Other signals indicative of the cardiac activity include photoplethysmography (PPG) signals, ballistocardiogram (BCG) signals, and electromagnetic cardiogram (EMCG) signals. Brief Description of the Drawings Examples of the present disclosure will now be described with reference to the accompanying drawings, in which: Figure 1 illustrates a signal trace for an ECG signal; Figure 2 illustrates an ECG waveform that includes two successive heartbeats; Figure 3 shows an example machine-learning system; Figure 4 shows an example known health event identification machine-learning model; Figure 5 shows a detailed view of the recurrent neural network in the health event identification machine-learning model shown in Figure 4; Figure 6 shows a method of preparing training data according to the first aspect of the present disclosure; Figure 7 shows a plot of a cardiac signal for a subject; Figures 8 and 9 show plots of first datasets obtained from the cardiac signal shown in Figure 7; Figures 10 and 11 show plots of second datasets obtained from the cardiac signal shown in Figure 7; Figure 12 shows a method of training a health event identification machine-learning model according to the second aspect of the disclosure; Figures 13A-13B show an example health event identification machine-learning model used in the second aspect of the disclosure; Figure 14 shows a method of identifying a health event in a cardiac signal according to the third aspect of the disclosure; Figure 15 shows a schematic diagram for an example system according to aspects of the present disclosure; Figure 16 shows a schematic diagram for an example electronics module according to aspects of the present disclosure; Figure 17 shows a schematic diagram for another example electronics module according to aspects of the present disclosure; Figure 18 shows a schematic diagram for an example analogue-to-digital converter used in the example electronics module of Figures 16 and 17 according to aspects of the present disclosure; and Figure 19 shows a schematic diagram of the components of an example user electronics device according to aspects of the present disclosure. Detailed Description The following description with reference to the accompanying drawings is provided to assist in a comprehensive understanding of various embodiments of the disclosure as defined by the claims and their equivalents. It includes various specific details to assist in that understanding but these are to be regarded as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the various embodiments described herein can be made without departing from the scope and spirit of the disclosure. In addition, descriptions of well-known functions and constructions may be omitted for clarity and conciseness. The terms and words used in the following description and claims are not limited to the bibliographical meanings but are merely used by the inventor to enable a clear and consistent understanding of the disclosure. Accordingly, it should be apparent to those skilled in the art that the following description of various embodiments of the disclosure is provided for illustration purpose only and not for the purpose of limiting the disclosure as defined by the appended claims and their equivalents. It is to be understood that the singular forms “a,” “an,” and “the” include plural referents unless the context clearly dictates otherwise. “Wearable article” as referred to throughout the present disclosure may refer to any form of article which may be worn by a user such as a smart watch, necklace, garment, bracelet, or glasses. The wearable article may be a textile article. The wearable article may be a garment. The garment may refer to an item of clothing or apparel. The garment may be a top. The top may be a shirt, t-shirt, blouse, sweater, jacket / coat, or vest. The garment may be a dress, garment brassiere, shorts, pants, arm or leg sleeve, vest, jacket / coat, glove, armband, underwear, headband, hat / cap, collar, wristband, stocking, sock, or shoe, athletic clothing, personal protective equipment, including hard hats, swimwear, wetsuit or dry suit. The term “wearer” includes a user who is wearing, or otherwise holding, the wearable article. The type of wearable garment may dictate the type of biosignals to be detected. For example, a hat or cap may be used to detect electroencephalogram or magnetoencephalogram signals. The wearable article / garment may be constructed from a woven or a non-woven material. The wearable article / garment may be constructed from natural fibres, synthetic fibres, or a natural fibre blended with one or more other materials which can be natural or synthetic. The yam may be cotton. The cotton may be blended with polyester and / or viscose and / or polyamide according to the application. Silk may also be used as the natural fibre. Cellulose, wool, hemp and jute are also natural fibres that may be used in the wearable article / garment. Polyester, polycotton, nylon and viscose are synthetic fibres that may be used in the wearable article / garment. The garment may be a tight-fitting garment. Beneficially, a tight-fitting garment helps ensure that the sensor devices of the garment are held in contact with or in the proximity of a skin surface of the wearer. The garment may be a compression garment. The garment may be an athletic garment such as an elastomeric athletic garment. The garment has sensing units provided on an inside surface which are held in close proximity to a skin surface of a wearer wearing the garment. This enables the sensing units to measure biosignals for the wearer wearing the garment. The sensing units may be arranged to measure one or more biosignals of a wearer wearing the garment. “Biosignal” as referred to throughout the present disclosure may refer to signals from living beings that can be continually measured or monitored. Biosignals may be electrical or nonelectrical signals. Signal variations can be time variant or spatially variant. Sensing components may be used for measuring one or a combination of bioelectrical, bioimpedance, biochemical, biomechanical, bioacoustics, biooptical or biothermal signals of the wearer. The bioelectrical measurements include electrocardiograms (ECG), electrogastrograms (EGG), electroencephalograms (EEG), and electromyography (EMG). The bioimpedance measurements include plethysmography (e.g., for respiration), body composition (e.g., hydration, fat, etc.), and electroimpedance tomography (EIT). The biomagnetic measurements include magnetoneurograms (MNG), magnetoencephalography (MEG), magnetogastrogram (MGG), magnetocardiogram (MCG). The biochemical measurements include glucose / lactose measurements which may be performed using chemical analysis of the wearer 600’s sweat. The biomechanical measurements include blood pressure. The bioacoustics measurements include phonocardiograms (PCG). The biooptical measurements include orthopantomogram (OPG). The biothermal measurements include skin temperature and core body temperature measurements. Referring to Figure 6, there is shown a flow diagram for an example method of preparing training data for use in training a health event identification machine-learning model for identifying a health event in a cardiac signal according to the first aspect of the disclosure. Step S101 comprises obtaining a cardiac signal for a subject, the cardiac signal comprising a temporal sequence of cardiac activity values each representative of the activity of the heart of the subject at a time step. Figure 7 shows a plot of an excerpt of a cardiac signal. The excerpt comprises 5000 time steps (horizontal axis) of cardiac activity values (vertical axis). The cardiac activity values are voltage values having an amplitude of between 1.5 mV and -2 mV as derived from ECG signal measurement of the subject. Of course, other ECG signals may have values within different voltage ranges. Step S102 comprises obtaining a plurality of data labels for the cardiac signal, each of the data labels comprising an annotation identifying the presence or absence of a health event in the cardiac signal and an annotation index indicating the cardiac activity value associated with the annotation. In the example of Figure 7, the cardiac signal excerpt is associated with two data labels (A), (B). The data label (A) identifies a cardiac activity value with a timestep of approximately 420 and has annotation “AFIB” indicating that the heartbeats in the vicinity of the cardiac activity value are associated with atrial fibrillation. The data label (B) identifies a cardiac activity value with a timestep of approximately 3700 and has annotation “N” indicating that the heartbeats in the vicinity of the cardiac activity value are associated with normal heartbeat activity. Step S103 comprises generating a first plurality of datasets from the cardiac signal. Each of the first plurality of datasets comprises a number Q of cardiac activity values. In particular, each of the first plurality of datasets comprises a cardiac activity value indicated by one of the annotation indexes, a number R of cardiac activity values occurring before the annotation index and a number S of cardiac activity values occurring after the annotation index. Figure 8 shows a first dataset obtained for the first data label (A) associated with the cardiac signal excerpt in Figure 7. The data set comprises 500 cardiac activity values. The dataset is centred on the cardiac activity indicated by the annotation index for data label A which is represented by the vertical line A in the centre of the plot. There are 250 cardiac activity values occurring before and 249 cardiac activity values occurring after the cardiac activity indicated by the annotation index for data label A. Figure 9 shows a first dataset obtained for the second data label (B) associated with the cardiac signal excerpt in Figure 7. The data set comprises 500 cardiac activity values. The dataset is centred on the cardiac activity value indicated by the annotation index for data label B which is represented by the vertical line B in the centre of the plot. There are 250 cardiac activity values occurring before and 249 cardiac activity values occurring after the cardiac activity indicated by the annotation index for data label B. Step S104 comprises applying an offset value to the annotation indexes to form a plurality of shifted annotation indexes. The offset value may decrease or increase the annotation index. In preferred examples, the offset value increases the annotation index. This means that the shifted annotation index is greater than the original annotation index and has the effect of shifting the cardiac activity value associated with the annotation to the left when used to generate the second plurality of datasets as explained in step S105. The offset value may be a random integer value having a magnitude less than S, the number of cardiac activity values occurring after the annotation index in the corresponding first plurality of datasets. For example, if the first plurality of datasets are centred on the cardiac activity value indicated by the annotation index and have 249 cardiac activity values occurring afterthe cardiac activity value indicated by the annotation index, then the offset value may be a random integer value between 1 and 249 (i.e. between 1 and S). In some examples, the offset value may be a random integer between 10 and S, 20 and S, 30 and S, 40 and S, 50 and S, or 60 and S. The present disclosure is not limited to any particular offset values. Step S105 comprises generating a second plurality of datasets from the cardiac signal. Each of the second plurality of datasets comprises Q cardiac activity values. Each of the second plurality of datasets comprises a cardiac activity value indicated by one of the shifted annotation indexes, R cardiac activity values occurring before the shifted annotation index and S cardiac activity values occurring after the shifted annotation index. One of the R or S cardiac activity values is the cardiac activity value indicated by the annotation index associated with the shifted annotation index. This means that the cardiac activity values labelled by the annotations are retained in the second plurality of datasets. Figure 10 shows a second dataset obtained for the first data label (A) associated with the cardiac signal excerpt in Figure 7. The data set comprises 500 cardiac activity values. Unlike the corresponding first dataset shown in Figure 8, the dataset is not centred on the cardiac activity value indicated by the annotation index for data label A (represented by the vertical line A). Instead, the dataset is centred on the shifted annotation index. The cardiac activity value indicated by the annotation index for data label A is shifted to the left. Figure 11 shows a dataset obtained for the second data label (B) associated with the cardiac signal excerpt in Figure 7. The data set comprises 500 cardiac activity values. Unlike the corresponding first dataset shown in Figure 9, the dataset is not centred on the cardiac activity value indicated by the annotation index for data label B (represented by the vertical line B). Instead, the dataset is centred on the shifted annotation index. The cardiac activity value indicated by the annotation index for data label B is shifted to the left. Step S106 comprises forming the training data, the training data comprising a plurality of training input sequences and, for each training input sequence, a target output, wherein the training input sequences comprise the first and second plurality of datasets, and wherein target outputs comprise the respective annotations associated with the first and second plurality of datasets. In the above example, the cardiac signal has a plurality of data labels, and a corresponding first plurality and second plurality of datasets are generated. This is not required in all examples. The cardiac signal may only have one data label, which means that one first dataset and one second dataset are generated. In some examples, additional offset values may be applied to generate further datasets from the cardiac signal. Moreover, in some examples, noise may be applied to the first and / or second plurality of datasets to generate additional, noisy, datasets. The present disclosure is not limited to any particular number of generated datasets. In one example, four offset values may be used such that a first dataset is generated without an offset value, and a further four datasets are generated with applied offset values. Three noisy duplicates may then be generated for each of the datasets to generate, in total, fifteen different datasets from the cardiac signal. Each of the fifteen datasets may comprise a plurality of datasets (based on the number of data labels for the cardiac signal) as explained above. Additional datasets may be generated for different cardiac signals obtained from the same or different subjects which may in turn be added to the training data along with their respective annotations. Referring to Figure 12, there is shown a method of training a health event identification machinelearning model for identifying a health event in a cardiac signal according to the second aspect of the disclosure. Step S101 comprises obtaining training data prepared according to the method of the first aspect of the disclosure represented by Figures 6 to 11. Step S102 comprises training the health event identification machine-learning model on the training data. Referring to Figures 13A-13B there is shown an example health event identification machinelearning model 30 according to aspects of the present disclosure. The health event identification machine-learning model 30 comprises an input layer followed by a convolutional neural network 42, a recurrent neural network 43, and a series of classification layers 44. The convolutional neural network 42 comprises three one-dimensional convolution neural network layers 45, 48, 51. Each of the convolutional neural network layers is followed by a batch normalization layer 46, 49, 52 and a linear activation function 47, 50, 53. In preferred examples, a leaky ReLU is used as the linear activation function. The recurrent neural network 43 comprises a stacked arrangement of bidirectional LSTM layers 54, 55. The stacked arrangement comprises a first bidirectional LSTM layer 54 that outputs to the second bidirectional LSTM layer 55. The classification layers comprise a flatten layer 56, a dense layer 57, a batch normalization layer 58, and a further dense layer 59. The present disclosure is not limited to the machine-learning model architecture shown in Figures 13A and 13B. Generally, it is preferred to include three convolutional neural network layers 45, 48, 51 layers in the convolution neural network 42, but other layers such as max pooling may be used instead of the linear activation functions 47, 50, 51. Moreover, the particular recurrent neural network structure 43 is not required. Other recurrent neural network layers may be used instead of the stacked bidirectional LSTMs 54, 55. Moreover, it is not required in all examples that a recurrent neural network 43 follows the convolutional neural network 42. Other forms of machine-learning model architecture may be used after the convolutional neural network 42. The classification layers 44 may include other layers as known in the art and are not required to use the particular layers shown. For example, the classification layers 44 may comprise a soft-max layer. When trained on the MIT-BIH Atrial Fibrillation Database using the data preparation method of the first aspect of the disclosure, the health event identification machine-learning model was able to achieve an accuracy of 99.6% in detecting the presence of atrial fibrillation in a cardiac signal when using test data obtained from the same database. An accuracy of around 95% was achieved when using test data that included original data from the database along with noisy and shifted versions of the data generated using the approaches described above. This is reflective of the accuracy of the trained model when deployed on cardiac signals obtained in a non-clinical setting and without using manual, human-led, identification of peaks in the signal. Referring to Figure 14, there is shown a method of identifying a health event in a cardiac signal. Step S301 comprises obtaining a health-event identification machine-learning model trained according to the method of the second aspect of the disclosure represented by Figures 12 to 13B. Step S302 comprises obtaining a cardiac signal for a subject, the cardiac signal comprising a temporal sequence of cardiac activity values each representative of the activity of the heart of the subject at a time step. Step S303 comprises processing, using the health-event identification machine-learning model, the cardiac signal to generate data that represents the presence or absence of the health-event in the cardiac signal. A peak detection process may be performed to identify peaks characteristic of heartbeats in the cardiac signal. Peak detection algorithms are known in the art. Example peak algorithms include the Pan Tomkins algorithm as described in Pan, Jiapu; Tompkins, Willis J. (March 1985). "A Real-Time QRS Detection Algorithm". IEEE Transactions on Biomedical Engineering. BME-32 (3): 230-236. Other example peak detection algorithms use operations such as wavelet transforms. Another example algorithm for peak detection is the REWARD algorithm as described in Orlandic L, Giovanni E, Arza A, Yazdani S, Vesin JM, Atienza D. “REWARD: Design, Optimization, and Evaluation of a Real-Time Relative-Energy Wearable R-Peak Detection Algorithm.” Annu Int Conf IEEE Eng Med Biol Soc. 2019 Jul; 2019:3341-3347. doi: 10.1109 / EMBC.2019.8857226. PMID: 31946597. This algorithm uses a hysteresis comparator to identify possible peaks. The algorithm detects segments in the signal in which the signal goes above an upper threshold and subsequently below a lower threshold. The maximum of the signal within each of the segments is found and selected as a peak for the heartrate signal. A dataset (or a plurality of datasets) is then generated containing the cardiac activity value of the identified peak, R cardiac activity values occurring before the identified peak, and S cardiac activity values occurring after the identified peak. In this way, one or more datasets having the same length as the datasets used in the training phase are input into the health-event identification machine-learning model and used to generate the data that represents the presence or absence of the health-event in the cardiac signal. Referring to Figure 15, there is shown an example system according to aspects of the present disclosure. The system comprises an electronics module 100, a wearable article in the form of a garment 200, a user electronic device 300, and a remote server 700. The garment 200 is worn by a user who in this embodiment is the wearer 600 of the garment 200. The remote server 700 may perform the method of the first aspect and / or the second aspect of the disclosure. The remote server 700 may deploy the trained health-event identification model to the user electronic device 300. The remote server 700 may comprise one or a number of computers that may be in the same or different locations. The electronics module 100 is arranged to integrate with sensing units 400 incorporated into the garment 200 to obtain signals from the sensing units 400. The electronics module 100 and the wearable article 200 and including the sensing units 400 comprise a wearable assembly 500. The sensing units 400 comprise one or more sensors 209, 211 with associated conductors 203, 207 and other components and circuitry. The electronics module 100 is further arranged to wirelessly communicate data to the user electronic device 300. Various protocols enable wireless communication between the electronics module 100 and the user electronic device 300. Example communication protocols include Bluetooth ®, Bluetooth ® Low Energy, and near-field communication (NFC). The garment 200 has an electronics module holder in the form of a pocket 201. The pocket 201 is sized to receive the electronics module 100. When disposed in the pocket 201, the electronics module 100 is arranged to receive sensor data from the sensing units 400. The electronics module 100 is therefore removable from the garment 200. The present disclosure is not limited to electronics module holders in the form pockets. The electronics module 100 may be configured to be releasably mechanically coupled to the garment 200. The mechanical coupling of the electronic module 100 to the garment 200 may be provided by a mechanical interface such as a clip, a plug and socket arrangement, etc. The mechanical coupling or mechanical interface may be configured to maintain the electronic module 100 in a particular orientation with respect to the garment 200 when the electronic module 100 is coupled to the garment 200. This may be beneficial in ensuring that the electronic module 100 is securely held in place with respect to the garment 200 and / or that any electronic coupling of the electronic module 100 and the garment 200 (ora component of the garment 200) can be optimized. The mechanical coupling may be maintained using friction or using a positively engaging mechanism, for example. Beneficially, the removable electronic module 100 may contain all the components required for data transmission and processing such that the garment 200 only comprises the sensing units 400 e.g. the sensors 209, 211 and communication pathways 203, 207. In this way, manufacture of the garment 200 may be simplified. In addition, it may be easierto clean a garment 200 which has fewer electronic components attached thereto or incorporated therein. Furthermore, the removable electronic module 100 may be easierto maintain and / or troubleshoot than embedded electronics. The electronic module 100 may comprise flexible electronics such as a flexible printed circuit (FPC). The electronic module 100 may be configured to be electrically coupled to the garment 200. Referring to Figure 16, there is shown a schematic diagram of an example of the electronics module 100 of Figure 15. A more detailed block diagram of the electronics components of electronics module 100 and garment are shown in Figure 17. The electronics module 100 comprises an interface 101, a controller 103, a power source 105, and one or more communication devices which, in the exemplar embodiment comprises a first antenna 107, a second antenna 109 and a wireless communicator 159. The electronics module 100 also includes an input unit such as a proximity sensor or a motion sensor 111, for example in the form of an inertial measurement unit (IMU). The electronics module 100 also includes additional peripheral devices that are used to perform specific functions as will be described in further detail herein. The interface 101 is arranged to communicatively couple with the sensing unit 400 of the garment 200. The sensing unit 400 comprises - in this example - the two sensors 209, 211 coupled to respective first and second electrically conductive pathways 203, 207, each with respective termination points 213, 215. The interface 101 receives signals from the sensors 209, 211. The controller 103 is communicatively coupled to the interface 101 and is arranged to receive the signals from the interface 101 for further processing. The interface 101 of the embodiment described herein comprises first and second contacts 163, 165 which are arranged to be communicatively coupled to the termination points 213, 215 the respective first and second electrically conductive pathways 203, 207. The coupling between the termination points 213, 215 and the respective first and second contacts 163, 165 may be conductive ora wireless (e.g. inductive) communication coupling. In this example the sensors 209, 211 are used to measure electropotential signals such as electrocardiogram (ECG) signals, although the sensors 209, 211 could be configured to measure other biosignal types as also discussed above. In this embodiment, the sensors 209, 211 are configured for so-called dry connection to the wearer’s skin to measure ECG signals. The power source 105 may comprise a plurality of power sources. The power source 105 may be a battery. The battery may be a rechargeable battery. The battery may be a rechargeable battery adapted to be charged wirelessly such as by inductive charging. The power source 105 may comprise an energy harvesting device. The energy harvesting device may be configured to generate electric power signals in response to kinetic events such as kinetic events 10 performed by the wearer 600 of the garment 200. The kinetic event could include walking, running, exercising or respiration of the wearer 600. The energy harvesting material may comprise a piezoelectric material which generates electricity in response to mechanical deformation of the converter. The energy harvesting device may harvest energy from body heat of the wearer 600 of the garment. The energy harvesting device may be a thermoelectric energy harvesting device. The power source 105 may be a super capacitor, or an energy cell. The first antenna 107 is arranged to communicatively couple with the user electronic device 300 using a first communication protocol. In the example described herein, the first antenna 107 is a passive tag such as a passive Radio Frequency Identification (RFID) tag or Near Field Communication (NFC) tag. These tags comprise a communication module as well as a memory which stores the information, and a radio chip. The user electronic device 300 is powered to induce a magnetic field in an antenna of the user electronic device 300. When the user electronic device 300 is placed in the magnetic field of the communication module antenna 107, the user electronic device 300 induces current in the communication module antenna 107. This induced current triggers the electronics module 100 to retrieve the information from the memory of the tag and transmit the same back to the user electronic device 300. In an example operation, the user electronic device 300 is brought into proximity with the electronics module 100. In response to this, the electronics module 100 is configured to energize the first antenna 107 to transmit information to the user electronic device 300 over the first wireless communication protocol. Beneficially, this means that the act of the user electronic device 300 approaching the electronics module 100 energizes the first antenna 107 to transmit the information to the user electronic device 300. The information may comprise a unique identifier for the electronics module 100. The unique identifier for the electronics module 100 may be an address for the electronics module 100 such as a MAC address or Bluetooth ® address. The information may comprise authentication information used to facilitate the pairing between the electronics module 100 and the user electronic device 300 over the second wireless communication protocol. This means that the transmitted information is used as part of an out of band (OOB) pairing process. The information may comprise application information which may be used by the user electronic device 300 to start an application on the user electronic device 300 or configure an application running on the user electronic device 300. The application may be started on the user electronic device 300 automatically (e.g. without wearer 600 input). Alternatively, the application information may cause the user electronic device 300 to prompt the wearer 600 to start the application on the user electronic device. The information may comprise a uniform resource identifier such as a uniform resource location to be accessed by the user electronic device, or text to be displayed on the user electronic device for example. It will be appreciated that the same electronics module 100 can transmit any of the above example information either alone or in combination. The electronics module 100 may transmit different types of information depending on the current operational state of the electronics module 100 and based on information it receives from other devices such as the user electronic device 300. The second antenna 109 is arranged to communicatively couple with the user electronic device 300 over a second wireless communication protocol. The second wireless communication protocol may be a Bluetooth ® protocol, Bluetooth ® 5 or a Bluetooth ® Low Energy protocol but is not limited to any particular communication protocol. In the present embodiment, the second antenna 109 is integrated into controller 103. The second antenna 109 enables communication between the user electronic device 300 and the controller 100 for configuration and set up of the controller 103 and the peripheral devices as may be required. Configuration of the controller 103 and peripheral devices utilises the Bluetooth ® protocol. The wireless communicator 159 may be an alternative, or in addition to, the first and second antennas107,109. Other wireless communication protocols can also be used, such as used for communication over: a wireless wide area network (VWVAN), a wireless metro area network (WMAN), a wireless local area network (WLAN), a wireless personal area network (WPAN), Bluetooth ® Low Energy, Bluetooth ® Mesh, Thread, Zigbee, IEEE 802.15.4, Ant, a Global Navigation Satellite System (GNSS), a cellular communication network, or any other electromagnetic RF communication protocol. The cellular communication network may be a fourth generation (4G) LTE, LTE Advanced (LTE-A), LTE Cat-M1, LTE Cat-M2, NB-loT, fifth generation (5G), sixth generation (6G), and / or any other present or future developed cellular wireless network. The electronics module 100 includes configured a clock unit in the form of a real time clock (RTC) 153 coupled to the controller 103 and, for example, to be used for data logging, clock building, time stamping, timers, and alarms. As an example, the RTC 153 is driven by a low frequency clock source or crystal operated at 32.768 Hz. The electronics module 100 also includes a location device 161 such as a GNSS (Global Navigation Satellite System) device which is arranged to provide location and position data for applications as required. In particular, the location device 161 provides geographical location data at least to a nation state level. Any device suitable for providing location, navigation or for tracking the position could be utilised. The GNSS device may include device may include Global Positioning System (GPS), BeiDou Navigation Satellite System (BDS) and the Galileo system devices. The power source 105 in this example is a lithium polymer battery 105. The battery 105 is rechargeable and charged via a USB C input 131 of the electronics module 100. Of course, the present disclosure is not limited to recharging via USB and instead other forms of charging such as inductive of far field wireless charging are within the scope of the present disclosure. Additional battery management functionality is provided in terms of a charge controller 133, battery monitor 135 and regulator 147. These components may be provided through use of a 30 dedicated power management integrated circuit (PMIC). The USB C input 131 is also coupled to the controller 131 to enable direct communication with the controller 103 with an external device if required. The controller 103 is communicatively connected to a battery monitor 135 so that that the controller 103 may obtain information about the state of charge ofthe battery 105. The controller 103 has an internal memory 167 and is also communicatively connected to an external memory 143 which in this example is a NAND Flash memory. The memory 143 is used to for the storage of data when no wireless connection is available between the electronics module 100 and a user electronic device 300. The memory 143 may have a storage capacity of at least 1GB and preferably at least 2 GB. The electronics module 100 also comprises a temperature sensor 145 and a light emitting diode 147 for conveying status information. The electronic module 100 also comprises conventional electronics components including a power-on-reset generator 149, a development connector 151, the real time clock 153 and a PROG header 155. Additionally, the electronics module 100 may comprise a haptic feedback unit 157 for providing a haptic (vibrational) feedback to the wearer 600. The wireless communicator 159 may provide wireless communication capabilities for the garment 200 and enables the garment to communicate via one or more wireless communication protocols to a remote server 700. Wireless communications may include : a wireless wide area network (WWAN), a wireless metro area network (WMAN), a wireless local area network (WLAN), a wireless personal area network (WPAN), Bluetooth ® Low Energy, Bluetooth ® Mesh, Bluetooth ® 5, Thread, Zigbee, IEEE 802.15.4, Ant, a near field communication (NFC), Near Field Magnetic Induction, a Globa! Navigation Satellite System (GNSS), a cellular communication network, or any other electromagnetic RF communication protocol. The cellular communication network may be a fourth generation (4G) LTE, LTE Advanced (LTE-A), LTE Cat-Mi , LTE Cat-M2, NB-loT, fifth generation (5G), sixth generation (6G), and / or any other present or future developed cellular wireless network. The electronics module 100 may additionally comprise a Universal Integrated Circuit Card (UICC) that enables the garment to access services provided by a mobile network operator (MNO) or virtual mobile network operator (VMNO). The UICC may include at least a read-only memory (ROM) configured to store an MNO or VMNO profile that the garment can utilize to register and interact with an MNO or VMNO. The UICC may be in the form of a Subscriber Identity Module (SIM) card. The electronics module 100 may have a receiving section arranged to receive the SIM card. In other examples, the UICC is embedded directly into a controller of the electronics module 100. That is, the UICC may be an electronic / embedded UICC (eUlCC). A eUlCC is beneficial as it removes the need to store a number of MNO profiles, i.e. electronic Subscriber Identity Modules (eSIMs). Moreover, eSIMs can be remotely provisioned to garments. The electronics module 100 may comprise a secure element that represents an 35 embedded Universal Integrated Circuit Card (eUlCC). In the present disclosure, the electronics module may also be referred to as an electronics device or unit. These terms may be used interchangeably. The controller 103 is connected to the interface 101 via an analog-to-digital converter (ADC) front end 139 and an electrostatic discharge (ESD) protection circuit 141. The ADC front end 139 may be referred to as a sensing component. Figure 18 is a schematic illustration of the component circuitry for the ADC front end 139. In the example described herein, the ADC front end 139 is an integrated circuit (IC) chip which converts the raw analogue biosignal received from the sensors 209, 211 into a digital signal for further processing by the controller 103. ADC IC chips are known, and any suitable one can be utilised to provide this functionality. ADC IC chips for ECG applications include, for example, the MAX30003 chip produced by Maxim Integrated Products Inc. The ADC front end 139 includes an input 169 and an output 171. Raw biosignals from the electrodes 209, 211 are input to the ADC front end 139, where received signals are processed in an ECG channel 175 and subject to appropriate filtering through high pass and low pass filters for static discharge and interference reduction as well as for reducing bandwidth prior to conversion to digital signals. The reduction in bandwidth is important to remove or reduce motion artefacts that give rise to noise in the signal due to movement of the sensors 209, 211. The output digital signals may be decimated to reduce the sampling rate prior to being passed to a serial programmable interface (SPI) 173 of the ADC front end 139. Signals are output to the controller 103 via the SPI 173. The digital signal values output to the controller 103 are stored in a FIFO data buffer. The controller 103 performs operations to detect R-peaks from the digital signal values. The operations are performed in real-time while the ADC front end 139 are outputting new digital signals to the controller 103. ADC front end IC chips suitable for ECG applications may be configured to determine information from the input biosignals such as heart rate and the QRS complex and including the R-R interval. Support circuitry 177 provides base voltages for the ECG channel 175. Although this is no required in all examples, as these determinations such as for identifying peaks in the heartrate signal may be performed by the controller 103 of the electronics module 100 or the user electronic device 300 as explained below. Signals are output to the controller 103 via the SPI 173. The signals may be digital heartrate values obtained by the ADC front end 139. The controller 103 can also be configured to apply digital signal processing (DSP) to the digital signal from the ADC front end 139. The DSP may include noise filtering additional to that carried out in the ADC front end 139 and ay also include additional processing to determine further information about the signal from the ADC front end 139. The controller 103 is configured to send the biosignals to the user electronic device 300 using either of the first antenna 107, second antenna 109, or wireless communicator 159. The biosignals sent to the user electronic device 300 in this example comprise digital heartrate values representative of the heartrate signal of the user. The user electronic device 300 in the example of Figure 19 is in the form of a mobile phone or tablet and comprises a controller 305, a memory 304 (which may be internal to the controller 305), a wireless communicator 307, a display 301, a user input unit 306, a capturing device in the form of a camera 303 and an inertial measurement unit (IMU) 309. The controller 305 provides overall control to the user electronic device 300. The user input unit 306 receives inputs from the user such as a user credential. The memory 304 stores information for the user electronic device 300. The display 301 is arranged to display a user interface for applications operable on the user electronic device 300. The IMU 309 provides motion and / or orientation detection and may comprise an accelerometer and optionally one or both of a gyroscope and a magnetometer. The user electronic device 300 may also include a biometric sensor. The biometric sensor may be used to identify a user or users of device based on unique physiological features. The biometric sensor may be: a fingerprint sensor used to capture an image of a user's fingerprint; an iris scanner or a retina scanner configured to capture an image of a user's iris or retina; an ECG module used to measure the user’s ECG; or the camera of the user electronic arranged to capture the face of the user. The biometric sensor may be an internal module of the user electronic device. The biometric module may be an external (stand-alone) device which may be coupled to the user electronic device by a wired or wireless link. The controller 305 is configured to launch an application which is configured to display insights derived from the biosignal data processed by the ADC front end 139 of the electronics module 100, input to electronics module controller 103, and then transmitted from the electronics module 100. The transmitted data is received by the wireless communicator 307 of the user electronic device 300 and input to the controller 305. Insights include, but are not limited to, an ECG signal trace i.e. the QRS complex, heart rate, respiration rate, core temperature but can also include identification data for the wearer 600 using the wearable assembly 500. The display 301 may be a presence-sensitive display and therefore may comprise the user input unit 306. The presence-sensitive display may include a display component and a presencesensitive input component. The presence sensitive display may be a touch-screen display arranged as part of the user interface. User electronic devices in accordance with the present invention are not limited to mobile phones or tablets and may take the form of any electronic device which may be used by a user to perform the methods according to aspects of the present invention. The user electronic device 300 may be a electronics module such as a smartphone, tablet personal computer (PC), mobile phone, smart phone, video telephone, laptop PC, netbook computer, personal digital assistant (PDA), mobile medical device, camera or wearable device. The user electronic device 300 may include a head-mounted device such as an Augmented Reality, Virtual Reality or Mixed Reality headmounted device. The user electronic device 300 may be desktop PC, workstations, television apparatus or a projector, e.g. arranged to project a display onto a surface. In use, the electronics module 100 is configured to receive raw biosignal data from the sensors 209, 211 and which are coupled to the controller 103 via the interface 101 and the ADC front end 139 for further processing and transmission to the user electronic device 300 as described above. In this way, the electronics module 100 is able to transmit a cardiac signal for the subject 600 to the user electronic device 300. The user electronic device 300 may locally deploy a trained health event identification machinelearning model which it may receive from the remote server 700. The user electronic device 300 may process, using the health event identification machine-learning model, the cardiac signal to generate data that represents the presence or absence of the health event in the cardiac signal. In this way, the user electronic device 300 may perform the method of the third aspect of the disclosure. In other examples, the trained health event identification machine-learning model is deployed on the remote server 700. The remote server 700 may receive a cardiac signal for the subject either from the user electronic device 300 or via direct communication between the electronics module 100 and the remote server 700. Direct communication may be achieved if the electronics module 100 has cellular communication capabilities for example. In this way, the remote server 700 may perform the method of the third aspect of the disclosure. In summary, there is provided a method of preparing training data for use in training a health event identification machine-learning model. A cardiac signal and a data signal are obtained (S101, S102). The data label comprises an annotation identifying the presence or absence of a health event and an index indicating the cardiac activity value associated with the annotation. A first dataset is generated (S103). The first dataset comprises the cardiac activity value indicated by the index, R cardiac activity values occurring before the index and S cardiac activity values occurring after the index. An offset value is applied to the index to form a shifted index (S104). A second dataset is generated (S105). The second dataset comprises a cardiac activity value indicated by the shifted index, R cardiac activity values occurring before the shifted index and S cardiac activity values occurring after the shifted index. Training data is formed from the datasets and the annotation (S106). The training data is used to train a machine-learning model. In some embodiments, the described elements may be configured to reside on a tangible, persistent, addressable storage medium and may be configured to execute on one or more processors. These functional elements may in some embodiments include, byway of example, components, such as software components, object-oriented software components, class components and task components, processes, functions, attributes, procedures, subroutines, segments of program code, drivers, firmware, microcode, circuitry, data, databases, data structures, tables, arrays, and variables. Although the example embodiments have been described with reference to the components, modules and units discussed herein, such functional elements may be combined into fewer elements or separated into additional elements. Various combinations of optional features have been described herein, and it will be appreciated that described features may be combined in any suitable combination. In particular, the features of any one example embodiment may be combined with features of any other embodiment, as appropriate, except where such combinations are mutually exclusive. Throughout this specification, the term “comprising” or “comprises” means including the component(s) specified but nottothe exclusion of the presence of others. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and / or all of the steps of any method or process so disclosed, may be combined in any combination, except combinations where at least some of such features and / or steps are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise. Thus, unless expressly stated otherwise, each feature disclosed is one example only of a generic series of equivalent or similar features. The invention is not restricted to the details of the foregoing embodiment(s). The invention extends to any novel one, or any novel combination, of the features disclosed in this specification (including any accompanying claims, abstract and drawings), or to any novel one, or any novel combination, of the steps of any method or process so disclosed.

Claims

1. A method of preparing training data for use in training a health event identification machinelearning model for identifying a health event in a cardiac signal, the method comprises:(a) obtaining a cardiac signal for a subject, the cardiac signal comprising a temporal sequence of cardiac activity values each representative of the activity of the heart of the subject at a time step;(b) obtaining at least one data label for the cardiac signal, the data label comprising an annotation identifying the presence or absence of a health event in the cardiac signal and an annotation index indicating the cardiac activity value associated with the annotation;(c) generating at least one first dataset from the cardiac signal, the first dataset comprising the cardiac activity value indicated by the annotation index, a number R of cardiac activity values occurring before the annotation index and a number S of cardiac activity values occurring after the annotation index;(d) applying an offset value to the at least one annotation index to form at least one shifted annotation index;(e) generating at least one second dataset from the cardiac signal, the second dataset comprising a cardiac activity value indicated by the shifted annotation index, R cardiac activity values occurring before the shifted annotation index and S cardiac activity values occurring after the shifted annotation index, wherein one of the R or S cardiac activity values is the cardiac activity value indicated by the annotation index associated with the shifted annotation index; and(f) forming the training data, the training data comprising a plurality of training input sequences and, for each training input sequence, a target output, wherein the training input sequences comprise the first and second datasets, and wherein target outputs comprise the respective annotations associated with the first and second datasets.

2. A method as claimed in claim 1, wherein the offset value is a positive value such that the shifted annotation index has a higher value than its associated annotation index.

3. A method as claimed in claim 1, wherein the offset value is a negative value such that the shifted annotation index has a lower value than its associated annotation index.

4. A method as claimed in any preceding claim, wherein R approximately equals S.

5. A method as claimed in any preceding claim, further comprising repeating steps (d) and (e) using different offset values to form at least one additional dataset from the cardiac signal.

6. A method as claimed in any preceding claim, wherein the cardiac activity values are electrical values.

7. A method as claimed in claim 6, wherein the cardiac activity values are voltage values.

8. A method as claimed in claim 7, wherein the cardiac activity values are obtained from an electrocardiography signal measured from the subject.

9. A method as claimed in any preceding claim, further comprising applying noise to at least one of the first and second datasets to form at least one third dataset, wherein the training input sequences further comprise the third dataset, and wherein the target outputs further comprise the annotation associated with the third dataset.

10. A method of training a health event identification machine-learning model for identifying a health event in a cardiac signal, the method comprising:obtaining training data prepared according to the method of any preceding claim; and training the health event identification machine-learning model on the training data.

11. A method as claimed in claim 10, wherein the health event identification machine-learning model comprises a convolutional neural network comprising one or more convolutional neural network layers.

12. A method as claimed in claim 11, wherein the convolution neural network comprises three convolutional neural network layers.

13. A method as claimed in claim 11 or 12, wherein at least one of the convolutional neural network layers is followed by a batch normalization layer.

14. A method as claimed in claim 13, wherein the batch normalization layer is followed by a linear activation function layer.

15. A method as claimed in any of claims 10 to 14, wherein the health event identification machine-learning model further comprises a recurrent neural network arranged to receive a neural network output from the convolutional neural network.

16. A method as claimed in claim 15, wherein the recurrent neural network comprises a first long short-term memory, LSTM, layer.

17. A method as claimed in claim 16, wherein the first LSTM layer is a bidirectional LSTM layer.

18. A method as claimed in claim 16 or 17, wherein the recurrent neural network comprises a second long short-term memory, LSTM, layer.

19. A method as claimed in claim 18, wherein the second LSTM layer is a bidirectional LSTM layer.

20. A method as claimed in claim 18 or 19, wherein the first LSTM layer and the second LSTM layer are each one or a plurality of LSTM layers in an ordered stack of layers.

21. A method as claimed in claim 20, wherein the first LSTM layer is lower in the stack than the second LSTM layer.

22. A method as claimed in any of claims 10 to 21, wherein the health event is a cardiac anomaly, optionally a cardiac arrhythmia.

23. A method of identifying a health event in a cardiac signal, the method comprising: obtaining a health-event identification machine-learning model trained according to the method of any of claims 10 to 22;obtaining a cardiac signal for a subject, the cardiac signal comprising a temporal sequence of cardiac activity values each representative of the activity of the heart of the subject at a time step; andprocessing, using the health-event identification machine-learning model, the cardiac signal to generate data that represents the presence or absence of the health-event in the cardiac signal.

24. A computer readable medium having instructions recorded thereon which, when executed by a computer apparatus, is operable to cause the computer apparatus to perform the method as claimed in any of claims 1 to 23.

25. An apparatus comprising:a processor;a memory having instructions stored thereon that, when executed by the processing device, cause the processing device to perform the method as claimed in any of claims 1 to 23.

Citation Information

Patent Citations

  • Electrocardiosignal classification model training method and device, and electrocardiosignal classification method and device

    CN112353402A

  • System and method for machine-learning-based atrial fibrillation detection

    EP3488771A1