{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"## Paper Overview: Internet of Things Technologies and Machine Learning Methods for Parkinson’s Disease Diagnosis, Monitoring and Management: A Systematic Review\n<img src=\"https://i.natgeofe.com/n/ed13e09f-4640-43e2-8cb2-17079cd41ec2/2martymcfly_4x3.jpg\" width=\"700px\" height=\"100px\">  \n* Marty McFly (The Michael J. Fox Foundation supported this data competition)","metadata":{}},{"cell_type":"markdown","source":"## Table of Contents\n1. [Introduction](#introduction)\n2. [Our Case - Initial Sensors](#initial-sensors)\n3. [FoG - Freezing of Gate](#fog)\n4. [Collective Comparison and Overall Insights](#comparison)\n    1. [Sensors and Devices Deployed](#sensors)\n    2. [Meta-Analysis over Sensor-Specific Results Obtained](#meta-analysis)\n    3. [Overall Addressed Problems and Obtained Accuracies](#problems)\n5. [Discussion and Conclusions](#conclusions)","metadata":{}},{"cell_type":"markdown","source":"### 1. Introduction<a id='introduction'></a>","metadata":{}},{"cell_type":"markdown","source":"This notebook is based off [Internet of Things Technologies and Machine Learning Methods for Parkinson’s Disease Diagnosis, Monitoring and Management: A Systematic Review](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8915040/) paper by Konstantina-Maria Giannakopoulou, Ioanna Roussaki and Konstantinos Demestichas, March 2022. It is one of the most recent works on Machine Learning Methods for Parkinson’s Disease Diagnosis, which can be relevant for the current [Parkinson's Freezing of Gait Prediction](https://www.kaggle.com/competitions/tlvmc-parkinsons-freezing-gait-prediction) competition.\n\nThe paper is quite big and some of its parts are useful for this competition. As a result, this notebook is a more focused summary of the paper and includes only the parts relevant for those who would like to compete.\n\nThe purpose of this notebook is to:\n\n* create an overview of the paper in question;\n* identify any useful insights;\n* understand the imperatives behind the use of ML in Parkinson’s Disease Diagnosis.","metadata":{}},{"cell_type":"markdown","source":"#### What is Parkinson’s Disease?  \n\nParkinson's disease (PD) is a chronic neurodegenerative disease that affects a large portion of the population, especially the elderly. It manifests with motor, cognitive and other types of symptoms, decreasing significantly the patients' quality of life.  \n\n##### PD in the world.\n\nPD is the second most common neurodegenerative disease and is responsible for a considerable amount of disability-adjusted life years and deaths globally. In recent decades, we have witnessed a dramatic rise in the amount of people suffering from it worldwide, which is correlated with the ageing of the global population, as well as with other potential factors, such as air pollution and smoking.  \n\n##### PD symptoms.\n\nPD is manifested with mainly motor symptoms, such as resting tremor, muscular rigidity, bradykinesia, or even akinesia, postural and gait impairment, but is also related to non-motor characteristics, such as sleep dysfunction, autonomic dysfunction, including orthostatic and postprandial hypotension, fatigue, pain, hyposmia, bladder and gastrointestinal disturbances, cognitive deficits, depression, mood disorders, dementia and hallucinations. There are also indications that phonation and speech disorders are common early signs among PD patients.","metadata":{}},{"cell_type":"markdown","source":"#### This paper are analyzed 112 science papers from 2012 to 2021.  \n\n<img src=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8915040/bin/sensors-22-01799-g002.jpg\" width=\"800px\" height=\"100px\">\nFigure 1  \n\n* 2021 year till August","metadata":{}},{"cell_type":"markdown","source":"### 2. Our case (in this competition) - initial sensors<a id='initial-sensors'></a>\n\nThe first problem that will be discussed is PD diagnosis or equivalently the classification between PD patients and healthy controls, which is frequently addressed based on inertial signals. To this end, gait parameters have been extracted either manually via feature engineering techniques [49](https://www.sciencedirect.com/science/article/abs/pii/S2352648320300106?via%3Dihub),[50](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7377496/),[51](https://ieeexplore.ieee.org/abstract/document/8621466),[52](https://pubmed.ncbi.nlm.nih.gov/28288333/),[53](https://pubmed.ncbi.nlm.nih.gov/33438650/) or automatically via deep convolutional neural networks (CNNs) [54](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7375444/), to feed several classification algorithms. The deployed algorithms include support vector machines (SVMs), decision trees (DTs), random (RFs), bagged, boosted and fine trees, k-nearest neighbors (kNN), logistic regression (LR), linear discriminant analysis (LDA) and naïve Bayes (NB) classifiers, as well as multi-layered perceptrons (MLPs) or other neural networks (NNs).\n\nIt appears that when IMUs are attached to the feet, researchers achieve slightly higher performance than when sensors are attached to the waist or to the lower spine. For example, in [49](https://www.sciencedirect.com/science/article/abs/pii/S2352648320300106?via%3Dihub),[51](https://ieeexplore.ieee.org/abstract/document/8621466),[53](https://pubmed.ncbi.nlm.nih.gov/33438650/), PD diagnosis is performed with 90–99.33% accuracy by a DT, an MLP and an RF classifier, respectively, trained on feet signals, while 84.5–85.51% accuracy is obtained when kNN algorithms are trained over waist signals [50](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7377496/),[52](https://pubmed.ncbi.nlm.nih.gov/28288333/). Moreover, the performance does not seem to improve significantly when deep CNNs are deployed in [54](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7375444/), leading to 0.87 area under the receiver operating characteristic curve (AUROC).\n\nThe highest performance (96% accuracy) is obtained in [64](https://pubmed.ncbi.nlm.nih.gov/30106745/), with the help of a majority voting scheme over several conventional ML algorithms, while the lowest performance (68.64–73.81% accuracy) is obtained in [61](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7545260/) with an MLP, trained with features extracted by a convolutional autoencoder (AE), which was pre-trained on healthy subjects’ data.","metadata":{}},{"cell_type":"markdown","source":"<a id='3'></a>\n### 3. FoG - freezing of gate<a id='fog'></a>\n\nLower-limb analysis with inertial sensors can support the detection of freezing of gait (FoG) episodes. In [84](https://pubmed.ncbi.nlm.nih.gov/26737109/), accelerometer and gyroscope signals feed an AdaBoost classifier and detect FoG with sensitivity ranging between 81.7% and 86%. For the same cause, DNNs have been deployed, such as CNNs [85](https://pubmed.ncbi.nlm.nih.gov/33019204/),[86](https://www.sciencedirect.com/science/article/pii/S0950705117304859?via%3Dihub), LSTMs [87](https://www.sciencedirect.com/science/article/abs/pii/S0167865519303563?via%3Dihub) or their combination [88](https://www.mdpi.com/2079-9292/9/11/1919). The highest accuracy (91.9%) is obtained with the combination of a CNN and an attention-enhanced LSTM [88], while CNNs and LSTMs alone achieve 89% and 83.38% accuracy, respectively [85](https://pubmed.ncbi.nlm.nih.gov/33019204/),[86](https://www.sciencedirect.com/science/article/pii/S0950705117304859?via%3Dihub),[87](https://www.sciencedirect.com/science/article/abs/pii/S0167865519303563?via%3Dihub).  \n\nFurthermore, ML algorithms trained with inertial sensors signals may predict FoG episodes in a short time of period, or equivalently may classify gait sequence segments in walking, pre-FoG, FoG or post-FoG/walking phases. This problem is addressed in several studies [89](https://ieeexplore.ieee.org/abstract/document/8614188),[90](https://pubmed.ncbi.nlm.nih.gov/31398122/),[91](https://www.sciencedirect.com/science/article/abs/pii/S0167865520303524?via%3Dihub),[92](https://ieeexplore.ieee.org/document/9458264),[93](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5557770/),[94](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7830634/) that mainly use the open Daphnet [dataset](https://archive.ics.uci.edu/ml/datasets/Daphnet+Freezing+of+Gait), accessed on 17 February 2022).  \n\nMany algorithms have been deployed to address this task, including LSTM, SVM, kNN, MLP, extreme gradient boosting (XGBoost), RF, gradient boosting machine (GBM), LR and LDA models among others. In [89](https://ieeexplore.ieee.org/abstract/document/8614188), 85–95% accuracy is obtained with an LSTM NN; in [90](https://pubmed.ncbi.nlm.nih.gov/31398122/),[91](https://www.sciencedirect.com/science/article/abs/pii/S0167865520303524?via%3Dihub),[94](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7830634/), 77–86.1% accuracy is obtained with SVMs; in [93](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5557770/), 83% accuracy is obtained with LDA; while in [92](https://ieeexplore.ieee.org/document/9458264), 98.92% is obtained with a kNN classifier. Generally, in this case, it can be concluded that DL approaches tend to perform better than the ones that make use of conventional ML models. Finally, gait features extracted from feet-worn IMUs can also be leveraged for strides detection or gait segmentation of PD patients with the help of hierarchical HMMs [95](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5796275/). The respective f1-score ranges between 95.9% and 100%.","metadata":{}},{"cell_type":"markdown","source":"### 4. Collective Comparison and Overall Insights across the Studied Approaches<a id='comparison'></a>\n\n#### 4.1. Sensors and Devices Deployed<a id='sensors'></a>\n\nThe types of sensors that are deployed for data collection and their popularity among the studies considered are depicted in Figure 2 below.\n\n<img src=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8915040/bin/sensors-22-01799-g003.jpg\" width=\"800px\" height=\"100px\"> \nFigure 2","metadata":{}},{"cell_type":"markdown","source":"As Figure 3 indicates, the most widely encountered type of device in the literature corresponds to other wearable sensors or sensors that are mounted somehow to the patients’ corpus, e.g., via flexible bands, such as Shimmer3 or Physilog sensors.\n\n<img src=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8915040/bin/sensors-22-01799-g004.jpg\" width=\"800px\" height=\"100px\">  \nFigure 3","metadata":{}},{"cell_type":"markdown","source":"#### 4.2 Meta-Analysis over Sensor-Specific Results Obtained<a id='meta_analysis'></a>\n\nThe occurrences of all the problems tackled with inertial data are summarized in the column chart of Figure 4, which confirms that PD diagnosis, symptom severity estimation and FoG detection are the most widely addressed problems based on inertial data.\n\n<img src=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8915040/bin/sensors-22-01799-g005.jpg\" width=\"800px\" height=\"100px\">  \n\nFigure 4","metadata":{}},{"cell_type":"markdown","source":"#### 4.3. Overall Addressed Problems Related to Parkinon’s Disease and Obtained Accuracies<a id='problems'></a>\n\nAs Figure 5 indicates, the detection of FoG episodes and other PD symptoms, including tremor, bradykinesia, dyskinesia, cognitive impairment and deficient facial expressivity, are quite popular topics in the current literature search.\n\n<img src=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8915040/bin/sensors-22-01799-g009.jpg\">  \nFigure 5","metadata":{}},{"cell_type":"markdown","source":"Now lets see at Figure 6:  \nComparison between the best performing proposed models among all the different types of sensors (a) regarding diagnosis; (b) regarding severity estimation. In both cases, the horizontal axis refers to the indices of the studies.\n\n<img src=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8915040/bin/sensors-22-01799-g010.jpg\">  \nFigure 6","metadata":{}},{"cell_type":"markdown","source":"Next, distribution of the deployed ML algorithms over the considered studies there is on Figure 7.  \n\nThe blue bar depicts how many times each algorithm was tested, while the orange bar depicts how many times the same algorithm was selected as the best performing model or as a part of the final proposed solution. For the most widely tested algorithms, the ratio of the two previous values (grey bar) is also depicted (%).\n\n<img src=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8915040/bin/sensors-22-01799-g011.jpg\">  \nFigure 7","metadata":{}},{"cell_type":"markdown","source":"And finally, distribution of the number of the enrolled subjects across the studies considered on Figure 8.  \n(a) Total population size across the studies considered in logarithmic scale-based bins. (b) The rate of PD patients to total subjects enrolled across the studies considered in 20-width bins.\n\n<img src=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8915040/bin/sensors-22-01799-g012.jpg\">  \nFigure 8","metadata":{}},{"cell_type":"markdown","source":"### 5. Discussion and Conclusions<a id='conclusions'></a>\n\nThe systematic review presented in this paper considers 112 studies, published in the last decade, which propose ML models trained with data collected via sensors and IoT technologies to address various PD-related problems.  \n\nTo conclude, there is evidence that ML models and IoT technologies can revolutionize the way that PD and other chronic diseases are diagnosed and treated. As the promising results of the last decade indicate, the adoption of smart technologies in clinical practice can support clinicians in several decision-making processes, potentially reducing the current extremely high healthcare costs and counterpoising the consequences of the medical resources shortage. \n\nMoreover, the continuous remote monitoring of PD patients with wearable or non-wearable sensors could potentially provide much more useful information and shed light on PD aspects that otherwise may not be perceived through follow-up appointments. To achieve that, more sensors could be deployed in larger cohorts to feed novel ML and DL models with data and achieve more accurate predictions and estimations in currently ill-addressed PD-related problems, overcoming the respective challenges. In this way, AI and IoT interventions may finally support precise medicine and help clinicians to propose personalized treatment schemes and potentially maximize patients’ responses to them.","metadata":{}},{"cell_type":"markdown","source":"#### Thank you, guys, for reading my review of this article. If you liked it or found it helpful, please vote for it. It inspires me even more to continue doing what I do =)\n\nSee you again, yours, Aalf.  \n\n<img src=\"https://drive.google.com/uc?id=1vQxpAKwPl6rD3y33Too2maygx0TWE7Nu\" width=\"400px\" height=\"400px\">","metadata":{}}]}