## 3 Proposed Method
### Objective Functions  
The quality of a candidate solution is measured by the objective functions. In order to find the best solution for recognizing a particular gesture using LM-WLCSS, five functions have been considered:  
\[\text{minimize}\quad\mathbf{F}(\text{x}) =[-f_{1}(\text{x}),-f_{2}(\text{x}),-f_{3}(\text{x}),-f_{4}(\text{ x}),f_{5}(\text{x})]^{T}\] (12) where \[f_{1}(\text{x}) =F1 score=2\times\frac{precision\times recall}{precision+recall} \tag{13}\] \[f_{2}(\text{x}) =\frac{1}{|\bar{s}_{c}||S_{c}|}\sum_{y\in S_{c},y\
eq\bar{s}_{c}}l (\bar{s}_{c},y)\] (14) \[f_{3}(\text{x}) =Ameva(\mathcal{L}_{c})\] (15) \[f_{4}(\text{x}) =-\sum_{c\in T_{c}}\frac{p(e)\log(p(e))}{\log(|T_{c}|)}\] (16) \[f_{5}(\text{x}) =\frac{\sum_{y\in\mathcal{P}_{c}}[y=1]}{n}\] (17) subject to \[|T_{c}| \geq 3\] (18) \[\omega_{c} \geq 0 \tag{19}\]  
where \(T_{c}\) is the set of distinct discretization points in the elected template \(\bar{s}_{c}\), \(|T_{c}|\) is the number of distinct elements in the latter, and \([. ]\) denotes the Iverson bracket. Let us firstly define the basic terms generated by a confusion matrix: \(tp\) (true positives) is the number of correctly identified samples, \(fp\) (false positives) refers to the incorrectly identified samples, \(tn\) (true negatives) is the number of correctly rejected samples, and \(fn\) (false negatives) refers to the incorrectly rejected samples. In (13), \(f_{1}\) measures how well the trained binary classifier performs on the testing data set. Although the accuracy is widely acknowledged, it cannot be used as exclusive performance recognition indicator, since the classifier could have exactly zero predictive power [55]. We alternatively selected the F1 score, defined as the harmonic mean of precision and recall, where \(precision=\frac{tp}{tp+fp}\) and \(recall=\frac{tp}{tp+fn}\). The objective function \(f_{2}\), in (14), directly comes from the template construction during the training phase of the binary classifier. It is the average sum of the longest common subsequence between the elected template \(\bar{s}_{c}\) and the other quantized gesture instances in the gesture class training data set. The higher the score is, the more the template represents the gesture class \(c\). The Annexin criterion, determined by the objective function \(f_{3}\) in (15), expresses the quality of the discretization scheme component of the solution. Its highest values are attained when all samples from a specific class are quantized to a unique discretization point (the other discretization points have no associated samples). Additionally, the criterion favours a low number of discretization points. Since there are only two classes in this problem, i.e., the samples from the gesture class \(c\) represents the positive class, and all others examples are negatives; it might be possible to encounter similarities in the different gesture executions for both classes. As a result, negative examples might be quantized into the same discretization points defining the class template \(\bar{s}_{c}\), and the Ameva criterion might try to create unnecessary discretization points. To overcome this issue, a constraint on the template, defined in (18), imposes that the latter must be defined by at least three distinct discretization points. Additionally, in (16), the objective function \(f_{4}\) counters this conflicting situation and measures heterogeneity by the normalized entropy of the elected template \(\bar{s}_{c}\) included between \([0,1]\). Lower appearance of a discretization point in the template is thus penalized. The Ameva criterion may be interchanged with ur-CAIM or any other discretization criterion. In (17), the last objective function indicates the average number of selected features in the current solution, as we need to reduce the number of features. Algorithm 2 presents the pseudo-code of the evaluation procedure of a candidate solution \(\mathrm{x}\).