Skip to main content
. 2017 Sep 8;17(9):2064. doi: 10.3390/s17092064
Algorithm 1 Training algorithm
  • 1: Construct a feature set ({f1,f2,,fn,(fi1,fj1),(fi2,fj2),,(f1,fi,,fm)}). The feature set is the combination of all features.

  • 2: Sorting features according to the power consumption of the sensor and the computational cost of feature extraction. The lower power consumption of the sensor ranks the higher. Features with lower computational cost have in higher priority when the sensor is the same.

  • 3: Selecting m top features with the higher priority from the feature set.

  • 4: For each of these m features, set the whole dataset as DataSets_In.

  • 5: Input DataSets_In. do

  • 6: {

  • 7:  Set parameter of clustering k = 2

  • 8:  Use k-means clustering algorithm to get two cluster A and B. The two clusters are the subsets of DataSets_In. Evaluate the performance of k-means clustering, select the optimal ones according the accuracy and the equilibrium of the two subset.

  • 9:  Input subsets A and B

  • 10:  Training a binary classifier SVM

  • 11:  SVM_n = SVM (n = 1, 2, 3……)

  • 12:  DataSets_In = subsets A or B respectively

  • 13: } while DataSets_In only contains data from a single class

  • 14: The resulting classifier (i.e., final classifier) is a one-node SVM classifier, as an N-class classification needs an N-1 node classifier.