Within the field of activity classification, the classical cross-validation (CV) can be adapted to
evaluate the accuracy of the system in two ways: between-subject and within-subject evaluation.
In the former case, the classifier is first trained with data from all subjects except a few and then
tested with data from the excluded subjects. The accuracy is then calculated as the proportion
of correctly classified windows of data across all activities. The process of excluding some subjects
and performing a traintest cycle is repeated until all subjects have participated in the testing
datasets. The finally overall accuracy is then calculated as the average accuracy across all traintest
cycles. When one subject is used for the testing, for a number of cycles equal to the number of subjects,
this is called leave-one-subject-out CV. For within-subject evaluation, training is performed
using a portion of windows for a specific subject, while testing takes place with the remaining
samples of the same subject. This process is then repeated, each time using a different portion
of the subject samples for testing. The overall accuracy is determined from the average of all the
cycles for all available subjects.