# Intelligent Monitoring Platform to Evaluate the Overall State of People with Neurological Disorders
### Creation of a People Concentration Model in the Workstation
As the experimentation is performed in a controlled environment, the weather conditions are kept constant over time at both workstations. Therefore, ambient temperature, relative humidity, and atmospheric pressure do not provide information to the model that helps to predict the concentration level and are discarded. Similarly, the use of the ambient luminosity can be discarded as the values also remain constant over time and of the same magnitude, both at position A and B. Finally, the use of the magnetometer signal from the MA sensor is also discarded because it is not necessary to know the user's position. Thus, the heart rate and the body temperature signals of the user, the gyroscope and the accelerometer signals of the MA sensor, the ambient sound, and the signals of the video device (optical flow and people detection) would remain. When the available signals to be used have been decided, a preprocessing is performed before generating the dataset. The different transformations applied to each of them are described below. * **Sound:** The audio spectrum is available divided into frequency bands. For the desired model, the information isolated by frequencies is not needed. Thus, a feature that contains the accumulated energy value in all frequency bands is generated. We use Equation (1) for this purpose: \[Sound_{total}=10 log\left(\sum_{i=1}^{n}10^{\frac{Sound_{i}}{10}}\right)\] (1)
* **Heart Rate:** The heart rate value is available in 6-s windows. As the photoplethysmography signal used to obtain the heart rate value is very sensitive to motion artifacts, the 75 th percentile of the last 30 s is used as feature for the dataset. * **Body Temperature:** The body temperature value does not require any special transformation. The obtained signal itself is used as a feature. * **Gyroscope and Accelerometer:** The gyroscope and the accelerometer signals are available separately in the three axes (X, Y, and Z). For the desired model the divided information is not needed, so a feature is generated with the module of the three axes for the gyroscope signal and another one for the accelerometer signal. * **Optical Flow and People Detection:** Both the Optical Flow signal and the quantification of people do not require any special transformation for the dataset. The signals obtained are used as features. Finally, the signals of all the generated features are normalized, excluding the quantification of people. A fragment of these signals can be seen in the Appendix A in Figure A1. Once the features have been established and the different transformations have been carried out, the dataset is generated. For this purpose, a time vector is created where the time values of all the features are chronologically ordered together inside with an identifier that indicates the feature to which they belong. In addition, an index is assigned to each of the features indicating the last entry added to the dataset. Then, the time vector is browsed, adding to the dataset the values of the different features of the position indicated by each of its indexes. This merging generates an input in the dataset. Once the entire time vector has been browsed, the dataset is complete with all the information generated. To describe this process graphically, a schematic is shown in Figure 7.  
Using the described method, both datasets are generated for our model with the data collected in the experiment (supervised set and unsupervised set). Table 1 shows the distribution of both. Therefore, joining the records in both positions (A and B), we have a dataset for training and validation of the model with 17,135 entries, with 34.08% of entries labeled as _\"Distracted\"_.