**5. Conclusions**

The main objective of this work is to develop a set of models that allows to classify depressive and not depressive episodes in different moments of the day (day, night and full day) based on the motor activity levels of subjects. For this purpose, a series of stages are applied to the Depresjon database, which describes the activity levels of patients with presence of depression and controls.

For the feature selection stage, it is used the FS technique based on LR, in order to obtain the set of features that provide the most relevant information for data modeling, while for the classification stage, it is applied the RF technique. For the validation of the performance of these steps, a series of statistical metrics are measured.

According to the results obtained, it can be observed that from the feature selection, the best set of selected features is obtained from the data that corresponds to the night period, since the best accuracy is calculated when classifying the subjects with these features using the activity levels presented during the night. This set is contained by nine features, being maximum (time) the feature that generates the greatest contribution, since it provides the maximum values of activity level during the night, which are generally related to the subjects that present depression.

Therefore, this allows us to conclude that it is possible to identify subjects with the presence of depression based on the model developed in this work using the data of motor activity levels. In addition, for the identification of this condition, it is sufficient for patients to only measure their activity levels through the actigraph during the night, since with these data, classification can be made through the model obtained allowing to know if the subject presents depression or not, with an accuracy of 99.72%.

It should be noted that this is a preliminary tool that can be of grea<sup>t</sup> support for specialists in the diagnosis of depression based on a non-invasive method, since it would only be necessary to have the patient's activity level data to make the diagnosis at through this model.

**Author Contributions:** Conceptualization, J.G.R.-R. and C.E.G.-T.; Data curation, J.G.R.-R., C.E.G.-T., L.A.Z.-C. and J.M.C.-P.; Formal analysis, J.G.R.-R. and C.E.G.-T.; Funding acquisition, J.I.G.-T., H.G.-R. and H.L.-G.; Investigation, J.G.R.-R., C.E.G.-T. and L.A.Z.-C.; Methodology, C.E.G.-T., L.A.Z.-C., J.M.C.-P., J.I.G.-T., H.G.-R. and M.A.S.-M.; Project administration, J.G.R.-R., C.E.G.-T., J.I.G.-T. and H.G.-R.; Resources, L.A.Z.-C., J.I.G.-T. and H.L.-G.; Software, J.M.C.-P. and R.M.-Q.; Supervision, C.E.G.-T., L.A.Z.-C., J.M.C.-P. and H.G.-R.; Validation, R.M.-Q.; Visualization, L.A.Z.-C., J.M.C.-P. and H.L.-G.; Writing—original draft, J.G.R.-R., C.E.G.-T., L.A.Z.-C. and M.A.S.-M.; Writing—review & editing, J.G.R.-R., C.E.G.-T., L.A.Z.-C., R.M.-Q. and M.A.S.-M. All authors have read and agreed to the published version of the manuscript.

**Conflicts of Interest:** The authors declare no conflict of interest.
