## 3 Proposed Method
### Activity Recognition Model  
A model \(M\) for activity recognition is created using machine learning algorithms. As it was already mentioned above in this section, the human activity has to be recognized based on incomplete data sets. In order to deal with the missing (not transmitted) data, an ensemble learning method was used in this study. To be specific, the considered recognition model \(M\) is an ensemble of sub-models. Each sub-model is trained to recognize human activity based on data from different subset of the sensor nodes. For instance, let us consider a network composed of cluster head and one sensor node. In this case two sub-models are used. The first sub-model, which takes into account data from both nodes, will recognize the activity when data from the sensor node are transmitted. In opposite situation, the second sub-model will recognize the activity on the basis of data only from the cluster head. Hereinafter, the symbol \(SM(Z)\) stands for the sub-model, which is designed to recognize the human activity based on data delivered from sensor nodes belonging to subset \(Z\). A separate sub-model \(SM(Z)\) is trained for each non empty subset of nodes \(Z\), such that \(Z\subseteq I\), where \(I=\{1\ldots n\}\) denotes a set of indices used for identification of sensor nodes, and \(n\) is the total number of sensor nodes. The sub-models training is based on data sample \((S^{\prime},A^{\prime})\), which includes examples of sensor readings \((S_{i,t},i\in I,t\in T)\) and labels indicating relevant human activities \((a_{t},t\in T)\) for time period \(T\). The examples used for training of sub-model \(SM(Z)\) are obtained from \((S^{\prime},A^{\prime})\) by selecting the sensor readings for the nodes that belong to \(Z\). These examples are defined as tuples \((S_{t},a_{t})\), where \(S_{t}=\{S_{i,t}:i\in Z\}\) and \(t\in T\). The number of all possible sub-models equals to \(2^{n}-1\). Thus, this number increases fast with the number of sensor nodes (\(n\)). However, the considered wearable sensor networks for human activity monitoring consist of only few sensor nodes [32] and in this case the above model ensemble can be easily implemented (e.g., for \(n=3\) the number of all sub-models equals 7). In order to recognize human activity, during operation of the sensor network, the cluster head selects appropriate sub-model \(SM(Z)\), where \(Z\) corresponds to the set of sensor nodes that currently deliver data readings. It should be noted that the cluster head node always has the access to its own sensor readings. Thus, if \(i^{*}\) is the identifier of cluster head then the ensemble model needs to include sub-models \(SM(Z)\), where \(  
iterations, the number of utilized nodes is increased, until the human activity is correctly recognized or all nodes in the cluster are taken into account. The resulting subset of sensor nodes is identified by binary variables \(d_{i,t},i=1\ldots n\), where \(n\) corresponds to the total number of sensor nodes and meaning of the \(d_{i,t}\) values was explained above for Equation (1). As discussed in Section 3.1, separate classification model \(M_{i}\) is needed for each sensor node (\(i\
eq i^{*}\)) to make decisions about necessity of data transmissions (see Algorithm 1). The training of models \(M_{i}\) is performed with use of sensor readings from the sample data set (\(S^{\prime\prime}\)) and decisions \(D\) determined by Algorithm 3. Formally, the set of data used to train model \(M_{i}\) for \(i\)-th sensor node is represented as a set of tuples \((S_{i,t},d_{i,t})\), where \(t=1\ldots,m\).