# Post-Stroke Gait Classification Based on Feature Space Transformation and Data Labeling
## 4 Feature Space Transformation and Data Labeling  
The patient (instance) before therapy is represented in feature space as the three-dimensional feature vector \(x=[nv(bt),nc(bt),nsl(bt)]\) where \(nv(bt)\)--normalized velocity; \(nc(bt)\)--normalized cadence; and \(nsl(bt)\)--normalized stride length before therapy, respectively. After the second patient investigation (after therapy), the feature space will be increased by another three dimensions which are \(nv(at)\)--normalized velocity; \(nc(at)\)--normalized cadence; and \(nsl(at)\)--normalized stride length after therapy, respectively. We propose to define three subspaces of feature space related to different types of measurements (normalized velocity, normalized cadence, and normalized stride length). The subspaces are as follows: \([nv(bt),nv(at)]\), \([nc(bt),nc(at)]\), \([nls(bt),nls(at)]\). The domain knowledge about the treatment might suggest that the difference between measurement values before and after therapy is important, and hence we propose to define a new feature subspace by mapping according to the formula:  
\[\Phi[fs(bt),fs(at)]\rightarrow[fs(at),fs(at)-fs(bt)]^{\prime}, \tag{1}\]  
where \(fs\in\{nv,nc,nls\}\). To define new domain knowledge concepts (class labels), we propose the use of the clustering method [12]. The cluster centroids can be taken as the representation of the domain knowledge concepts in the feature subspace. Those clusters centroids are abstract instances, while the actual instances closest to the centroid of a given cluster have a label like this centroid. The class labels of the centroids are manually determined by an expert. The procedure of the proposed features subspaces transformation and class labels definition is presented in Algorithm 1. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Normalized Velocity** & **Normalized Cadence** & **Normalized Stride Length** \\ \hline Mean & 0.0364 & 0.02 & 0.24 \\ SD & 0.008 & 0.006 & 0.072 \\ Min & \(-\)0.07 & \(-\)0.18 & \(-\)0.6 \\ Q1 & \(-\)0.02 & \(-\)0.06 & 0.11 \\ Median & 0.01 & 0 & 0.19 \\ Q3 & 0.08 & 0.09 & 0.38 \\ Max & 0.25 & 0.34 & 1.19 \\ \(p\)-value & 0.047 & 0.033 & 0.022 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The change in parameters’ values reflecting the effect of rehabilitation in the study group. \begin{table}
\begin{tabular}{c c c} \hline \hline  & **Normalized Velocity** & **Normalized Cadence** & **Normalized Stride Length** \\ \hline \multicolumn{3}{c}{Reference group} \\ \hline Mean & 0.606 & 0.618 & 1.931 \\ SD & 0.061 & 0.054 & 1.211 \\ Min & 0.52 & 0.54 & 1.7 \\ Q1 & 0.56 & 0.57 & 1.745 \\ Median & 0.58 & 0.61 & 1.835 \\ Q3 & 0.66 & 0.66 & 2.177 \\ Max & 0.72 & 0.73 & 2.23 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: _Cont._ \begin{table}
\begin{tabular}{c c c} \hline \hline  & **Normalized Velocity** & **Normalized Cadence** & **Normalized Stride Length** \\ \hline Recovery & 13 (52\%) & 12 (48\%) & 19 (76\%) \\ No change & 3 (12\%) & 2 (8\%) & 2 (8\%) \\ Relapse & 9 (36\%) & 11 (44\%) & 4 (16\%) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The general effect of rehabilitation in the study group (n = 25). The labeling results for the two new concepts are shown in Figure 1 for each of the three feature subspaces. In this case, we defined two new concepts (class labels): _improvement_ and _relapse_ (abbreviation im and re in Table 5). The first class label indicates the patient's improvement after treatment, while the second class label indicates no improvement in the patient's condition. In Figure 1, the _improvement_ class label is assigned to the blue points while the red points indicate the objects with the _relapse_ class label in each feature subspace. The points with a black outline represent centroids obtained by the K-means algorithm. The obtained results show that instances are just as labeled in normalized velocity and normalized cadence feature subspace.