**5.3 Machine learning algorithms**

*Wearable Devices - The Big Wave of Innovation*

triangular band-pass filter bank.

**5.2 Classification selection**

without the risk of overfitting.

training and 30% for validation.

For example, when working with a wearable acoustic sensor [50] aiming to recognize activity patterns like sitting, eating, and drinking and respiratory patterns such as whispering, deep breath, and coughing, the features extracted from

• Time domain features: these features were obtained using the zero-crossing

• Frequency domain features: to obtain these features, the FFT needs to be calculated. The features include total spectrum power, subband powers (summed power signal in logarithmically divided bands), brightness (frequency centroid), spectral roll-off (skewness of the spectral distribution), and spectral flux (L2-norm of the spectral amplitude difference of two adjacent frames, representing how drastically the sound changes between two frames).

• Cepstral features: commonly used for speech recognition and audio, the melfrequency cepstral coefficients are extracted with the application of a discrete cosine transform to the log-scaled outputs of the FFT coefficients filtered by a

It is also possible to use a tool that automatically extracts the features of the signals being studied. With the purpose of identifying talking in respiratory signals [10], more than 10 features were extracted using the Python library "tsfresh" [51]; those that presented more than 10% of recurrence between the tests were manually

It is common to extract a variety of features in a study, but the effectiveness of a machine learning algorithm strongly depends on which one will be selected and

After the selection of features to be used in the algorithm, it is important to decide which the classes are and how the data will be processed. It is important to select what will be used to train the algorithm and what will be used to validate it. There are several ways of separating the acquired data so that the network is trained

For instance, in Yatani and Tuong [25], two approaches were carried out:

chosen algorithm and using one participant to validate the results.

pant was left out for validation and the rest used for training.

• "Leave-one-participant-out": they worked with 9 samples of data, training the

• "Leave-one-sample-per-participant": an example of each class of each partici-

A different approach was used by Ejupi and Menon [10]: the data were obtained executing different activities such as walking, standing, and sitting, and an algorithm was trained for each one. For classification, 70% of the database was used for

These techniques prevent the major problem in machine learning, overfitting [52]. In case an algorithm is overfitted, it will produce inaccurate results creating unrealistic patterns. It is always wise to select which data will be used to train the algorithm and which will be used to validate the results, never using all dataset to just one task.

selected in order to use that feature for classification in the algorithm.

how the data will be selected for training and validation.

the sensor signals were related to time, frequency, and cepstral:

rate, that is, the rate of sign changes along a signal.

**64**

The strategy or algorithm to be used in a project as well as its effectiveness and performance are strongly dependent on the problem domain (e.g., data structure, database size, etc.) [53]. It is therefore impossible to choose a method as the best one regardless of domain intricacies. Some popular machine learning algorithms are presented in the following topics.
