*5.3. Verification of Hypothesis 3*

To determine whether the Rehapiano is sensitive enough to quantify the frequency of tremor on both hands of a patient, we measured a PD patient with both sides of the body affected. The whole exercise was performed under the supervision of a physician. For health reasons, the subject was not under the influence of medication. The subject also suffered from pain in the right shoulder and lowered fine motor skills in the right arm, as compared to the left arm. We repeated the aforementioned measurement protocol seven times for both hands with the hold time extended from 3 to 5 s for each finger, with the target value and sequence of fingers remaining the same. We acquired 28 measurements for each hand, excluding the thumbs. Based on the methodology presented in [9], we evaluated the validity of the measurements based on the peak power proportion. The ratio of the area below the power spectral density (PSD) curve around the detected dominant frequency (±0.3 Hz) and the whole area below the curve had to be higher than a set threshold to consider the measurement valid; see Figure 6, Equation (2).

**Figure 6.** Power spectral density (PSD) of a PD patient measurement of a single finger. *fd* represents the dominant frequency of the signal.

Equation (1) shows how the peak power from Figure 6 is calculated:

$$P\_{\text{peak}} = \int\_{f\_1}^{f\_2} \frac{FT^\*(\text{ signals }) \times FT \text{ (signals)}}{N^2} df\_{\text{\textdegree}} \tag{1}$$

where FT\* is the FT conjugate, and *N* is the number of received samples of the signal.

The peak power proportion *Vf* is calculated as

$$V\_f = \frac{P\_{p\text{cak}}}{\sum P\_i} \tag{2}$$

where *Pi* is the power estimation of the specific frequency, and ∑ *Pi* is the sum over all powers in a frequency domain.

#### **6. Experimental Results**

*6.1. Validation of the Rehapiano*

Hypothesis:


We simulated tremors at three frequencies: low (≈1.5 Hz), medium (≈3 Hz), and high (≈7 Hz). For each frequency, we conducted 40 measurements, each 3 s long. Both the optical encoder data and strain gauge signal were recorded, and we calculated the frequency from optical encoder measurements for each 10 s measurement. We then used Fourier transform on the signal recorded by the Rehapiano. The resulting frequency is the frequency at maximal value of the single side power spectrum. The results of these measurements for high frequency are shown in Figure 7.

**Figure 7.** Mean frequency measured with optical encoder (red line), its standard deviation (green area), the Rehapiano mean power spectral density (black line), and its standard deviation (gray area) for high frequency experiments.

Subsequently, we calculated the mean and the variance of the measurements and from these values we computed the z-test. The z-test verifies our hypothesis that the measurement means of the Rehapiano and the optical encoder are the same at a significance level *α* = 0.05. Table 2 shows the results of the hypothesis test for three frequencies. We cannot reject the null hypothesis for medium and high frequency at the 5% significance level. Therefore, we accept the null hypothesis for medium and high frequency, that *μoe* = *μr*. However, we reject the null hypothesis for low frequency *μoe* = *μr*.

**Table 2.** Mean frequencies measured by optical encoders and the Rehapiano and their variance, the result of the z-test, and the decision as to whether we can reject the null hypothesis.


Because we did not succeed in verifying the Rehapiano for measuring the tremor frequencies lower than 3 Hz, in the following experiments, we considered only measurements of tremor frequencies between 3.5 and 7.5 Hz [9]. In this range, we considered the Rehapiano measurements to be valid for the purpose of detecting and evaluating PT and considered Hypothesis 1 to be proven.

We are confident that the Rehapiano produces valid measurements for lower frequencies and that the failure to verify it lies with the verification device we have used. More on this topic is in Section 7.

#### *6.2. Distinction between Healthy Population and Patients with PT*

#### Hypothesis:

	- **–** Cross validation accuracy > 90%
	- **–** Precision > 95%
	- **–** Recall > 95%

We collected 490 measurements of 43 subjects from 49 sessions. Of those 43 subjects, 36 were healthy and seven were PD patients, with tremor rated on the FTMTRS (Table 1). All the healthy subjects completed the session once, producing 10 measurements each. Two PD patients repeated the exercise more than once (Table 1). Ninety-eight thumb measurements were uniformly excluded from the dataset, because of the PD patients' inability to maintain pressure on thumbs. We created the dataset with the following pipeline.


**Figure 8.** Comparison of healthy individual exercise and exercise for a patient with PD. Resampled values of FT transform (3rd) are used as input to our classifiers.

We trained four binary classifiers—support vector machines (SVM), naive Bayes (NB), decision tree (DT), and K-nearest neighbors (KNN). The target class of the classification was patients with PD. Classifiers had the following parameters: SVM: Gaussian kernel with *γ* = 6.4; NB: nonparametric Gaussian NB; DT: maximal number of nodes was set to 100, and the optimal feature for current node was selected by Gini's diversity index; KNN: *k* = 13, and the distance metric was cosine similarity. Input features of KNN and SVM were standardized. The mean of the feature was subtracted from every value in the column, and this value was divided by its standard deviation. We validated the classifiers with fivefold cross-validation; the cross-validation accuracy is shown in Table 3.


**Table 3.** Performance measures of different classifiers used to distinguish the healthy population from PD patients.

Table 4 includes five metrics. Validation accuracy represents the average accuracy of classification from every K-fold classifier. Sensitivity shows the ability of the classifier to detect PD patients that truly have PT, whereas specificity is the ability to identify healthy people that do not have PT. Precision is the probability of making correct decision, when our classifier categorizes the measurement as a patient with PT. Subsequently, the *F*1-score is the weighted average precision and sensitivity, and the formula is *F*<sup>1</sup> = 2 ∗ *sensitivity* ∗ *precision*/(*sensitivity* + *precision*). All classifiers reach a validation accuracy higher than 90%. Although only the DT reaches sensitivity values higher than 95%, all four classifiers have a specificity higher than 95%. We highlight the DT that has the best F1 score.

**Table 4.** Comparison of different classifiers approaches on PT (LSTM: long short-term memory; GTB: gradient tree boosting; BCT: bagged classification tree; RF: random forest).


*<sup>6.3.</sup> Quantitative Assessment of the Tremor*

Hypothesis:

	- **–** Standard deviation of the measurements is less than 0.15 Hz.

We collected 48 measurements from one subject with PD. We repeated the first two steps from the data processing pipeline as described above. Subsequently, we applied Fourier transform on the signal and calculated the dominant frequency and peak power proportion from the power spectral density.

Table 5 contains the results of repeated measurements of a PD subject. Measurements are valid if the value of peak power proportion (Equation (2)) of the measurement is higher than the peak power proportion threshold. The peak power proportion threshold is a value above which we do not include measurement into the calculation of tremor frequency. We experimented with five peak power proportion thresholds from 0.5 to 0.9. The table is split into measurements of the right and the left hand. For each hand at a specific threshold, we provide the following information; the relative number of valid measurements, the absolute number of valid measurements, and the dominant frequency and its standard deviation. Absolute and relative number (absolute /total) of valid measurements both describe the amount of successful trials. The standard deviation of the measured PD tremor frequency for the right hand increased with the power peak ratio threshold, and we could obtain only two valid measurements at the threshold equal to 0.7. Because this was too small a statistical sample, we have not considered these measurements. We obtained nine valid measurements for the left hand even at the increased threshold equal to 0.8. The results indicate that the Rehapiano can be used to

perform repeatable measurements. The mean of the calculated PD tremor frequency was 6.93 Hz with a standard deviation below 0.1 Hz.


**Table 5.** Results of repeated measurements with the Rehapiano of a PD subject.
