Modeling of the Rating of Perceived Exertion Based on Heart Rate Using Machine Learning Methods

Abstract Rating of perceived exertion (RPE) can serve as a more convenient and economical alternative to heart rate (HR) for exercise intensity control. This study aims to explore the influence of factors, such as indicators of demographic, anthropometric, body composition, cardiovascular function and basic exercise ability on the relationship between HR and RPE, and to develop the model predicting RPE from HR. 48 healthy participants were recruited to perform an incrementally 6-stage pedaling test. HR and RPE were collected during each stage. The influencing factors were identified with the forward selection method to train Gaussian Process regression (GPR), support vector machine (SVM) and linear regression models. Metrics of R2, adjusted R2 and RMSE were calculated to evaluate the performance of the models. The GPR model outperformed the SVM and linear regression models, and achieved an R2 of 0.95, adjusted R2 of 0.89 and RMSE of 0.52. Indicators of age, resting heart rate (RHR), Central arterial pressure (CAP), body fat rate (BFR) and body mass index (BMI) were identified as factors that best predicted the relationship between RPE and HR. It is possible to use GPR model to estimate RPE from HR accurately, after adjusting for age, RHR, CAP, BFR and BMI.


INTRODUCTION
Appropriate exercise can improve health, and reduce the incidence of chronic disease and early mortality (Friedenreich et al. (2010), Healy et al. (2008)).Exercise is prescribed based on four elements such as frequency, intensity, time, and type.These four elements together determine the benefit of exercise (Garber et al. (2011)).Exercise intensity, an important determinant of the physiological responses to exercise training, is essential for achieving exercise benefits (Garber et al. (2011), Riebe et al. (2018)).Commonly, exercise intensity is measured by objective indicators such as HR (Jamnick et al. (2020)).But they are difficult to apply to the daily exercise of a large-scale population due to the requirement of specialized equipment.Fortunately, RPE, being well known highly correlated with HR during physical activity (1 RPE point is approximately 10 bpm) (Borg (1962)), can measure exercise intensity only based on subjective fatigue feeling.Due to its convenience and economical, RPE has been suggested as an adjunct to HR for measuring exercise intensity, and can even replace HR once the relationship between RPE and HR is established (Chow & Wilmore (1984), Scherr et al. (2013)).
Many researchers have focused on the relationship between RPE and HR.Borg first found that HR is equal to RPE value multiplied by 10 based on the RPE-15 scale, namely: HR[bpm]=RPE*10 (Borg (1962)).A study of young men in Taiwan explored the relationship between Borg's RPE scale and the HR values during dynamic exercise, the result was HR[bpm] = 8.88* RPE + 38.2 (Chen et al. (2013)).In a study of Hong Kong adults, the relationship between Borg's RPE scale and HR was: HR[bpm]=43+7.9*RPE(Leung et al. (2004)).In a large population study in Germany, the relationship HR[bpm] = 69.34+ 6.23*RPE was found to exist between RPE values on Borg's RPE scale and HR (Scherr et al. (2013)).These studies hypothesized that the relationship between HR and RPE is not affected by other factors.However, some studies have shown that RPE during exercise is not only related to HR but may also be affected by other factors.Studies (Koltyn et al. (1991), Scherr et al. (2013)) showed that women's HR was significantly higher than that of men under the same RPE.Borg et al. 2010 reported that the HR was higher in the younger age group than the older age group under the same RPE (Borg & Linderholm (2010)).In a study exploring the influence of exercise experience on the relationship between HR and RPE (Winborn et al. (1988)), HR showed a significantly higher association with RPE in high exercise experience subjects than low exercise experience subjects.Maybe there are other factors that affect the relationship between HR and RPE.For example, information such as demographic data, anthropometric data, body composition indicators, cardiovascular function indicators, and physical fitness indexes can reflect the individual's cardiovascular health, heart, and lung capacity, etc., and may cause the relationship between RPE and HR to change.However, as far as we know, few studies included influencing factors when constructing the relationship model between RPE and HR, which results in a large HR fluctuation range under the same RPE.
Machine learning (ML) is a computer-based data analysis method, which has become an alternative approach to conventional statistical methods for developing prediction models (Kavakiotis et al. (2017)).By learning from the sample data, ML can dig out the underlying patterns in the data and create a model for prediction in new data.Compared with traditional machine learning models,e.g.linear regression model (Du et al. (2020)), which are built using prior knowledge based on some implicit assumptions, modern machine learning models only make weak assumptions about the mapping function which helps to learn any underlying patterns in the training data and can deal with nonlinear relationships and higher-order interactions between variables (Russell & Norvig (2020)), both of which are common challenges in the field of health care.
This study hypothesized that some indicators of demographic, anthropometric, body composition, cardiovascular function, and physical fitness may affect the relationship between RPE and HR.The objectives of this study were to explore the factors that influence the relationship between HR and RPE in these indicators and to develop the model of predicting RPE from HR.We evaluate and compare the performance of three machine learning algorithms in developing the model, and then choose the best machine learning algorithm to develop the prediction model.The algorithms we used are two modern machine learning algorithms: Gaussian Process regression (GPR) (Schulz et al. (2018)), support vector machine (SVM) (Noori et al. (2011)), and a traditional linear regression.Cienc (2023) 95(2) e20201723 2 | 15 HUANHUAN ZHAO et al.

Subject
The study was carried out at the Institute of Intelligent Machines, Chinese Academy of Sciences, Hefei, China.Participants were recruited through social media, advertisements in public places, and word of mouth.In our study, 60 potential subjects, comprised of college students, scientific researchers, young and middle-aged white-collar workers, retired people, were recruited from Hefei of Anhui province.Of the 60 participants, 3 subjects were excluded since they were younger than 20 years or older than 65 years.Furtherly, 2 individuals who were athletes were excluded, athletes were defined as performing at least 10 h of exercise per week or being members of a national athletics team (Bjornstad et al. (2006)).Besides, 7 volunteers who do not pass the PAR-Q questionnaire (Neto et al. ( 2013)) were also excluded from the study.And finally, 48 participants (24 men and 24 women, age: 34.98±11.82years) were included in the study (Figure 1).All the participants were fully informed of the experiment process and matters needing attention and signed the informed consent.This experiment was approved by the ethics committee of Hefei institute of physical sciences, Chinese academy of sciences (No.Y-2018-29).Before the experiment, the physical fitness checkup data were collected for each participant.These data form a feature matrix.The physical fitness checkup measures some indicators of anthropometrics, body composition, cardiovascular function, and basic exercise ability.For all participants, stature and body mass were measured twice with light indoor clothes without shoes, and the mean values were used.BMI was expressed as the ratio of total body mass divided by stature squared (kg/m 2 ).Body fat rate (BFR) and body muscle rate (BMR) were measured by BX-BCA-100 body composition analyzer (Institute of Intelligent Machines, Hefei, China), systolic blood pressure (SBP), diastolic blood pressure (DBP), central arterial pressure (CAP), resting heart rate (RHR), Ejection duration (ED), and Subendocardial viability ratio (SEVR) were measured by IIM-CFTI-100 cardiovascular function test instrument (Institute of Intelligent Machines, Hefei, China).Sit-and-reach was measured by TSN 100/200-TQ (Beijing physical fitness), Grip strength was measured by TSN 100/200-WL (Beijing physical fitness), Vital capacity (VC) was measured by TSN 100/200-FH (Beijing physical fitness), Balance ability was measured by TSN 100/200-ZL (Beijing physical fitness), and Reaction time was measured by TSN 100/200-FY (Beijing physical fitness).The baseline characteristics of the participants are described in Table I.

RPE scale
Borg RPE scale (Borg (1970)) and CR-10 scale (Borg (1990)) are commonly used to measure RPE.But they have the characteristic of multi-levels and completely subjective descriptions, which limits their application in daily exercise.To address this issue, the improved CR-10 scale is proposed in this study.

MODELING OF THE RATING OF PERCEIVED EXERTION
First, according to people's cognitive habits (Williams et al. (1994)), the rating of perceived exertion was divided into 1-10, rating "1" stands for extremely easy, rating "10" stands for exhaustion, the exertion is strengthening with the increase of the rating; Second, because the physiological reaction of perceived exertion mainly reflects in breathing, especially breathing while talking.The physiological reaction description is more objective and easier to identify compared with the description like "hard" or "a little hard" etc.So the corresponding physiological reaction description was added for each rating in order to improve the accuracy of RPE identification.The improved CR-10 scale was shown in Table II.
The scale has been reviewed and approved by a total of 6 experts of sports medicine and rehabilitation from two tertiary hospitals.2018)).Values equivalent to 20%, 40%, 50%, 70%, 85%, and 100% of MAPW were respectively used as the 6-stage workload of the pedaling test.Each stage lasted 3 minutes, as was the interval between each test, the subjects kept pedal cadence at about 60 rpm.Before the experiment, the entire experimental process and improved CR-10 scale were explained to each participant before the experiment by trained practitioners.Participants sat quietly for 15 minutes until their HR was at a resting level (sustained for 3 min).Heart rate was recorded by 10-lead ECG in the sitting position.The average HR in the last 15 seconds of each workload was the HR of this workload.In the 15-s before the end of each workload, the participants were asked to report RPE according to the improved CR-10 scale.During the 3-min break between two pedaling tests, the RPE value of the prior pedaling test was confirmed, to ensure the reliability of the RPE values.Experiment termination conditions: (1) The subject completes the entire 6-stage pedaling test; (2) The subject experiences discomfort, and requests termination of the experiment.Furthermore, all tests were performed in the morning, the temperature of the laboratory was controlled at 20C, and humidity was controlled at 50%.

Leave-one-out cross validation
The leave-one-out cross validation is a case of k-fold cross validation, which could evaluate the performance of a regression.The process of leave-one-out cross validation is shown in Figure 2. It sorts the dataset randomly then partitions it into number-of-sample (n) folds, after that, respectively, each fold (sample) is used as the test set in turn to evaluate the model performance, and the other samples are used as the training set to construct the model.Therefore, a total of n models are trained, and the average performance of these n models is taken as the performance of the model.The advantage of performing a leave-one-out cross validation is that, with a small dataset, we could acquire the same result whenever the algorithm is executed.

Feature selection and model construction
In order to evaluate the performance of three machine learning models, we randomly divided the participants into a training set and a testing set.Respectively, for the three machine learning technicals, the training set is used to determine the model features and construct the model, and the test set is used to evaluate the performance of the model.
We collected some information on demographic data, anthropometric data, Body composition indexes, cardiovascular function indicators, and Basic exercise ability indexes to form a feature matrix, which included 16 features such as age, gender, BMI, BFR, BMR, SBP, DBP, CAP, RHR, SEVR, ED, Sit-and-reach, Grip strength, VC, Balance ability, and Reaction time.The forward selection method was utilized to find out which features in the feature matrix are effective in the models, that is which features are the influencing factors on the relationship between RPE and HR.The forward selection method adds a feature to the best features set through one iteration, and finally, the best features set is determined after multiple iterations (Mao (2004)).The specific algorithm of feature selection is shown in Algorithm 1.

Algorithm 1 Feature selection
Input: feature matrix P = {x 1 , x 2 , ⋯ , x n }, the feature set of the regression model Q = {HR} Output: Q 1: Perform a machine learning method to construct an RPE predicting model based on Q 2: Use the leave-one-out cross validation method to calculate and save the root mean square error (RMSE) value(RMSE') of the model 3: for i = 1 to n do 4: goto step 3 14: end if 15: Stop As illustrated in Algorithm 1, our approach is implemented as follows: Step 1: Perform a machine learning method to construct the model of predicting RPE based on the initial feature set, and use the leave-one-out cross validation method to calculate and save the RMSE value of the model; Cienc (2023) 95(2) e20201723 7 | 15 HUANHUAN ZHAO et al.

MODELING OF THE RATING OF PERCEIVED EXERTION
Step 2: From the feature matrix, select a feature that can best improve the performance of the model (the performance is measured by the RMSE value of leave-one-out cross validation) and add it to the feature set.And then delete the selected feature from the feature matrix; Step 3: Repeat step 2, until any feature's addition from the feature matrix cannot improve the performance of the model, and then the iteration is terminated.

Training set and testing set
At the end of testing, all participants completed the first three stages of the pedaling test, 46 participants (96%) completed the first four stages of the pedaling test, 35 participants (73%) completed the first five stages of the pedaling test, and 10 participants (21%) completed the 6-stage pedaling test.The data collected at the sixth stage of the pedaling test was excluded from the following analysis because of the limited amount (n=10).Finally, a total of 224 samples were used for model construction and evaluation.In order to verify the performance of the three regression algorithms on our data, the data of the 48 participants were randomly divided into a training set (40 participants, 188 samples) and a test set (8 participants, 36 samples).There is no significant difference in the main features of the two sets, such as age, BMI, RHR, etc.

Feature selection of model
Separately for GPR, SVM, and linear regression, we first performed the algorithm of feature selection based on the training set to determine the feature set.The feature selection processes of the three models were shown in Figure 3 and Table III.For GPR, the initial RMSE was 0.811 when the feature set only included HR.When CAP was included in the feature set in the first iteration, the RMSE achieved 0.690.The second iteration incorporated BFR into the feature set with an RMSE of 0.645.Age was included in the feature set in the third iteration, at this time, the RMSE was 0.595.The fourth and fifth iteration incorporated BMI and RHR in turn.The RMSE was 0.557 for the fourth iteration, and 0.556 for the fifth iteration.VC was included in the sixth iteration, which increased the RMSE to 0.557, and this satisfied the condition of iteration termination.Therefore, HR, age, RHR, CAP, BFR, and BMI constituted the feature set of the GPR model.As to the SVM model, when the initial feature set only included HR, the model got an RMSE of 0.809.The first iteration incorporated CAP, at this time, the RMSE was0.710.Followed, the second iteration incorporated age and improved RMSE to 0.696.The incorporation of BMI in the third iteration reduced the performance of the model (RMSE: 0.702), which satisfied the condition of iteration termination.Then, we obtained the feature set including HR, age, CAP for the SVM model.The initial RMSE of the linear regression model was 0.795 when the feature set only included HR.Age was included in the feature set in the first iteration, which improved the RMSE to 0.748.The second iteration incorporated RHR into the feature set with an RMSE of 0.724.CAP was incorporated in the fourth iteration and the RMSE achieved 0.718.The model performed the best when BMI was included in the feature matrix in the fourth iteration, at this time, the RMSE was 0.717.The fifth iteration which incorporated BFR was the last because the RMSE of the model was still 0.717, which did not perform better compared with the previous iteration.Finally, for the linear regression model, the feature set includes HR, age, RHR, CAP, and BMI.

Model construction and performance anylysis
We constructed the models based on feature set separately for GPR, SVM and linear regression using the training set.The test set was used to evaluate the performance of the models.As shown in Table IV, the performance for the testing set on the GPR model was the best, which achieved an R 2 of 0.95, adjusted R 2 of 0.89 and RMSE of 0.52.Followed by the SVM model, the R 2 , adjusted R 2 and RMSE were 0.91, 0.86 and 0.62, respectively.The linear regression model got the same R 2 value (0.91) with the SVM model, but the adjusted R 2 and RMSE were 0.79 and 0.74, respectively, which were the worst among the three models.Therefore, the GPR model outperformed other models.To further illustrate the performance of the best model (GPR model), the scatter plot of the measured RPE values and predicted (model-outputted) RPE values on the test set was shown in Figure 4.For practical application, we can round the predicted RPE values to obtain shaped values.Do this, we achieved an accuracy of 75%, for the rest, the errors are all controlled within one rating level.

DISCUSSION
To date, this is the first study that aims at using machine learning methods to explore the influencing factors and construct the relationship model of RPE and HR.First, we recruited 48 healthy people in the Hefei area, China to perform an exercise experiment.HR and RPE were collected during each stage.Secondly, we construct the optimal feature set with a forward selection method to train GPR, SVM and linear regression models.With R 2 , adjusted-R 2 and RMSE of 0.95, 0.89 and 0.52, respectively, the GPR model, which outperforms the SVM and linear regression model, identified age, RHR, CAP, BFR and BMI can best predict the relationship between RPE and HR.
In the process of model construction, there are some differences between the three regression algorithms.The final feature sets of the three models are not the same, as well as the order in which each feature is included in the feature set.This is due to the different learning processes of the three algorithms.The performance of the two modern machine learning models is superior to the linear regression model (see Table IV), which suggests that the variables are not independent, and there are a collinearity relationship and higher-order interactions between variables.Because Linear regression requires that the relationship between the independent variable and the dependent variable is linear and uniform, so some variables that have a non-linear impact on the outcome may be omitted, which affects the predictive performance of the model.As to the two modern machine learning methods, the GPR algorithm is a machine learning algorithm based on function distribution, some previous studies have shown that GPR has good performance on low-dimensional and small sample data (Liu et al. (2013)), and has been widely used in time series analysis, automatic control and other fields (Deng et al. (2020( ), Lima et al. (2020))).SVM is a machine learning method that is suitable for small sample data (Samui & Kim 2013).In this study, we used a total of 188 sample data to build the model, the input variables are less than 6 variables.Thus our sample data happens to meet the conditions of small samples, low-dimensional, which agrees with the GPR algorithm and SVM algorithm.As expected, the two models have shown favorable prediction performance in our data.In addition, the GPR model outperforms SVM model (adjusted R 2 :0.89 VS 0.86; RMSE: 0.52 VS 0.62).Therefore, we believe GPR is more reliable than SVM in terms of our data.The results of this study revealed the potential application value of GPR in the research of sports fields, in which the data often has the characteristic of small samples and low-dimensional.
The algorithm we proposed can explore the influencing factors of the relationship between HR and RPE from the feature matrix.For the GPR model, after adjusting age, RHR, CAP, BFR, and BMI, the performance of the model has been greatly improved.This indicates that age, RHR, CAP, BFR, BMI are the influencing factors of the relationship between HR and RPE.Referring to age, Borg, G and Linderholm, H claimed that there was a declining trend in HR at the same RPE with the increase of age (Borg & Linderholm (2010)), Shephard, R.J. suggested constructing a model within a narrower age range can improve the accuracy of RPE replacing HR (Shephard (2013)).These researches indicated age affects the relationship between RPE and HR, which are consistent with our study.RHR and CAP are indicators of cardiovascular function, which are relative to cardiorespiratory fitness (Wang (2016), McDaniel et al. (2020)).Our study showed RHR and CAP affect the relationship between HR and RPE.Winborn et al. 1988 found different exercise experiences may cause differences in cardiorespiratory fitness, which further bring different RPE under the same HR (Winborn et al. (1988)).This view supports our findings.In addition, our research shows that BFR and BMI are influencing factors of the relationship between HR and RPE.BFR and BMI are indicators of obesity, under the same exercise intensity (HR), compared with individuals with normal weight, obese individuals consume more energy when exercising (Keytel et al. (2005), Hiilloskorpi et al. (1999)).Different energy consumption will cause different subjective fatigue feelings.The greater the energy consumption, the more fatigue one feels.This might be the mechanism of why BFR and BMI affect the relationship between HR and RPE.Refer to gender, there is still debate on the influence of gender on the relationship between RPE and HR (Robertson et al. (2000), Garcin et al. (2005), Scherr et al. (2013), Koltyn et al. (1991)).Our results showed there was no significant difference between men and women on the relationship between RPE and HR.The result that gender does not influence the relationship between RPE and HR was not surprising, since RPE represents relative exercise intensity and is positively correlated with %HRmax, and the predicted HRmax values were not significantly different between the men and women.Winborn et al. (1988) indicated that differences in RPE accuracy scores may be influenced by gender but that exposure to athletic experiences appears to override any potential gender differences.By presumably, gender differences in athletic experiences rather than gender itself likely contribute to the differences of HR under the same RPE in studies (Koltyn et al. (1991), Scherr et al. (2013)).
Compared with previous RPE prediction models, the prediction accuracy of the GPR model has been significantly improved.Borg first found that HR is equal to the RPE value multiplied by 10 based on the Borg RPE scale, which was RPE = HR /10(R 2 =0.75) (Borg 1962).A study of young men in Taiwan showed that the relationship between RPE values of the Borg RPE scale and the HR during dynamic exercise was described by the equation RPE=(HR-38.2)/8.88(R 2 =0.70) (Chen et al. 2013).The relationship RPE= (HR-43)/7.9(R 2 =0.56) was observed between the RPE value of the Borg RPE scale and HR in a study of Hong Kong adults (Leung et al. 2004).In a large population study in Germany, the relationship between HR and RPE on the Borg RPE scale can be expressed as RPE= (HR-69.34)/6.23 (R 2 =0.55) (Scherr et al. 2013).Moreover, these models used the same samples for model training and performance validation.This may lead to overfitting, which means the performance of the model on other data was significantly lower than that on training data.To address this issue, we used an independent test set to evaluate the performance of the models.The GPR model with HR, age, RHR, CAP, BFR, and BMI as input variables in this study has an R 2 of 0.95 and adjusted-R 2 of 0.89, which outperformed the previous models significantly.This indicated that the model constructed in this study can converse HR to RPE more accurately.Meanwhile, with the continuous development of community healthcare services, the measurement of input features of the model, which are non-invasive, is simple and convenient.Through the model, we can realize the estimation from the target HR to RPE easily and accurately.This could help individuals to control personalized exercise intensity in daily exercise.
The current study has certain limitations.First, 48 healthy people from the Hefei area were recruited as participants, the finding of this study should consider area difference for further applications; Also, this finding was conducted on a cycle ergometer in the laboratory, the effectiveness of this study in free exercise still needs to be verified further; Last, the features included in the study is limited, especially, handgrip strength, other than quadriceps strength was used as the indicator of full-body strength, this may cause bias.Although quadriceps muscle strength can be used as a better indicator of full-body strength, the related measuring equipment (isokinetic muscle strength measuring instrument) is very expensive and not popularized.With the continuous development of smart wearable equipment and intelligent systems, next, we plan to analyze other features (For example, the strength of the lower limbs, quadriceps muscle strength, behaviors, education level, and character .etc.) for adjusting the relationship between RPE and HR further.

CONCLUSIONS
Our study has shown the proposed algorithm can explore the factors that affect the relationship between HR and RPE and construct the model of predicting RPE from HR.Among the three machine learning models, the GPR model performed the best, which achieved an R 2 of 0.95, adjusted R 2 of 0.89 and RMSE of 0.52.Indicators of age, RHR, CAP, BFR and BMI were identified as factors that best predicted the relationship between RPE and HR.Compared to models in prior research, the GPR model can more accurately realize the conversion of exercise HR to RPE after adjusting for age, RHR, CAP, BFR and BMI.This study provides a theoretical basis for people in Hefei, China to use RPE (improved CR-10 scale) instead of HR (target HR) to control exercise intensity.

Figure 1 .
Figure 1.Flow diagram of the recruitment and screening of participants.

Figure 3 .
Figure 3.The iteration processes of feature selection.

Figure 4 .
Figure 4.The scatter plot of measured RPE values and predicted RPE values on the test set.

Table I .
Baseline characteristics (mean ±SD) of subjects.
BMI: Body Mass Index; BFR: body fat rate; BMR: body muscle rate; SBP: systolic blood pressure; DBP: diastolic blood pressure; CAP: Central arterial pressure; RHR: resting heart rate; ED: Ejection duration, SEVR: Subendocardial viability ratio; Sit-and-reach: Used to measure human flexibility; VC: Vital capacity; Balance ability: Time to stand on one foot with eyes closed; Reaction time: The time measured by the human eye from seeing different signal lights to triggering the button by hand which can express human agility.

Table II .
Improved CR-10 scale.All participants performed intermittent incremental pedaling tests on a cycle ergometer (IEC 60601-1, REF no.960912, manufacturer: Lode BV Medical Technology, The Netherlands).During the test, participants wore Mortara ECG (UltimaTM PFX MEDGRAPHICS cardiopulmonary tester, manufacturer: MGC Diagnostics, USA) to monitor HR and ECG.Maximal acceptable pedaling workload (MAPW) is calculated using the formula proposed byWasserman et al. (Wasserman et al. (

Table III .
Feature selected in each iteration by each model.

Table IV .
Performance comparison of different models.