## 5 Experimental Results and Evaluation  
The proposed system is evaluated using the \"leave one subject out\" (LOSO) cross-validation method with training and testing data. The three chosen classifiers with optimization algorithms are the following: the GA optimized by ACO, the DT optimized by wolf optimization, and the SVM optimized by PSO. The human activity classification algorithm is validated using precision, recall, and F-measure to identify different postures and movements. The precision is defined as the True positive (instances that belong to the class) by the total number of instances (True positive and False positive). \[\text{Precision}=\frac{\text{TP}}{\text{TP}+\text{FP}} \tag{20}\]  
The recall is defined as the proportion of instances classified in one class by the total instances. Total instances include True Positive (_TP_) and True Negative (_TN_) values. \[\text{Recall}=\frac{\text{TP}}{\text{TP}+\text{TN}} \tag{21}\]  
The F-measure is the combination of precision and recall and is defined as:  
\[F-measure=\frac{2\times\text{Precision}\times\text{Recall}}{\text{Precision}+ \text{Recall}} \tag{22}\]  
The classification results of the three classifiers, i.e., support vector machine, genetic algorithm, and decision tree on MOTIONSENSE, MHEALTH, and IM-AccGyro datasets are reported in Tables 1-3. All classifiers are trained on the training set. The classification results in Tables 1-3 were obtained by using the testing set. In Table 3, we got a better classification result on the IM-AccGyro dataset with an F-measure of more than 90% compared to the classification results of Tables 1 and 2, i.e., the MOTIONSENSE, and MHEALTH datasets. The overall results showed that our proposed method achieved better performance than other state-of-the-art methods. Figure 12: Placement of the sensors on the human body at the leg, neck, and arm positions for data acquisition of the self-annotated IM-AccGyro human-machine dataset. Table 4 depicts the confusion matrix of the MOTIONSENSE dataset for six different activities with a mean accuracy of 88.25%. Table 5 presents the mean accuracy of 93.95% on the MHEALTH dataset of 12 different activities. Table 6 shows the confusion matrix of the IM-AccGyro dataset for six different activities with an average accuracy of 96.83%. Table 7 presents the comparison results of the proposed approach over MOTIONSENSE, MHEALTH, and IM-AccGyro datasets, respectively. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline \multicolumn{1}{c}{**Dynamic Activities**} & \multicolumn{2}{c}{**Support Vector Machine**} & \multicolumn{2}{c}{**Genetic Algorithm**} & \multicolumn{2}{c}{**Decision Tree**} \\ \hline Activities & Precision & Recall & F-measure & Precision & Recall & F-measure & Precision & Recall & F-measure \\ \hline DWS & 0.860 & 0.830 & 0.844 & 0.910 & 0.875 & 0.892 & 0.927 & 0.890 & 0.908 \\ UPS & 0.843 & 0.878 & 0.860 & 0.873 & 0.838 & 0.855 & 0.989 & 0.985 & 0.987 \\ WLK & 0.884 & 0.849 & 0.866 & 0.809 & 0.834 & 0.821 & 0.807 & 0.880 & 0.842 \\ JOG & 0.908 & 0.873 & 0.890 & 0.925 & 0.890 & 0.907 & 0.820 & 0.845 & 0.832 \\ SIT & 0.853 & 0.818 & 0.835 & 0.844 & 0.869 & 0.856 & 0.895 & 0.860 & 0.877 \\ STD & 0.882 & 0.937 & 0.908 & 0.854 & 0.829 & 0.841 & 0.865 & 0.835 & 0.849 \\ \hline \multicolumn{1}{c}{DWS = Downstairs, UPS = Upstairs, WLK = Walking, JOG = Jogging, STT = Sitting, STD = Standing.} & & & & & & \\ \end{tabular}
\end{table} 
Table 1: The classification results of three classifiers on the MOTIONSENSE dataset.