Implementation of Machine Learning Classification Regarding Hemiplegic Gait Using an Assortment of Machine Learning Algorithms with Quantification from Conformal Wearable and Wireless Inertial Sensor System

The quantification of gait is uniquely facilitated through the conformal wearable and wireless inertial sensor system, which consists of a profile comparable to a bandage. These attributes advance the ability to quantify hemiplegic gait in consideration of the hemiplegic affected leg and unaffected leg. The recorded inertial sensor data, which is inclusive of the gyroscope signal, can be readily transmitted by wireless means to a secure Cloud. Incorporating Python to automate the post-processing of the gyroscope signal data can enable the development of a feature set suitable for a machine learning platform, such as the Waikato Environment for Knowledge Analysis (WEKA). An assortment of machine learning algorithms, such as the multilayer perceptron neural network, J48 decision tree, random forest, K-nearest neighbors, logistic regression, and naïve Bayes, were evaluated in terms of classification accuracy and time to develop the machine learning model. The K-nearest neighbors achieved optimal performance based on classification accuracy achieved for differentiating between the hemiplegic affected leg and unaffected leg for gait and the time to establish the machine learning model. The achievements of this research endeavor demonstrate the utility of amalgamating the conformal wearable and wireless inertial sensor with machine learning algorithms for distinguishing the hemiplegic affected leg and unaffected leg during gait. for characterizing the sagittal plane of the thighs during gait. The Y-direction gyroscope signal was the basis for composing the feature set for machine learning classification. The sampling rate of the BioStamp nPoint was set to 250 Hz.


INTRODUCTION
The opportunity to quantify gait patterns is an inherent aspect for the feedback of rehabilitation efficacy. However, traditional gait analysis apparatus for quantifying gait characteristics is generally reserved for a clinical gait laboratory [1][2][3][4]. The development of wearable and wireless systems that incorporate inertial sensors enables the ability to quantify gait at the convenience of a setting of the subject's preference [1,3,[5][6][7][8][9][10][11][12].
The next evolutionary phase involves the development of the conformal wearable and wireless inertial sensor system, such as the BioStamp nPoint. The BioStamp nPoint is applied to any aspect of the human anatomy through an adhesive medium, and the profile is on the order of a bandage. The acquired inertial sensor signal data can be wirelessly transmitted to a secure Cloud. Additionally, the BioStamp nPoint has achieved FDA 510(k) certification for the acquisition of medical grade data of clinical quality [11,15]. The objective of the research endeavor was to differentiate between an affected leg and an unaffected leg for hemiplegic gait using the conformal wearable and wireless inertial sensor system provided by the BioStamp nPoint and an assortment of machine learning algorithms, such as the multilayer perceptron neural network, J48 decision tree, random forest, K-nearest neighbors, logistic regression, and naïve Bayes. The performance of these machine learning algorithms was evaluated in the context of the classification accuracy achieved to differentiate the affected leg and unaffected leg respective of hemiplegic gait and the time to develop the machine learning model.

Gait and the Effect of Traumatic Brain Injury
Characteristically healthy gait involves rhythmic transition between alternating phases, such as stance and swing [4,16,17]. The neurological basis for the highly coordinated process of gait derives from interneuronal, subcortical, and cortical aspects of the neuroanatomy [4,16,18]. The motor regulation of gait can be disrupted by traumatic brain injury [17].
For example, traumatic brain injury inducing hemiplegia can cause spastic movement disorder, which leads to impairment of gait [4,5,16,[19][20][21]. This development can lead to non-optimal motor strategies for gait. Mass extension and mass flexion primitive locomotion patterns can manifest [17]. Compensatory gait strategies can involve vaulting and circumduction [4,19]. Wearable and wireless inertial sensor systems have been proposed for the quantification and determination of rehabilitation efficacy for the restoration of gait to more optimal functionality [1, 3, 5-11].

Evolutionary Pathway to Conformal Wearable and Wireless Inertial Sensor Systems
Preliminary inertial sensor systems were successfully applied for the analysis of gait in alignment with the progressive evolution of inertial sensor systems for disparate industries with considerable manufacturing economies of scale [3,5]. The integral evolution with wireless systems rendered tethering techniques obsolete [22]. Effectively wearable and wireless inertial sensor systems, such as enabled through accelerometers, identified hemiplegic gait disparity of the affected leg contrasted to the unaffected leg in a quantified context, and also enabled real-time modification of the hemiplegic affected leg to a more resemblant acceleration waveform of the unaffected leg [19,20,[23][24][25]. The next progressive evolution of wearable and wireless inertial sensor systems for gait quantification and analysis incorporated the smartphone and portable media device [1,[6][7][8][9][10][11]13].
During 2010 LeMoyne and Mastroianni demonstrated the notable utility of incorporating a smart-phone as a functionally wearable and wireless inertial sensor system for quantifying gait [26][27][28]. A notable feature of the smartphone as a functional wearable and wireless inertial sensor system is the observation that the experimentation site and location for post-processing the trial data can be remotely situated anywhere in the world. The trial data can be wirelessly conveyed to the Internet as an email attachment [1,[6][7][8][9][10]13]. The portable media device possesses functional resemblance to the smartphone with the requirement of a local wireless zone for wireless Internet connectivity. During 2011 LeMoyne and Mastroianni successful tested and evaluated the portable media device for quantifying gait status [29]. With two portable media devices mounted to the hemiplegic affected leg and unaffected leg the quantified disparity of hemiplegic gait was successfully identified [30].
In order to utilize the smartphone as a functionally wearable and wireless inertial sensor system for quantifying and comparing hemiplegic gait, a treadmill was incorporated to maintain constant gait velocity. Using one smartphone the hemiplegic affected leg would be quantified in terms of the accelerometer signal, and the unaffected leg would be quantified in terms of the accelerometer signal with the same treadmill speed. Using the accelerometer signal the smartphone identified notable quantified disparity between the hemiplegic affected leg and unaffected leg [31].
With a similar approach of incorporating a treadmill with constant speed and a single smartphone, the gyroscope signal was measured for hemiplegic gait. During this experiment, the multilayer perceptron neural network was applied as the machine learning classification algorithm [32]. The development of conformal wearable and wireless inertial sensor systems constitutes a considerable advance relative to standard wearable and wireless inertial sensor systems [11].
The state of the art conformal wearable and wireless inertial sensor system is represented by the Bi-oStamp nPoint. The BioStamp nPoint has a profile on the order of a bandage with a mass less than ten grams. The device utilizes wireless connectivity to a tablet and smartphone for operation, and the recorded accelerometer and gyroscope data is conveyed wirelessly to a secure Cloud for subsequent post-processing [11,15]. The apparatus for operating the BioStamp nPoint is presented in Figure 1.
The research objective was to utilize the BioStamp nPoint as a conformal wearable and wireless inertial sensor system for the quantification of hemiplegic gait using an assortment of machine learning algorithms, such as the multilayer perceptron neural network, J48 decision tree, random forest, K-nearest neighbors, logistic regression, and naïve Bayes, to distinguish between the hemiplegic affected leg and unaffected leg. With the experimental gait data downloaded from the secure Cloud the inertial signal data can be post-processed using Python as automation software and consolidated into a feature set suitable for machine learning classification. The Waikato Environment for Knowledge Analysis (WEKA) provides the machine learning platform for applying the assortment of machine learning algorithms to distinguish hemiplegic gait.

MATERIALS AND METHODS
Preliminary testing and evaluation of the BioStamp nPoint for gait analysis was conducted from the perspective of engineering proof of concept for one subject with chronic hemiparesis. Given the conformal features of the BioStamp nPoint as a wearable and wireless inertial sensor system, the mounting of the device was about the distal aspect of the femur relative to the hip joint for both the affected leg and unaffected leg superior to the patella as illustrated in Figure 2. Since the BioStamp nPoint has a profile comparable to that of a bandage, the wearable and wireless inertial sensor nodes secure to the thigh in a highly non-intrusive manner.
The gyroscope signal has been observed as providing a clinically representative interpretation of human movement about a jointed system [32][33][34]. The gyroscope signal of the BioStamp nPoint was selected as the inertial sensor signal of interest. In particular, given the orientation of the BioStamp nPoint about the thigh, the Y-direction of the gyroscope was considered most appropriate for characterizing the sagittal plane of the thighs during gait. The Y-direction gyroscope signal was the basis for composing the feature set for machine learning classification. The sampling rate of the BioStamp nPoint was set to 250 Hz.  The post-processing of the acquired inertial sensor signal data was achieved through Python. Python provided a highly automated basis for both visualizing the data and consolidating the data into numeric attributes for the feature set in a manner amenable for the Waikato Environment for Knowledge Analysis (WEKA). The following machine learning algorithms were applied: • multilayer perceptron neural network • J48 decision tree • random forest • K-nearest neighbors • logistic regression • naïve Bayes The machine learning procedure utilized tenfold cross-validation [35][36][37]. The feature set was com-J. Biomedical Science and Engineering posed of five numeric attributes from the gyroscope signal: maximum, minimum, mean, standard deviation, and coefficient of variation. These numeric parameters have been successfully applied in previous machine learning classification endeavors involving inertial sensor signal data for measuring gait characteristics [32,38]. The recording of hemiplegic gait through the conformal wearable and wireless inertial sensor system provided by the BioStamp nPoint was conducted in an indoor environment. A treadmill was utilized and set to a speed of 1.0 mile per hour. Subsequently, the inertial sensor signal data acquired by the BioStamp nPoint as a conformal wearable and wireless inertial sensor system was conveyed by wireless transmission to a secure Cloud for post-processing. The following experimental protocol was applied: 1) Mount the BioStamp nPoint by adhesive medium superior to the patella and distal regarding the femur relative to the hip joint about the top of the thigh for both the hemiplegic affected leg and unaffected leg.
2) Initiate the treadmill to a speed of 1.0 mile per hour.
3) Have the subject begin to walk on the treadmill. 4) Commence the recording of BioStamp nPoint by local wireless connectivity for a duration sufficient to record approximately two minutes and thirty seconds to provide thirty time slices of five seconds. 5) Upon completion stop the recording of the BioStamp nPoint using local wireless connectivity. 6) Wirelessly transmit the BioStamp nPoint inertial sensor signal data to the secure Cloud for post-processing.

RESULTS AND DISCUSSION
The BioStamp nPoint enables highly robust acquisition of gait characteristics by inertial sensor data in a functionally autonomous environment. Using an adhesive medium, the inertial nodes of the BioStamp nPoint can be conveniently worn about any aspect of the body for gait analysis. The flexible bandage-like profile induces minimal encumbrance to the gait cycle. After the gait experiment, the signal data can be readily wirelessly conveyed to a secure Cloud for post-processing anywhere in the world.
The inertial sensor nodes of the BioStamp nPoint reveal notable quantified disparity by comparison of the hemiplegic affected leg relative to the unaffected leg. Figure 3 illustrates the gyroscope signal of gait for the unaffected leg. Figure 4 represents the gyroscope signal of gait with respect to the hemiplegic affected leg. The comparison of the gyroscope signals between the hemiplegic affected leg and unaffected leg demonstrates impaired and less rhythmically fluid movement of the hemiplegic leg.
An automation software program using Python was applied to consolidate the gyroscope signal data to an Attribute-Relation Format File (ARFF) for WEKA. The feature set consists of 30 instances for the hemiplegic affected leg and 30 instances for the unaffected leg. The multilayer perceptron neural network was one of the selected machine learning classification algorithms. Figure 5 demonstrates the multilayer perceptron neural network generated by WEKA for distinguishing between the hemiplegic affected leg and unaffected leg during hemiplegic gait. The multilayer perceptron neural network consisted of five input layer nodes, three hidden layers nodes, and two output layer nodes. The multilayer perceptron neural network achieved 98.3% classification accuracy for differentiating between the hemiplegic affected leg and unaffected leg. Regarding the confusion matrix one unaffected leg instance was misclassified as a hemiplegic affected leg instance. The time to develop the machine learning algorithm lasted 0.2 seconds.
The J48 decision tree achieves a classification accuracy of 98.3%, and the J48 decision tree was visualized in Figure 6, which inferred the significance of the numeric attribute representing the minimum of the gyroscope signal. In terms of the confusion matrix one instance of the affected leg was misclassified as the unaffected leg. The J48 decision tree was developed within the span of 0.03 seconds.
The random forest achieves a classification accuracy of 96.7%. In consideration of the confusion matrix two instances were misclassified. One instance of the affected leg was misclassified as the unaffected leg, and one instance of the unaffected leg was misclassified as the affected leg. The random forest machine learning algorithm required 0.19 seconds to be developed. J. Biomedical Science and Engineering  The K-nearest neighbors machine learning algorithm established impressive performance with respect to both classification accuracy and time to develop the machine learning model. The K-nearest neighbors machine learning algorithm attained 100% classification accuracy to distinguish between the Figure 5. The multilayer perceptron neural network for distinguishing between a hemiplegic affected leg and unaffected leg using the gyroscope signal quantified by the BioStamp nPoint conformal wearable and wireless inertial sensor system. Figure 6. The J48 decision tree for distinguishing between a hemiplegic affected leg and unaffected leg using the gyroscope signal quantified by the BioStamp nPoint conformal wearable and wireless inertial sensor system. affected leg and unaffected leg during hemiplegic gait. Additionally, the time to develop the machine learning model occurred within less than 0.01 seconds.
The logistic regression algorithm achieved 95% classification accuracy with the misclassification of three instances. One affected leg instance was misclassified as an unaffected leg instance, and two unaffected leg instances were misclassified as affected leg instances. The machine learning model required less than 0.01 seconds to be established.
The naïve Bayes machine learning algorithm attained 98.3 classification accuracy. In consideration of the confusion matrix one unaffected leg instance was misclassified as an affected leg instance. The time to develop the naïve Bayes machine learning algorithm occurred within less than 0.01 seconds.
Deep learning algorithms are recommended for the evaluation of gait rehabilitation status, especially in light of the considerable increase in the amount of gait data derived from conformal wearable and wireless inertial sensor systems. These developments are also anticipated to develop the presence of data science for the optimization of gait rehabilitation strategies. Another similar themed evolution in coherence with the testing and evaluation of conformal wearable and wireless inertial sensor systems involves J. Biomedical Science and Engineering sensor fusion to represent highly clinically discernible information regarding spatial and temporal representation of gait [1,39].
Another conceptual amalgamation is the integration of Virtual Proprioception with conformal wearable and wireless inertial sensor systems for modifying gait strategy respective of a real-time and autonomous environment of the subject's preference. Inertial sensor feedback could involve modifying the gait strategy of the affected leg to achieve a restorative semblance to the unaffected leg. Targeted limb joint relationships of the leg could be specified according to the mounting position of the conformal wearable and wireless inertial sensor system, and quantified feedback regarding the degree of convergence for the affected leg to the unaffected leg could be provided according to the optimal learning process specific to the patient, such as visual, auditory, and haptic methods. Applications of Virtual Proprioception have been achieved for real-time hemiplegic gait rehabilitation and eccentric training of the upper arm [19,20,40,41].

CONCLUSIONS
Hemiplegic gait has been successfully distinguished through the application of the BioStamp nPoint, which is a conformal wearable and wireless inertial sensor system, and an assortment of machine learning algorithms. The BioStamp nPoint has a profile similar to that of a bandage and mounted by adhesive medium to effectively any aspect of the human anatomy. Software automation, such as through Python, was applied to consolidate the gyroscope signal data into a feature set using descriptive statistics as numerical attributes. The K-nearest neighbors machine learning algorithm achieved optimal performance in terms of classification accuracy attained for differentiating between the hemiplegic affected leg and unaffected leg for gait and the time to develop the machine learning model.
Future extrapolations of the research objective are envisioned, such as the evolution to more sophisticated deep learning algorithms. The development of sensor fusion algorithms is recommended for the further visualization of clinically relevant parameters for gait. Real-time rehabilitation feedback techniques, such as Virtual Proprioception, can enable the development of patient specific optimal motor strategies for gait.

CONFLICTS OF INTEREST
The authors declare no conflicts of interest regarding the publication of this paper.