{'fraction_non_alphanumeric': 0.03300614201251363, 'fraction_numerical': 0.019287067332529707, 'mean_word_length': 4.905762711864407, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Predicting oxygen uptake responses during cycling at varied intensities using an artificial neural network

Summary Study aim: Oxygen Uptake (VO2) is avaluable metric for the prescription of exercise intensity and the monitoring of training progress. However, VO2 is difficult to assess in anon-laboratory setting. Recently, an artificial neural network (ANN) was used to predict VO2 responses during aset walking protocol on the treadmill [9]. The purpose of the present study was to test the ability of an ANN to predict VO2 responses during cycling at self-selected intensities using Heart Rate (HR), time derivative of HR, power output, cadence, and body mass data. Material and methods: 12 moderately-active adult males (age: 21.1 ± 2.5 years) performed a50-minute bout of cycling at a variety of exercise intensities. VO2, HR, power output, and cadence were recorded throughout the test. An ANN was trained, validated and tested using the following inputs: HR, time derivative of HR, power output, cadence, and body mass. A twelve-fold hold-out cross validation was conducted to determine the accuracy of the model. Results: The ANN accurately predicted the experimental VO2 values throughout the test (R2 = 0.91 ± 0.04, SEE = 3.34 ± 1.07 mL/kg/min). Discussion: This preliminary study demonstrates the potential for using an ANN to predict VO2 responses during cycling at varied intensities using easily accessible inputs. The predictive accuracy is promising, especially considering the large range of intensities and long duration of exercise. Expansion of these methods could allow ageneral algorithm to be developed for a more diverse population, improving the feasibility of oxygen uptake assessment.


Introduction
Oxygen Uptake (VO 2 ) is a valuable metric for athletes and clinical populations alike [6,7,13,27,42,43,52]. It is regularly used to prescribe exercise intensity and monitor changes in fitness over time [6,14,37]. Unfortunately, the measurement of VO 2 in a non-laboratory setting is difficult, as it requires expensive equipment and a trained technician [8,24,34]. Conversely, heart rate (HR) is an easily obtained measure that is often used to prescribe and monitor exercise intensities [6,23,26,49,51]. Since HR is intrinsically linked to VO 2 , it is conceivable to develop methods for estimating VO 2 using HR data [6,31,36,51].
HR monitors and wearable fitness devices are becoming increasingly popular and the data collected from these devices can potentially be used to make predictions of physiological parameters like VO 2 [50]. A variety of estimation methods for VO 2 or VO 2 max have been developed, but many of them rely on assumptions about the linearity of the relationship between HR and VO 2 or agebased predictions of maximum HR [2,25,35,38,44,53]. Recently, more complex mathematical modeling and machine learning techniques have been explored as a way to provide more accurate estimations of VO 2 because they are less dependent on such assumptions [2-5, 9-11, 31, 32, 38, 46].
One form of machine learning that can be used to estimate VO 2 without relying on linear assumptions is an artificial neural network (ANN). An ANN is a method of machine learning loosely based on the processes of a biological brain [1,10]. Using inputs with known outputs, it can be trained and then utilized to predict unknown outputs. A 2015 review by Akay et al. identified a variety of studies that attempted to use ANNs or other forms of machine learning to predict VO 2 max from maximal, submaximal, and non-exercise data [3]. Additionally, many studies have used ANNs to predict energy expenditure from accelerometer data [15,28,40,41,45].
However, only a few studies have attempted to predict real-time VO 2 using an ANN and easy to obtain inputs. One study by García-Mossó et al. used seven features extracted from HR signals to predict energy expenditure in individuals with spinal cord injuries [19]. More recently, Beltrame et al. used an ANN to estimate VO 2 during treadmill walking using easy-to-obtain inputs [10]. Their model used inputs of HR, speed, grade, body mass, gender, and time on/off of exercise [10]. Although highly successful, this model incorporated protocol-specific variables, making it unable to accurately estimate VO 2 during arbitrary exercise intensities. More recent studies by Beltrame et al. [9,11] developed a random forest method to estimate VO 2 during activities of daily living. These studies were not confined by the testing protocol, but they did not have the same level of accuracy as the ANN model. The goal of the current study was to build upon the work of Beltrame et al. and see if an ANN can accurately estimate VO 2 during cycling at different exercise intensities using HR and exercise intensity data as inputs. To our knowledge, this is the first study to attempt to predict real-time VO 2 during cycling using an ANN and simple, easy-to-obtain inputs. We hypothesized that an ANN would be able to accurately predict (R 2 > 0.81) VO 2 responses during cycling using power, cadence, HR, time derivative of HR, and body mass as inputs.

Participants
Twelve adult males participated in this study (age: 21.1 ± 2.5 yr; weight: 82.1 ± 11.7 kg; height: 179.3 ± 8.9 cm). Based on previous pilot studies conducted in our laboratory, we performed a power calculation and at least six participants were needed in order to detect a strong association (R 2 = 0.81) for the ANN predictions. These calculations were made in G*Power with a two-tailed bivariate association at 80% power and a significance level of 0.05 [18]. Twelve participants were recruited to provide a safety factor of two and account for any potential dropout. The participants were considered healthy and classified as low-risk for cardiopulmonary exercise testing according to the American College of Sport Medicine (ACSM) guidelines for maximal cardiopulmonary exercise testing and were not taking any medications that could alter their HR or VO 2 responses [6]. The participants completed a medical history questionnaire, underwent a resting electrocardiogram (ECG), and received clearance to participate in the study from a cardiologist on the research team. The participants were familiar with cycling but were not trained cyclists. All aspects of this study were approved by the institutional review board (IRB) at the University of North Carolina at Chapel Hill being in agreement with the Declaration of Helsinki; written informed consent documents were obtained from participants after they received detailed explanations of the experimental procedures, potential risks, and their right to withdraw from the study at any time.

Instrumentation
HR data was collected beat by beat using a Garmin optical HR strap (Garmin, Olathe, Kansas, USA). Breath by breath VO 2 data was collected using a Parvo Medics True-Max 2400 Metabolic System (Parvo Medics, Salt Lake City, UT USA). The metabolic system was calibrated prior to each test following the manufacturer specifications. The testing protocols were performed on a Lode Corival electronically braked cycle ergometer connected to a computer via USB (Lode, Gronigen, The Netherlands). Garmin Vector power meter pedals (Garmin, Olathe, Kansas, USA) were used to measure instantaneous power output (watts) and cadence (revolutions per minute). The HR, power output, and cadence measurements were all synchronized by the Garmin Edge 510 cycling computer (Garmin, Olathe, Kansas, USA).

Testing protocol
Each participant performed a fifty-minute bout of cycling on the cycle ergometer. The participants were instructed to adhere to the testing protocol outlined in Table 1 to the best of their abilities. This testing protocol was designed to challenge the model's capability to accurately predict VO 2 responses across a broad range of transient exercise intensities over an extended time period. The participants abruptly changed their power outputs and cadences throughout the test, resulting in significant transient fluctuations in their HR and VO 2 responses. To achieve these fluctuations, participants were verbally instructed to maintain the cadences outlined by Table 1 and the power output was maintained by the computer, which electronically altered the resistance based on the exact cadence.

Data processing
Following data collection, primary data processing was completed using MATLAB version R2017B (Mathworks, Natick, Massachusetts, USA). Each of the 12 data files (one for each subject) were loaded into a MATLAB script, paired with their respective subject demographics, and segmented to create five basic variables: HR (bpm), VO 2 (L/min), cadence (rpm), power output (Watts) and mass (kg). After indexing the variables, the data was trimmed to match the length of the test and linearly interpolated using MATLAB's interp1 function to ensure a common time signature. Since it is an indirect calculation, VO 2 data is inherently noisy [24]. Therefore, the VO 2 data was smoothed using a cubic smoothing spline function to increase the likelihood that the fluctuations in VO 2 were due to physiological changes rather than noisy data. The HR data was also smoothed using a cubic smoothing spine function to allow the accurate calculation of a new variable, the time derivative of HR. The time derivative of HR was calculated using MATLAB's gradient function, which returns the numerical derivative of a variable. Optimal smoothing functions were chosen based on mutual information techniques [31]. Smoothing initially causes a drastic increase in mutual information (ie. reduction in uncertainty) between the observable and smoothed variables, but eventually plateaus [31]. Over-smoothing beyond this point will not cause greater increases in mutual information, but rather increases in error [31].

Artificial Neural Network (ANN) Regression
After initial data processing, an ANN framework script was created in MATLAB. This script initialized a singlehidden-layer, feedforward network utilizing MATLAB's built-in ANN function fitnet. It was designed to accept data consisting of five inputs (power output, cadence, HR, time derivative of HR, and mass) with one corresponding target variable (VO 2 ). A diagram of this ANN can be seen in Figure 1. These metrics were chosen to provide inputs related to exercise intensity (power, cadence, and  Fig. 1. Artificial neural network diagram with one layer of nine hidden neurons mass) and the response of the cardiovascular system (HR and time derivative of HR). The training and validation was performed using 12-fold hold-out cross validation, as described in the statistical analyses section to follow. Model performance during training was quantified using the Levenberg-Marquardt generalization algorithm, which solves non-linear least squares equations [20]. The performance of an ANN is influenced by the number of hidden neurons in the network's architecture. Increasing the number of hidden neurons improves the memory of the model, but can lead to overfitting the data, consequently reducing its generalizability [29]. Optimal hidden layer size was determined by iteratively generating model architectures ranging from 1-20 hidden neurons (Figure 2). The optimal layer size was then chosen based on the testing performance (ie. high R 2 , low SEE) after a twelve-fold leave-one-subject-out validation method. N = 9 and N = 11 had the highest R 2 values; N = 9 had a lower SEE. Therefore, N = 9 was chosen as the optimal number of hidden neurons.

Statistical analyses
Due to the relatively small sample size (n = 12) validation of the generated networks was evaluated using a leaveone-out method. This validation method was chosen in order to test our model on entirely 'unseen' data, avoiding any possible cross-talk from intra-subject specific correlations. As a measure of accuracy, model generated VO 2 predictions were compared to their corresponding experimentally obtained VO 2 values by calculating the coefficient of determination (R 2 ) and the standard error of the estimate (SEE). These calculations were performed in MATLAB.

Results
The ANN predicted VO 2 time series responses with R 2 = 0.91 ± 0.04 and SEE = 3.34 ± 1.07 ml/kg/min. Figure 3 depicts the line of identity plot (with R 2 and SEE) for each of the 12 subjects. The ability of the ANN to track each individual VO 2 responses throughout the fifty-minute testing protocol can be seen in Figure 4, which contains a time series plot for each subject.

Discussion
The simulation study demonstrated that a simple ANN can accurately predict VO 2 responses throughout the 50minute cycling bout. This is especially promising considering the inherent variability in the collection of VO 2 data [24]. The data used to train and validate the model contained a wide of range of values for the variables of interest, and the predictions remained accurate over a long duration (50 min). Additionally, the system inputs can be applied to any arbitrary cycling case and do not require a rigid protocol to be followed.
The ANN in the present study demonstrated comparable accuracy to the walking ANN used by Beltrame; it was also less dependent on a rigid protocol. From a prediction standpoint, the output data varied less than the target VO 2 data throughout the test. This may be due to the fact that the model inputs are less susceptible to large fluctuations over brief time-periods such as is seen between breaths with measured VO 2 data [24]. This, along with the ease of measurement, is a positive aspect of the proposed method of VO 2 prediction.

Practical Applications
This preliminary study was conducted to lay the groundwork for the prediction of VO 2 responses using HR and exercise intensity as data inputs rather than relying on a rigid protocol or the measurement of gas exchange. While the direct applications of the present study are limited, the potential future applications of this line of research are numerous. VO 2 prediction has significant implications for training, rehabilitation, and evaluation in athletes and clinical populations alike [6,7,13,27,47]. Endurance athletes rely on accurate prescription of exercise intensity and real-time monitoring of training progress [13]. Athletes and coaches are always seeking to find the balance between high training loads and recovery. An ANN-based approach could potentially enable athletes to monitor their VO 2 response during exercise without the use of expensive and cumbersome equipment [47].
For clinical populations, VO 2 data could be used to identify slow or abnormal VO 2 responses, which can be indicative of poor aerobic fitness or various diseased states which translate into poor long-term outcomes [14,16,21,22,27,34,37,42]. Accurate VO 2 estimations would also allow accurate estimations of exercise intensity. These could be used to easily monitor VO 2 during exercise and improve the safety of exercise evaluations or training programs. In healthy individuals, real-time VO 2 estimates from an ANN could improve the accuracy of energy expenditure estimations in wearable devices, which have had poor accuracy to date [50]. Other predictions could also be attempted using real-time VO 2 estimates including the prediction of cardiac output, stroke volume, and maximal oxygen uptake (VO 2 max) [33,48]. VO 2 max is a strong predictor of mortality in both healthy adults and those with chronic diseases [16,22,34,42]. Accurate VO 2 predictions from an ANN could be used as inputs in a regression model to predict VO 2 max, revolutionizing the assessment of VO 2 max by making it useful in settings where gas exchange is not feasible due to financial, spatial, or temporal constraints. Neural networks are

Limitations
The primary limitations of this study are the small sample size (n = 12) and narrow demographics of the subject pool. These make it difficult to extrapolate the results to other ages, genders, and fitness levels. The algorithm utilized in the current study can only be used for individuals who have similar demographics and a normal HR response. Additionally, it can currently only be applied to cycling. However, the systems and methods utilized in this study could easily be applied to other exercise modes such as walking or running as long as there were inputs pertaining to the exercise intensity and response of the cardiopulmonary system.

Future directions
Future studies should include a larger, more diverse subject pool. They could also experiment with adding variables to the model (eg. muscle oxygen saturation) or combining a neural network with other forms of machine learning to attempt estimations of VO 2 max. VO 2 max is considered the single best measurement of overall health and fitness [16,17]. It is a strong predictor of cardiovascular disease risk and all-cause mortality [12,43]. Accurate assessment of VO 2 max without the need to perform a maximal cardiopulmonary exercise test would dramatically increase the accessibility of VO 2 max and potentially allow it to become a vital sign [39].

Conclusions
This study provided evidence that an ANN can be used to accurately predict VO 2 responses during cycling at varied submaximal intensities using HR and exercise intensity data. This technique can be expanded upon in the future to predict VO 2 responses using simple, easily accessible inputs.
Conflict of interest: Authors state no conflict of interest.