## 4 Experiments
### Results and Discussion  
Initial experiments were conducted to compare the accuracy of human activity recognition for various machine learning algorithms (classifiers). The compared algorithms include: probabilistic neural network (PNN), support vector machines (SVM), k-nearest  
Figure 5: Block diagram of the experimental testbed. Figure 6: Computer laboratory. neighbours algorithm (k-NN), random tree (RT), and random forest (RF). During these tests the data reduction was not executed, i.e., all collected sensor readings were taken into account. The initial tests were carried out using implementations of the machine learning algorithms that are available in the WEKA package. Results of this comparison (Figure 7) clearly demonstrate that the data collected by the proposed wearable sensor network enables recognizing the human activities with a high accuracy. Parameters of the compared machine learning algorithms were selected empirically based on our preliminary experiments. During experiments 60% of the data were used for training and 40% for testing. The test was executed 10 times for different divisions of the data into train and test sets. The error bars presented in Figure 7 correspond to maximum and minimum results of these tests, while columns depicts the average value. The PNN was trained using the constructive training algorithm, based on dynamic decay adjustment [47]. When using this algorithm, the PNN is dynamically constructed during training and the number of required hidden neurons is automatically adjusted. The PNN is built of neurons with a Gaussian activation function and models the probability distribution of each considered class through a combination of these Gaussians. The training algorithm adjusts each Gaussian function by taking into account two parameters (\(\Theta^{+}\) and \(\Theta^{-}\)) to avoid conflicts between different classes. The parameter settings used in this study are \(\Theta^{+}=0.4\) and \(\Theta^{-}=0.2\). The training of SVM aims at constructing hyperplanes defined in a multidimensional space that separate training data points belonging to different classes. To this end a training algorithm is used, which solves an optimization problem [48]. The iterative training procedure finds optimal hyperplanes with maximum distance to the nearest training data point of any class. The experiments were performed using C-SVC version of the SVM classifier [49] with radial basis function kernel. The k-NN classifier [50] evaluates distances between a test data point and all training data points in a multidimensional feature space. Based on the calculated distances, the nearest \(k\) training data points are selected. The classification result is determined as the class, which is most common among the \(k\) selected training data points. This algorithm was used during experiments with parameter \(k=3\), and the Euclidean distance was considered. The RT algorithm [51] builds a decision tree using a random procedure. Each node of the tree is split using the best split among a subset  
A high accuracy of human activity recognition was achieved using the sensor network with three wearable nodes. Figure 9 compares this result with the accuracy obtained in case when the input data for activity recognition algorithm are collected from one sensor node only. It should be noted that the experiments were performed by using the random forest algorithm for activity recognition. The Labels A, B, and C in Figure 9 identify the sensor nodes. ABC denotes the sensor network of three nodes. Sensor node A was placed on the person's chest, node B on the waist, and node C on the leg. Based on the chart in Figure 9, it can be observed that the accuracy obtained for separate sensor nodes are significantly lower than for the sensor network. This observation confirms that the use of network with three sensor nodes is justified. The meaning of error bars in Figures 9 and 10 is the same as discussed above for Figure 7.  
The main experiments were carried out in a time period of three weeks.