#### 2.1. Data Acquisition

Figure 1 presents a map of the cycling expedition that enabled the data acquisition during the 5694 km cycling route divided into 48 segments, as specified in

Table 1 and

Supplement 1.

Supplement 2 contains a video record of a selected cycling segment specified in

Figure 2. Multimodal GPS and heart rate data recorded during the route are presented in

Figure 3. Excluding stop-overs, it is possible to summarize that the cycling took 272.2 h, with an average speed of 20.9 km per hour and an average segment length of 118.6 km.

The proposed graphical user interface presented in

Figure 1 allows the selection and analysis of any route segment with the chosen starting window position and its length.

Figure 2 presents a more detailed 10 km-long segment in the Andes mountains recorded over 28 min of downhill cycling. Data fusion of the recorded data segment with the corresponding Google map region is also presented in

Figure 2.

Supplement 3 includes all data recorded during the cycling expedition and the MATLAB program to run this GUI.

All GPS and heart rate (HR) data were recorded with a variable sampling period, changing from 1 to 22 s (a sampling rate of 0.05–1 Hz). After the initial processing, they were resampled to a fixed sampling period of 2 s. The resulting matrix of five columns (time, GPS longitude, GPS latitude, GPS altitude, and heart rate) and 490,037 rows (representing 272.2 h of cycling) was then used for further mathematical processing and data analysis.

#### 2.2. Data Processing

The main items of the multichannel GPS and heart rate cycling data analysis and classification are presented in

Figure 4. Data acquisition and the following processing steps included:

transformation of the data recorded in GPX format into the CSV format and their export to the appropriate (MATLAB) computational and visualization environment;

interconnection of all data segments and exclusion of all stops longer than a selected threshold;

rejection of gross errors, de-noising of all recorded signals, and their resampling with uniform sampling period, allowing data fusion for the following mathematical processing;

interconnection of recorded GPS data with the Google map region;

data segmentation using windows of the selected length.

The data analysis included the following steps:

selection of windows fulfilling chosen criteria (altitude gradient within given limits for uphill, downhill, or flat cycling);

detection of relations between individual signals;

classification of selected segment features and evaluation of the accuracy of the classification, together with cross-validation of the model;

evaluation of the results from a biomedical point of view.

The preprocessing stage included the interconnection of all records of the cycling segments, the removal of gross observational errors, and the removal of cycling breaks. The following signal de-noising by a low-pass finite impulse response (FIR) filter was then used for the rejection of the undesirable components of each signal

${\left\{x\left(m\right)\right\}}_{m=1}^{M}$ using

for the selected filter order

$R=30$ and the cutoff frequency estimated from the spectral components of the individual signals. The next resampling was used to evaluate the multichannel signals of the selected constant sampling frequency

${f}_{s}=$ 0.5 Hz using spline interpolation in this stage.

The proposed method assumes the segmentation of the given signals into

N-sample long segments, and their analysis. The relations between the corresponding data segments were estimated with the cross-covariance function

where

$\overline{x}$ and

$\overline{y}$ stand for the means of the individual signals

${\left\{x\left(n\right)\right\}}_{n=1}^{N}$ and

${\left\{y\left(n\right)\right\}}_{n=1}^{N}$, respectively. The cross-correlation function of the sequences for the GPS and physiological data were then evaluated by

The relation between the recorded data sequences was evaluated by estimating the correlation coefficient ${r}_{xy}={R}_{xy}\left(0\right)$. The delay between individual signals was estimated by the cross-correlation function and its maximum value shift.

To define the relations between the corresponding segment features, the correlation coefficients were evaluated, and the 95% confidence bounds related to the regression lines were estimated.

Selected segment features were classified by the neural network (NN) [

29,

32], support vector machine (SVM) [

33], and the

k-nearest neighbour methods [

34] with the evaluation of class boundaries and cross-validation by the leave-one-out method.

Cycling segment features formed the corresponding column of the pattern matrix

${\mathbf{P}}_{R,Q}$, as specified in

Figure 4. For each cycling segment, three features forming a column vector were evaluated: the heart rate, speed, and the delay of the heart rate change after the change of the gradient altitude. This pattern matrix was then used for classification by the two-layer neural network evaluating values

forming outputs of neural network layers where

define arguments of selected transfer functions

$F1,F2$. An associated matrix of target values

${\mathbf{T}}_{S2,Q}$ was defined by class

${\left\{c\left(k\right)\right\}}_{k=1}^{S2}$. One of two classes was associated with each feature vector for the cycling expedition analysis:

${c}_{1}$—mean altitude less than 1500 m and

${c}_{2}$—mean altitude greater than 1500 m.

Network coefficients included matrix

${\mathbf{W}\mathbf{1}}_{S1,R}$ of

$S1$ elements of the first layer with associated vector

${\mathbf{b}\mathbf{1}}_{S1,1}$ and matrix

${\mathbf{W}\mathbf{2}}_{S2,S1}$ of

$S2$ elements of the second layer with associated vector

${\mathbf{b}\mathbf{2}}_{S2,1}$. The neural network included the sigmoidal transfer function

$F1$ in the first layer and the probabilistic softmax transfer function

$F2$ in the second layer [

23]. Results of the output layer based on the Bayes’ theorem using function

provide the probabilities of each class. The number

$S2$ of output elements corresponds to the number of classes

${\left\{c\left(k\right)\right\}}_{k=1}^{S2}$. Results for

$R=2$ pattern values (heart rate and delay) and their classification into two classes are presented in

Figure 4 and the grid of 50 by 50 elements. Owing to normalization, the sum of corresponding grid values is equal to one.