## 4 Discussion
### Validation  
The validation revealed that AMARA identified more MAs than the other two algorithms, while conserving more of the physiological information (trend). As depicted in Figure 4, for example, the human scorers identified longer artifact periods, which incorporated a certain amount of non-artifact data. AMARA identified shorter artifact periods (see Table 2 and Figure 3) and it conserved better the physiological trend in the data. It was assumed that this physiological trend was related to MAs. A human classifier is able to detect short MAs (in the order of minutes), whereas the algorithms cannot achieve this without additional information about the signal. Human scorers are highly adaptiveand combine multiple artifacts close to each other into one artifact, if the artifact-free periods in between are very short. How well the human scorer detects the MAs depends on the length of data presented at a time. This interval was 30 min for our validation; the shortest possible artifact marked by a human scorer was approximately 3 s. This means the human scorers were not able to detect very short MAs. On average the MA duration was \(>\)30 s (Figure 4a), thus, two MAs close to each other were easily distinguishable (as e.g., also was for S\({}_{3}\) and S\({}_{4}\) in Figure 4a). The length and number of artifacts identified may depend on the motivation of the human scorer and may decrease with the amount of data to process. Thus, it is evident that an automated tool is of great value. The parameters of the algorithm need to be adapted somewhat for a new study. However, throughout studies, all recordings can be processed with the same set of parameters. The sensitivity of AMARA was comparable to sensitivity of S\({}_{2}\) and S\({}_{4}\) and was higher than for MARA. S\({}_{1}\) and S\({}_{3}\) did identify most of the artifacts. It should be noted that a large number of missed artifacts were presumably not related to movements or the movements were too small to be detected by either the ABAMAR or the AMARA movement detection algorithm. AMARA suffers less from _FP_ than ABAMAR but resulted in more _FP_ than the human scorers, except for S\({}_{3}\). Comparing the number of _FP_ between AMARAacc and AMARA showed that the MARA-type of identification of artifacts in the signal reduced the number of _FP_ by \(\sim\)10%. The relative number of _FP_ was smaller for AMARA and MARA compared to ABAMAR, despite the higher value of \(\bar{N}_{real}\), _i.e._, with AMARA and MARA multiple artifacts were identified within one \"real\" artifact. When comparing exclusively with MARA, the new automated and accelerometer-based AMARA was able to detect more artifacts, which were all specifically related to movements. This is favorable when artifacts are related to movements. If artifacts were not related to movements, MARA would be the better choice. However, MARA identified many more artifacts not related to movements than the human scorers did, which suggests that a large portion of those may be false positives. It is interesting that the mean length of the artifacts was double in length with AMARA than with MARA, although both methods rely on the same MSD detection and thresholds. Compared to MARA, more parameters need to be defined for AMARA (Table 1), but for each parameter, a default value is provided. The most important parameter for the reconstruction is \"condition free\", which should be visually identified before applying AMARA to the data, e.g., by inspecting video recordings of the subjects. Note, however, that it is possible to determine the \"condition free\" parameter without video recordings, because the position of the sensor on the subject is known. Still, video recordings simplify this task. In our data set, AMARA identified more movement periods compared to ABAMAR and the periods were of similar length. However, since there is no possibility to determine real movements, the conclusion derived from our application cannot be generalized. ABAMAR could perform better than AMARA.