# Internet of Things for Sensing: A Case Study in the Healthcare System
## 4 Data Classification
### Support Vector Machine for Data Classification  
The advantage of using the SVM algorithm is that it provides efficient performance when it comes to practical problems [38; 39]. Also, the inner-product kernel functions of SVM solve the linearly non-separable problems in higher dimension space.  
The support vector machine is applied to classify subject's various activities such as walking, squatting, push-ups, sitting on a chair, and sleep episodes due to ND. The SVM is applied to the measured CFR data received using the S-band sense. SVM is a binary classifier developed for non-linear boundary problems [40]. A hyper-plane is used as a decision boundary to classify the two datasets. The closest data points to the hyper-plane, which impart construction of the hyper-plane, are called support vectors [41]. The optimum hyper-plane can be written as follows:  
\[w^{T}x+c=0, \tag{8}\]  
here \(w\) denotes the weight vector, \(x\) is the input vector and \(c\) is the bias. Support vectors representing each class are expressed as  
\[w^{T}x+c=1,\text{ for };\text{ corresponds to class A}\]  
\[w^{T}x+c=-1,\text{ for }y_{i}=-1;\text{ corresponds to class B}\]  
The optimum hyper-plane for training sample data is expressed as  
\[\text{min}\phi(w)=\frac{w^{T}w}{2},\text{ for }y_{i}(w^{T}x_{i}+c)\geq 1 \tag{9}\]  
where \(i=1,2,3,\,\ldots,\,n\). The inner product kernel functions used in this paper are shown in Table 1.  
Since we need to differentiate the ND sleep episodes from other four human activities, we adopt a one-versus-rest approach using SVM. The CFR data comprising amplitude information for the individual frequency and calibrated phase information is discussed in Section 3. Data obtained using S-band sensing techniques were processed to extract features for classifying various human activities accurately. The feature selection technique is important to reduce the number of operations and to represent the key changes against the amplitude or phase.  
Various human activities can be classified using time-domain analysis, frequency-domain analysis, and time-frequency domain analysis [39]. The time-domain features can be easily extracted since they are the simplest ones, as compared to the frequency-domain and time-frequency domain features. In time-domain approaches, the time-domain waveform is analyzed directly to extract statistical indices such as the root-mean-square amplitude, skewness, and kurtosis [31]. Frequency-domain approaches are usually employed to find the characteristic frequencies via frequency analysis, such as the Fourier spectrum, cepstrum analysis, and the envelope spectrum [42]. This approach is also simple and characterizes an intuitive nature by allotting the components to their corresponding frequency in a particular spectrum. Time-frequency domain approaches including wavelet analysis, the fast Fourier transform (FFT), Wigner-Ville distribution, and Hilbert-Huang transform, etc., investigate waveform signals in both the time and frequency domain and can provide more information about  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Type** & **Kernel Function** \\  & **K (v, x), \(i\) = 1, 2, 3, \(\ldots,\,P\)** \\ \hline Linear & \(x^{T}x_{i}+c\) \\ Polynomial & \(\left(x^{T}x_{i}+1\right)^{p}\) \\ Radial-basis function (RBF) & \(e^{(\frac{-|x_{i}|x_{i}|^{2}}{2\sigma^{2}})}\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Inner product kernel functions.  
the data classification [43; 44]. However, this approach is essentially more complicated than the frequency-domain or time-domain approaches in a practical scenario. In this study, we use 10 time-domain statistical features as listed in Table 2. Here, xi denotes a particular frequency of choice while x denotes the signal of every frequency.