scieee AI-readable full text Open interactive document viewer

Dopaminergic-induced dyskinesia assessment based on a single belt-worn accelerometer

Pérez López, Carlos,Samà Monsonís, Albert,Rodríguez Martín, Daniel Manuel,Moreno Aróstegui, Juan Manuel,Cabestany Moncusí, Joan,Bayés, Àngels,ÓLaighin, Gearóid,Quinlan, Leo R.,Counihan, Timothy,Annicchiarico, Roberta,Lewy, Hadas,Rodríguez Molinero, Aleja

Abstract

Background After several years of treatment, patients with Parkinson's disease (PD) tend to have, as a side effect of the medication, dyskinesias. Close monitoring may benefit patients by enabling doctors to tailor a personalised medication regimen. Moreover, dyskinesia monitoring can help neurologists make more informed decisions in patient's care. Objective To design and validate an algorithm able to be embedded into a system that PD patients could wear during their activities of daily living with the purpose of registering the occurrence of dyskinesia in real conditions. Materials and methods Data from an accelerometer positioned in the waist are collected at the patient's home and are annotated by experienced clinicians. Data collection is divided into two parts: a main database gathered from 92 patients used to partially train and to evaluate the algorithms based on a leave-one-out approach and, on the other hand, a second database from 10 patients which have been used to also train a part of the detection algorithm. Results Results show that, depending on the severity and location of dyskinesia, specificities and sensitivities higher than 90% are achieved using a leave-one-out methodology. Although mild dyskinesias presented on the limbs are detected with 95% specificity and 39% sensitivity, the most important types of dyskinesia (any strong dyskinesia and trunk mild dyskinesia) are assessed with 95% specificity and 93% sensitivity. Conclusion The presented algorithmic method and wearable device have been successfully validated in monitoring the occurrence of strong dyskinesias and mild trunk dyskinesias during activities of daily living.

Full text

Dopaminergic-induced dyskinesia assessment based on a single belt-worn accelerometer Carlos Pérez-López a, Albert Samà a, Daniel Rodríguez-Martín a , Juan Manuel Moreno- Aróstegui a , Joan Cabestany a , Angels Bayes b, Berta Mestre b, Sheila Alcaine b, Paola Quispe b, Geroid Ó Laighin c, Dean Sweeney c, Leo R. Quinlan d , Timothy J. Counihan e , Patrick Browne e , Roberta Annicchiarico f, Alberto Costa f,g , Hadas Lewy h , Alejandro Rodríguez- Molinero c . a Centro de Estudios para la Dependencia y la vida Autónoma (CETpD), Universitat Politècnica de Catalunya (UPC), Rambla de l'Exposició, 59, 08800 Vilanova i la Geltrú, Barcelona, Spain b UParkinson, Barcelona, Passeig Bonanova 26,08022 Barcelona, Spain. c Electrical & Electronic Engineering, School of Engineering & Informatics National University Galway (NUIG), University Rd, Galway, Ireland d Physiology, School of Medicine National University Galway (NUIG), University Rd, Galway, Ireland e School of Medicine, National University Galway (NUIG), University Rd, Galway, Ireland f Fondazione Santa Lucia, Via Ardeatina, 306, 00142 Roma, Italy g Niccolò Cusano University, Rome, via Don Carlo Gnocchi, 3, 00166 Roma, Italy h Maccabi Healthcare Services, Hamered Street 27, 68125 Tel-Aviv, Israel Corresponding Author: Carlos Pérez López Centro de Estudios para la Dependencia y la vida Autónoma (CETpD) Universitat Politècnica de Catalunya (UPC) Rambla de l'Exposició 59 08800 Vilanova i la Geltrú, Spain Email: [email protected] Phone: +34938967274 Abstract Background: After several years of treatment, patients with Parkinson's disease (PD) tend to have, as a side effect of the medication, dyskinesias. Close monitoring may benefit patients by enabling doctors to tailor a personalised medication regimen. Moreover, dyskinesia monitoring can help neurologists make more informed decisions in patient’s care. Objective: To design and validate an algorithm able to be embedded into a system that PD patients could wear during their activities of daily living with the purpose of registering the occurrence of dyskinesia in real conditions. Materials and methods: Data from an accelerometer positioned in the waist are collected at the patient’s home and are annotated by experienced clinicians. Data collection is divided into two parts: a main database gathered from 92 patients used to partially train and to evaluate the algorithms based on a leave-one-out approach and, on the other hand, a second database from 10 patients which have been used to also train a part of the detection algorithm. Results: Results show that, depending on the severity and location of dyskinesia, specificities and sensitivities higher than 90% are achieved using a leave-one-out methodology. Although mild dyskinesias presented on the limbs are detected with 95% specificity and 39% sensitivity, the most important types of dyskinesia (any strong dyskinesia and trunk mild dyskinesia) are assessed with 95% specificity and 93% sensitivity. Conclusion: The presented algorithmic method and wearable device have been successfully validated in monitoring the occurrence of strong dyskinesias and mild trunk dyskinesias during activities of daily living. Keywords: Inertial sensors, Support Vector Machine, Parkinson’s disease, Dyskinesia, Ambulatory monitoring. 1. Introduction Parkinson's disease (PD) is a chronic and second most common neurodegenerative disorder, behind Alzheimer's disease. The pathology of the disease is characterised by an insufficient activity in the neurons that produce dopamine, one of the main neurotransmitters involved in the control of movement [1]. First appreciable symptoms in PD are those related to an altered movement control, such as tremor, rigidity or bradykinesia (slowness of movement). These symptoms are caused by a decrease in dopamine levels. Presently, there is no known drug proven to have disease modifying effect or capable of stopping the progression of PD. Current main treatments are based on symptom reduction and centred in substances that increase the concentration of dopamine. More specifically, current treatments replace dopamine through the use of its precursor, Levodopa (L-Dopa), or substances that increase the neurotransmitter activity by stimulating dopamine receptors [2]. The main drug used in the early stages of the disease is L-Dopa taken as oral pills. During the first years of the disease, patients use to respond to oral treatment with L-Dopa in a stable way, without appreciable motor symptoms for most of the time. However, with the advance of the disease, the duration and effectiveness of the medication is reduced and patients tend to have, as a side effect of the medication, dyskinesias. These treatment-related motor complications appear in approximately 30% of patients after 2 years of L-Dopa exposure and, once established, they are very difficult to treat and significantly contribute to overall disability and disease burden [3,4]. Dyskinesia is a movement disorder that consists of involuntary movements that mainly occur in the limbs, hands, trunk and lingual-facial-buccal musculature [5,6]. At the time that these complications occur, the neurologist should consider a therapeutic change as these motor complications cannot be handled by oral medications [4]. In the latter years, some research has focused on helping neurologists to make care decisions in an objective way. For example, in the work presented in [7], an algorithm that selects one of the following three treatment options for patients with advanced PD is reported: subcutaneous apomorphine infusion, Deep Brain Stimulation and intestinal infusion of L-Dopa. This algorithm is mainly based on the age of the patient and the presence of dyskinesia. The idea behind the pump-based treatments (subcutaneous apomorphine infusion and L-Dopa intestinal infusion) relies on the growing evidence that improvement in duration and severity of dyskinesia can be achieved through continuous drug administration [4]. Thus, the change of treatment in PD is being defined, mainly, on the appearance of dyskinesias since they drastically affect the quality of life of patients and they can be improved with appropriate treatments. Therefore, the gathered evidence has proven that the accurate knowledge of the appearance of dyskinesias during activities of daily living is indispensable for the neurologist in order to improve advanced PD treatment. This information can help the professionals to make informed decisions, on the one hand, to change the administration mode of the medication (oral / pump) or, on the other hand, to select another treatment to the patient (e.g. L-Dopa vs agonists). Furthermore, having this data available in realtime would open up the possibility to the on-line control of the dosage administrated by infusion pumps according to the patients' motor fluctuations. An example of this hypothesis was tested under previous work, in which a proof of concept was performed, by remotely adjusting the apomorphine dose (administered by a modified apomorphine pump) based on the motor phase of the patient [8]. The ultimate goal of the work presented in this paper is to design and validate an algorithm that can be embedded into a system that PD patients could wear during their activities of daily living with the purpose of registering the occurrence of dyskinesias in real conditions. Given that the system is designed to be employed in real conditions, its comfort and usability are crucial since patients should wear it for several hours. In this sense, one should not forget that the final system, in which these algorithms will be embedded, must be manipulated by PD patients who are generally aged over 65 and, additionally, the system must be continuously worn during waking hours (between 8 and 12 hours a day). These conditions, marked by patient's age, usage circumstances and PD symptoms, led us to make the system, and its method of placement in the body, to be very comfortable and very easy to use. To this end, as presented in the paper, the system is restricted to be a single device that unites sensor, processing and communication modules together. The rest of the paper is organised as follows. The next section is devoted to describing the background and related work on dyskinesia detection. Third section presents the employed methods, including the data collection and the signal processing. Then, results are provided and finally, discussion and conclusions are presented. 2. Related work Two types of dyskinesias are distinguished according to their clinical phenomenology: choreic and dystonic [3,6]. A choreic movement is an involuntary spasmodic twitching or jerking in muscles with no purpose. A dystonic movement involves contractions in muscle groups provoking abnormal postures. There are different classifications of dyskinesias but, when referring to PD, the most widespread classification is based on the timing of their appearance regarding the medication effect. According to this classification we can find, as Table 1 shows, three types: “off-phase dystonia", “diphasic dyskinesia" and “peak dose dyskinesia" [3]. The first type, off-phase dystonia, arises during off periods and is generally related to akinesia. Off periods are related to low dopamine levels in blood and, therefore, are often associated with periods in which the medication is not making the desired effect or when the plasma level of the active drug is low. Diphasic dyskinesias, instead, are associated to the onset and the end of dose, i.e. rise and fall of dopaminergic levels. Finally, peak dose dyskinesias are correlated with maximal plateau dopaminergic plasma levels. Each one of the three types of dyskinesia is associated with a specific set of involuntary movements, defining the way in which they are observed. First, peak-dose dyskinesias generally affect the trunk and consist of choreic form movements. Diphasic dyskinesias take the form of dystonic ballistic movements that are sometimes painful, although they commonly affect the lower limbs, in contrast to peak-dose dyskinesias that typically involve the upper limbs [4,9]. Peak-dose dyskinesias are the most common and frequent type of dopaminergic-induced dyskinesias [9]. Consequently, they are the most interesting type, from a clinical point of view, in order to assess the adverse effects of specific medications [10]. Classification in PD Type Timing of the appearance Part of the body (commonly) off-period dyskinesia Dystonic During off periods (Low blood concentration of dopamine) Distal extremities Diphasic dyskinesia Dystonic and Choreic End of dose (Change in the blood concentration of dopamine) Lower limbs Peak-dose dyskinesia Choreic During on periods (High blood concentration of dopamine) Trunk and upper limbs Table 1: Dyskinesia classification based on appearance timing. Research on automatic detection of choreic dopaminergic-induced dyskinesia relies on body-worn sensors based on Micro-Electro-Mechanical Systems (MEMS) technology, given that MEMS provide miniaturised wearable devices capable of being employed in unobtrusive human movement monitoring applications [11]. Main sensors that have been employed in choreic dyskinesia detection are accelerometers, gyroscopes, magnetometers and electrogoniometers [12–18]. Among them, accelerometers are the most widely used sensors to detect dyskinesia. They have been located in different parts of the body, such as trunk, limbs, or head [6]. Locations that have been mostly used are arms, legs and trunk [12–14] when more than one device is used in data acquisition. However, when just one single accelerometer is utilised the choice of localisation differs, i.e. shoulder [15] or waist [16]. Choreic dyskinesia assessment methods are commonly composed of the following steps. First, raw signals acquired from patients’ movement are segmented into time windows and signals contained in each time window are characterised through some specific features. Then, these features are used as the input to a machine learning technique. It should be noted that some studies have only evaluated feature significance based on statistical tests [13,15,19–21], which does not facilitate an automatic assessment tool. The approaches found in the literature aiming to automatically assess dyskinesia are described in the rest of this section. One of the most widely used ways to characterise MEMS sensor signals to detect dyskinesia is based on frequency analysis of the acquired data [12–17,21]. In these studies, signals were characterised by a Short Time Fourier Transform with the aim of representing signals in a frequency domain. Manson et al. proved that choreic dyskinesias increase the power spectrum density of accelerometer signals in the frequency band between 1-3 Hz [15]. Keijsers et al. [12] employed the frequency and amplitude of the signals to characterise them in the detection of dyskinesia. A similar approach was carried out in other studies [16,17]. Power spectrum analysis was also used in [13,21], however, this time on a larger bandwidth that reached 8 Hz. In another recent paper [14], the signal energy within 2-5 and 5-10 Hz frequency bands and entropy of the frequency spectrum were employed. Finally, high frequency energy content, frequency domain entropy and a five-bin histogram representation of the spectral contents over all three axes of the accelerometer have also been employed [17]. Besides the frequency based features, signal characterisation has also been done through minimum, maximum, mean and standard deviation values of the signals, RMS, entropies and correlations [14,17–20]. These features have been applied to other signals derived from the ones provided by the sensors, such as magnitude signal or velocity and displacement, obtained by single or double integration of the acceleration signals, respectively. Recent studies on automatic dopaminergic-induced dyskinesias assessment have, however, two main limitations. First, the amount of signals obtained from patients is limited and most of them were collected from less than 20 PD patients [12,14–18]. Thus, as far as the authors know, there is no precedent work in which dopaminergicinduced dyskinesias were assessed in the daily life environment of a relevant sample of PD patients. In addition, it is unknown if these studies analysed any of the usability restrictions previously described in this article, since the great majority of them use some sensors distributed on the body [12–14,17,18,20,22]. As far as authors know, the only paper, apart from the previously submitted by authors [16], that uses a single sensor for dyskinesia assessment is operating from the shoulder [15], which is a position contrary to the restrictions that have been presented so far. In contrast to these previous approaches, this paper presents a new methodology to detect choreic dopaminergicinduced dyskinesias based on the signals from a single accelerometer positioned in the waist. 3. Methods This section describes the methods used to validate the device and algorithms for the assessment of choreic dyskinesia. The section is organised as follows. First, the authors describe the selection of the sensor position and the related implications. In the next section, the inclusion criteria and descriptive data of the patients who participated are presented. In the data collection part, the data acquisition methodology is explained. In the last sections, the signal processing and the evaluation techniques are detailed. 3.1. Sensor position In the design and generation of the algorithms to monitor dyskinesia, it is essential to determine the context and conditions in which they will be used. In our case, the algorithm should be able to evaluate the choreic dyskinesia and be embedded in one or more devices that patients wear during their activities of daily living. According to this reasoning, two necessities lead and constrict the design and the specification of the device: the number and position of movement sensors. In this work we face a compromise between the feasibility of capturing and recognizing a motor symptom and, on the other hand, the discomfort that can cause to the user wearing a sensor in certain positions or simply having to wear several sensors. Regarding the final wearable system, which is expected to embed the algorithm presented in this paper, it is essential not to be overly complex. Thus, in this paper we discard any system implementation that requires multiple sensors and we have focused the study in conducting an analysis with a single sensor. In this sense, some studies like those of Yang et al. and Gjoreski et al. [23,24] argue that placing an accelerometer on the waist is interesting from a mechanical point of view, because of the closeness and solidarity with the centre of mass of the human body, providing good ergonomics for the patient. In addition, on the same line Mathie et al. [25] performed a survey where volunteers chose the side of the waist, above the anterior superior iliac spine, as the most suitable place to carry a small inertial sensor. Given this reasoning and the restriction on the position and the number of sensors, in the work presented in this paper it has been considered that a single sensor must be used and, moreover, the side of the waist must be its position. All choreic dyskinesias are reflected, in greater or lesser extent, in the trunk (as most movements, even in the extremities, provoke some movement in the trunk) and, among the different trunk locations in which a sensor could be located, the waist is considered the optimal place. In this sense, it is considered that the waist is the most suitable place in the body that can be used to capture most of choreic dyskinesias using a single sensor. This consideration is a very hard restriction that appears from a usability point of view. The biggest problem is that, although this position enables the detection of dyskinesias appearing in almost any part of the body, some precision is lost in the degree of severity, depending on the area of occurrence; e.g. the sensed severity of an arm dyskinesia would be not comparable with the severity sensed from a similar dyskinesia in the trunk. This means that the detector will present greater sensitivity for trunk dyskinesia than for dyskinesias that occur in distal extremities. In any case, sensor placement at the waist provides a good resolution for almost any choreic dyskinesia, those related to peak dose dyskinesias, which are the most interesting to detect from a clinical point of view. It is for this reason that, in the results section, the behaviour of the algorithm is presented in terms of the part of the body that the dyskinesia appears. However, the authors are aware of the trade-off and we prioritised usability and viability of the final system against a minimum reduction of the device resolution in certain types of dyskinesias. 3.2. Participants An international multicentre study was planned to gather the inertial signals and validate the developed algorithms. The study took place from 2012 through 2014 and was coordinated by four different clinical settings: Centro Médico Teknon (Spain), National University of Ireland, Galway (Ireland), Fondazione Santa Lucia (Italy) and Maccabi Healthcare Services (Israel). We included patients aged between 50 and 75 years, with idiopathic PD, according to the criteria of the UK PD Society Brain Bank [26]. All patients were in a moderate-severe phase (Hoehn and Yahr stage greater than or equal to 2.5 in their on state) and had motor fluctuations with bradykinesia, freezing of gait or dyskinesia. Table 2 presents the sociodemographic data and the distribution of the UPDRS scores, also the distribution of the patients' scores for dyskinesia are included. In Figure 1, a Step 1: Window-based analysis The signal processing employed to assess the presence of dyskinesia is based on splitting the spectra into three different bands: • Dyskinetic band. A high power spectral density in this band is an indicator that either the patient has dyskinesia or the patient is walking or going up/down stairs. The dyskinesia band is considered to cover the (0.68, 4] Hz range, where 0.68 Hz is considered to be the upper limit of PT band [30]. Dyskinesia band covers until 4 Hz since, although other studies consider 8 Hz to be the limit, frequencies higher than 4 Hz correspond to tremor according to a consensus of the Movement Disorders Society [31]. • Non-dyskinetic band is considered to be [8, 20] Hz. This band will enable us to know whether an increase in the dyskinetic band is due to dyskinesia appearance or due to walking (or similar activities). Given that walking has the 99% of its power spectral density below 20 Hz [32], 20 Hz is considered as the upper limit of the non-dyskinetic band. The lower limit of the band is provided by the maximum frequencies obtained in some dyskinesia research works [13]. In this way, harmonics in this non-dyskinetic band are used to determine the presence of gait or similar activities as the input of a machine learning classifier, as detailed below. A Support Vector Machine (SVM) is employed because of the complexity of detecting gait in PD patients through a waist sensor, especially when patients walk slowly. Moreover, the use of SVMs is adopted since gait detection is a bi-classification problem and SVMs have provided excellent results in similar tasks and because they commonly present good generalisation performance [33]. Furthermore, SVMs have been used in investigations with very similar characteristics and very good results, for example the work of Shyamal et al. [34]. • PT band is considered to be (0, 0.68] Hz where 0.68 Hz is the upper limit of PT [30]. This band will enable us to know whether a PT has occurred. Power spectrum in dyskinesia band is denoted as d P and spectral power in the PT band as PT P . The amplitude of the harmonics of the non-dyskinetic band are represented by h1,…,hk. The minimum usable sample frequency ( s F ) has been determined by the maximum frequency of interest, which in this case is 20 Hz from the walking band. In consequence, s F has been set to 40 Hz, implying that signals collected were re-sampled from 200 Hz to 40 Hz before applying the described algorithm. On the other hand, FFT, which has been employed to obtain the power spectra, requires a window whose length is a power of 2 in order to be executed in real-time with minimum resources. Possibilities taken into account are 32 (0.8 s.), 64 (1.6 s.), 128 (3.2 s.) and 256 (6.4 s.) samples. Given that 0.68 Hz is the minimum frequency for the dyskinetic band, the temporary window should be above 1.5 s. in order to capture the “slowest” dyskinetic cycles. However, 1.6 s are not enough to capture the PT band so, consequently, FFT window length is set to 128 samples and w value is set to 3.2 seconds. Finally, the dyskinesia algorithm’s output in a window i is defined on these spectral power values according to: (3) (2) (1) 1),...,( 1),...,(< 1),...,(<> 0 1 1 1 1          kPTPT kPTPTd kPTPTd i hhfdP hhfdPdP hhfdPdP n)U (Unknow inesia) (No dysk sia) (Dyskine S where d and PT d are the thresholds for dyskinetic and PT bands, respectively, {1,-1} ),...,(1 k hhf is the decision function of the trained SVM and, additionally, provides value 1 when patient has walked, used stairs or performed a similar activity while, otherwise, provides value 1. Parameters d , PT d and decision function f have been set by means of specific procedures applied to the set of labelled signals collected from 10 patients, described in Section 3.3.2, and that correspond to a previous study [16]. The specific procedures employed to set their values are described below: • First, function f is set based on a set of vectors {p1,…,pn}, pi=[h1,…,hk] obtained from several windows of the previously collected signals [16]. Each one of these vectors pi is associated with a label yi={1,-1} according to the labels given by clinicians to that window: yi=1 corresponds to those windows labelled with walking or going up/down stairs and yi=-1 to the remaining windows. Dataset elements are denoted as {(p1,y1),…,(pn,yn)} and were employed to train a SVM with a radial basis function kernel: i N i bC     1= 2 2 ,, 2 1 min w w (4) 0..  i ts  iii bKy   1]),([ pw where 2 2 =),( i eK i pw pw   , b is the hyperplane bias, w is the hyperplane that separates both classes and i  are the slack variables. Parameters C and  are determined as the values that maximise the accuracy among the values 22 ,10,10   in a 10-fold Cross- Validation [35]. The final form that f gets in order to determine the output value for a new window represented by p is: f =             bKy l i iii 1 ,sgn pp  (5) where the set of alphas are the Lagrangian multipliers of the dual problem formulated by the SVM. • Second, PT d was set also through a similar optimisation method applied to specific values obtained from the previous study [16]. In this case, the dataset was composed of PT P values computed from window signals that satisfied f ( h1,…,hk) = –1, that is, the patient neither walked nor went up/down stairs. A label was obtained for each PT P and consisted in whether the patient performed a PT or not in the corresponding window. Given the set of PT P values and their associated labels, a linear kernel ii Kpwpw =),( was used to find the hyperplane that separates both classes based on Equation (4). In this case, given that i p is actually a scalar, w value obtained from Equation (4) is also scalar. Thus, the value found through the optimisation process is used as PT d . The obtained value is PT d = 0.95. • Third, d was set through the same method than PT d although, in this case, the dataset was composed of d P values computed from those windows that satisfied PTPT dP < and f ( h1,…,hk) = –1 (windows in which the patient neither walked, went up/down stairs and did not performed a PT). The label consisted in the presence or absence of dyskinesia. The value obtained is d = 1.75. This way, for activities such as walking, using stairs or PT, in which f ( h1,…,hk) = –1 or PTPT dP  are satisfied, respectively, the algorithm’s output will be unknown despite the patient has dyskinesia or not. This behaviour is actually associated with visual appreciation: when a patient has dyskinesia and walks, commonly it cannot be distinguished in the waist since walking hides the involuntary movement. Step 2: Meta-analysis Dyskinesia detection described by Equations (1) (2) and (3) enables us to know whether, in a given time window, a patient has dyskinesia. However, dyskinesia is a symptom which may last minutes. The most suitable window to examine the appearance of dyskinesia is, then, of several windows length. Thus, it is proposed to aggregate the output obtained in windows of w -seconds length overlapped at 50%, similarly to [36], along a longer period of .60=sT seconds. The algorithm provides, then, a single output obtained from the wT/2 windows included in the 1-minute period according to: • Dyskinesia if: c d p d i wT i t T nw t n s> 2 > /2 1=    (6) • No dyskinesia if: c d p d i wT i t T nw t n s> 2 /2 1=    (7) • Unknown, otherwise, i.e.: c dt T nw  < 2 (8) where wT ss /21 ,, are the algorithm outputs represented in Equations (1) (2) and (3), being 1= i s in case of dyskinesia detection and 0= i s otherwise; d n is the number of time windows in which the condition 1=),...,(1 kPTPT hhfdP were not held (i.e. number of windows analysed), p t is the threshold which sets the dyskinesia detection rate needed to consider the T -seconds period as dyskinetic and c t sets the minimum amount of analysed windows in the period of T seconds. The logic behind the algorithm consists in considering a T -seconds period to be dyskinetic if the summation in Equation (6) is greater than a certain threshold p t . However, this value might not be enough by itself since it could not be reliable if the patient walked during most of the analysed period. Then, a confidence index is defined as Tnw d/2 , which represents, from the total of wT/2 analysed windows, the number of windows that were not rejected because of the condition 1=),...,(1 kPTPT hhfdP . In this manner, a low confidence index is considered to provide an unreliable dyskinesia assessment and, then, an undetermined evaluation, since few windows could be analysed. Consequently, the confidence index is required to be greater than a certain threshold c t . Values for tp and tc were found based on an ‘leave one-patient-out’ approach on the signals collected from 92 patients. Accordingly, these two thresholds are set as those values that maximize SpecifityySensitivit · and that use at least half of the samples analysable based on the data from 91 patients and, then, the resulting values are evaluated with the data from the remaining patient. This process is repeated 92 times, one for each patient. More specifically, tested values for c t have been (0, 0.1, 0.2, …, 1) and for p t have been (0.01, 0.02, …, 1). The evaluation of the obtained threshold values has been carried out by considering the same weight for each minute analysed. 3.5. Evaluation Signals gathered are employed to evaluate the method presented above in nonoverlapped periods of T=60 seconds, resulting in sensitivity and specificity values. Each evaluated interval of T=60 seconds is required not to contain any sample labelled with any type of dyskinesia or to contain at least N=Fs·T/2 samples (i.e. 30 sec.) of the dyskinesia type under analysis. Depending on the output of the algorithm and the labels of the samples, each interval is considered a true/false positive/negative case. This way, signals labelled with at least N samples of dyskinesia are then either false negatives (FN) or true positives (TP). On the other hand, those signals without any labelled dyskinesia are evaluated as true negatives (TN) or false positives (FP) The value used for N is half the period of analysis, i.e. Fs·T/2, requiring at least 30 s. to be labelled as dyskinetic. Those periods in which the number of samples labelled with dyskinesia is not zero and lower than 30 s. are considered to be indeterminate and not evaluated. Finally, it should be noted that minutes in which c dt T nw  < 2 are considered like undetermined since patients mostly walked during them, as stated in previous sections. These restrictions reduce significantly the number of minutes used in the analysis but the veracity of the signals used for evaluation algorithm is ensured. 4. Results and discussion Among the 92 patients included in the database, 35 presented some type of choreic dyskinesia. A total of 3228 minutes of labelled signals were collected, from which 401 minutes (12%) were labelled with choreic dyskinesia. Table 5: Results on dyskinesia assessment. An overview of the results in choreic dyskinesia assessment based on a leaveone-out approach on the data collected from 92 patients is provided in Table 5. The table also presents, for each dyskinesia type analysed, the best values of p t and c t found in the leave-one-out procedure. Assessment results are presented according to the severity and the body part where the dyskinesia was presented, thus, the analysis is split into three sub-analysis. In the first sub-analysis (first row), results on detecting any choreic dyskinesia in any part of the body are presented. The second sub-analysis requires the algorithm to detect any strong dyskinesia from any part of the body adding weak dyskinesias in the trunk. Finally, in the third sub-analysis, the results correspond to evaluate the algorithm in detecting only strong trunk dyskinesias. In the third column of Table 5, the average sensitivity and specificity among all minutes is presented regarding the detection of each kind of dyskinesia. In the columns under “Analysis details”, TP, TN, FP and FN values are shown, as defined in previous Section 3.5. Also, Type of choreic dyskinesia Number of patients with this type of dyskinesia Threshold selected Equal weight per minute Analysis details Not analysed minutes Severity Body part tc tp Specificity Sensibility TP TN FP FN Total minute 0 < Label dysk < 30s. Walk or Posture Transition detected Unmatched dysk. All All 35 0.3 0.06 81% 57% 119 765 179 89 1152 82 1994 0 Weak Trunk 19 0.3 0.25 95% 93% 66 910 48 5 1029 35 1885 + 279 Strong All Strong Trunk 4 0.3 0.53 98% 100% 7 870 18 0 895 5 1940 388 the amount of minutes used in the analysis (summation of TP, TN, FP and FN) and the number of not analysed minutes are presented. It should be noted that, in the calculations of each row, those minutes labelled as dyskinesias, but that were not labelled with 30 s. of the type of dyskinesia under analysis, were withdrawn from the analysis. The number of these minutes is presented in the last column as ‘Unmatched dyskinesia’. Table 6: Total of minutes labelled on the database. Results presented in Table 5 show that, depending on the severity and location of dyskinesia, specificities and sensitivities higher than 90% can be achieved using a leave-one-out methodology. Although mild dyskinesias presented on the limbs are detected with 95% specificity and 39% sensitivity, the most important types of dyskinesia (any strong dyskinesia and trunk mild dyskinesia) are assessed with 95% specificity and 93% sensitivity. If strong trunk dyskinesia is considered in an isolated way, they are detected with 98% and 100% of specificity and sensitivity, respectively. These results confirm that the algorithm is very sensitive to trunk dyskinesia, this fact is confirmed by the behaviour of the method which is very good for all strong and weak trunk dyskinesias; however, it presents a worse response when weak dyskinesias in the extremities are included in the analysis. It should be noted that the different types of dyskinesia analysed and presented in Table 5 are presented in an aggregated order: the first one of the three types include the other two types (e.g., all dyskinesias with any severity includes the weak trunk dyskinesia and all the strong ones), in the same way than the second kind of dyskinesia analysed comprises the third one. Table 5, on the other hand, presents a decrease in the time analysed along with the more specific dyskinesia analysed. This occurs because the evaluation of more specific types of dyskinesia permits to evaluate fewer labelled Type of choreic dyskinesia Minutes labelled Severity Body part Weak Trunk 95 Strong Trunk 24 Weak No-trunk 306 Strong No-trunk 48 episodes since those minutes which are labelled without the specific type of dyskinesia are not analysed. In Table 5, the number of unanalysed minutes is also relevant since patients were asked to walk in most activities of the protocol; however, in real life monitoring these walking minutes would be drastically reduced, increasing the analysis time. Table 6 shows the number of labelled minutes of each type of dyskinesia divided into weak and strong, and trunk and no-trunk (distal). Note that this type of dyskinesias are not exclusive, for example, a minute of signal presenting weak trunk dyskinesia and, at the same time, weak dyskinesia in a hand can be found. On the other hand, it should be mentioned that, in this sum, dyskinesia labels are globally considered, including labelled dyskinesias while patients are walking, which are extracted from the analysis based on Equation (3). Table 7: Results on dyskinesia assessment for the thresholds p t = 0.25 and c t = 0.3. In addition, in order to evaluate the performance of the algorithm against various types and severities of dyskinesias, a further analysis has been done. Due to the particularity of the measurement position, a low sensitivity for weak dyskinesias of the distal extremities is expected. For this reason, the most interesting case presented in Table 5 is the row that jointly evaluates weak trunk with strong all dyskinesias (middle row). According to this premise, Table 7 shows the results of the algorithm on each type of dyskinesia divided into weak/strong and trunk/no-trunk (distal) for the optimal thresholds 0.25 and 0.3 for p t and c t , respectively, found for the mentioned case (middle row of Table 5). Note that this type of dyskinesias are not exclusive so, for instance, a patient with weak trunk dyskinesia could be found at the same time with weak dyskinesia in a hand. Results show how the algorithm presented is highly sensitive to dyskinesias labelled as strong. We also find that a high sensitivity is Type of choreic dyskinesia Num. of patients with this type of choreic dyskinesia Equal weight per minute Severity Body part Specificity Sensibility Total minutes Weak Trunk 16 95% 78% 953 Strong Trunk 4 95% 100% 895 Weak No-trunk 32 95% 39% 1110 Strong No -trunk 7 95% 90% 917 maintained for mild trunk dyskinesia, whereas the sensitivity drops in assessing weak dyskinesias in distal extremities. Notably, in both Table 5 and Table 7, the method presents a high specificity, meaning that confidence when the algorithm output diagnoses dyskinesia is very high. Comparing the results of the presented algorithm to those obtained in previous works, it is observed that, first, the performance obtained on detecting the presence or absence of dopaminergic-induced dyskinesia in 1-minute periods by Keijsers et al. through a single sensor located on the trunk provided 82% of accuracy [12]. In the approach presented in this paper, a 95% of accuracy on trunk dyskinesia and any severe dyskinesia from any part of the body is obtained, surpassing by more than 10 % the previous results. Results from Keijsers et al. were obtained following a ‘leave onepatient-out’ approach with 12 patients. In contrast, the method proposed in this paper has been tested on data from 92 patients following the same ‘leave one-patient-out’ approach. Results from Tsipouras et al. [14] achieved a 93% of accuracy through the same leave-one-patient out approach. However, these results were obtained based on 6 sensors and with signals from 16 volunteers. Finally, the study from Chelaru et al. [18] provided an accuracy of 100% on dopaminergic-induced dyskinesia detection. Nonetheless, signals were collected with patients standing and refraining from making voluntary movements. In summary, results obtained by the presented approach either outperform previous studies or are similar. However, it should be noted that signals used in this study to evaluate the proposed method posed a higher challenge given that they come from a single sensor and they belong to a population of 92 PD patients. Thus, the device and algorithm presented here, as far as authors are aware, and compared to the previously presented works, is the only set-up that meets the specifications raised: an algorithm to evaluate dyskinesias that can be embedded in a single device worn in the waist in the daily life environment of patients. 5. Conclusion The ultimate goal of this work is to develop the necessary algorithms to evaluate the occurrence of dyskinesias in a patient while performing the activities of daily life. Moreover, these algorithms must be embedded in hardware with some physical and computational restrictions. These restrictions are not only related with the memory and computing resources, but also with the position and location of the sensor. These restrictions, as shown in this paper, affect the process of development, generation and accuracy of the algorithm. This type of device would provide relevant information to the clinicians in tailoring treatment and, furthermore, it is now available. The algorithm presented in this paper has been evaluated on a database of signals gathered in the daily life environment of 92 PD patients, under a multicenter study that took place in 4 different countries. The approach provides specificities and sensitivities above 90%, showing that choreic dyskinesia is able to be monitored through a single sensor during daily life of patients. However, the results also show that the restrictions imposed on the final system heavily penalise its accuracy for some types of dyskinesias, since weak dyskinesias in the distal extremities are not correctly recognised. The consequence of these constraints, based on the physical limitations of the users and the usability characteristics of the system, result in a trade-off between sensitivity in detecting weak dyskinesias on the distal limbs and the specificity of the method. From the beginning of this work, it has been taken into account that the ultimate objective of the system is to provide information on the dyskinetic states, which should be considered when the neurologists are making a decision in the treatment for patients with advanced PD. Thus, the most important state to be detected is severe choreic dyskinesia, which is detected with excellent sensitivity and specificity with the current system. From a clinical point of view, the correct identification of dyskinesia is a very significant issue for patients with PD since it significantly affects patient’s functional autonomy and is associated to a greater risk of falls. Moreover, dyskinesia detection, in addition to other motor symptoms detection, relies on objective tools, such as the proposed in this paper, that enable treatment adjustment of PD patients. The information that these systems are capable of providing to neurologists will contribute to a better understanding of PD and, combined with other tools such as behavioural patterns, will contribute to timely intervention and will prevent patient deterioration based on fine adjustments of PD treatment. Acknowledgements