Skip to main content
. 2018 Oct 25;18(11):3629. doi: 10.3390/s18113629
Algorithm 1. The Pseudo-code of the Hierarchical Activity Recognition Method
Inputs:
   (1) dataset with activity labels
   (2) the hierarchical tree T associated with the activity labels
Output:
   (1) a set of classifiers and feature subsets
1. cls_fs = {}; //a set used for storing outputs
2. For each non-leaf node nd do
  (2.1) search the child nodes ↓(nd) of nd with T;
  (2.2) obtain a training set Tr(nd) using ↓(nd);
  (2.3) do feature selection on Tr(nd), and get Snd;
  (2.4) construct a classifier clsnd using Tr(nd) and Snd;
  (2.5) cls_fs.add(< clsnd, Snd>); // add it to cls_fs
3. return cls_fs