A Machine-Learning-Based Approach to Predict the Health Impacts of Commuting in Large Cities: Case Study of London

The daily commute represents a source of chronic stress that is positively correlated with physiological consequences, including increased blood pressure, heart rate, fatigue, and other negative mental and physical health effects. The purpose of this research is to investigate and predict the physiological effects of commuting in Greater London on the human body based on machine-learning approaches. For each participant, the data were collected for five consecutive working days, before and after the commute, using non-invasive wearable biosensor technology. Multimodal behaviour, analysis and synthesis are the subjects of major efforts in computing field to realise the successful human–human and human–agent interactions, especially for developing future intuitive technologies. Current analysis approaches still focus on individuals, while we are considering methodologies addressing groups as a whole. This research paper employs a pool of machine-learning approaches to predict and analyse the effect of commuting objectively. Comprehensive experimentation has been carried out to choose the best algorithmic structure that suit the problem in question. The results from this study suggest that whether the commuting period was short or long, all objective bio-signals (heat rate and blood pressure) were higher post-commute than pre-commute. In addition, the results match both the subjective evaluation obtained from the Positive and Negative Affect Schedule and the proposed objective evaluation of this study in relation to the correlation between the effect of commuting on bio-signals. Our findings provide further support for shorter commutes and using the healthier or active modes of transportation.


Introduction
Stress refers to physical, mental, or emotional reactions in response to changes that occur in the body. It is among the physiological symptoms that are frequently seen in people who work [1]. It is one of the major problems in modern society. It is the body's reaction to feeling threatened or under pressure. However, too much stress can affect our mood, our body and our relationships-especially when it feels out of control. It can make us feel anxious and irritable and affect our self-esteem. There are many possible causes of stress, for example, the pressure at work, school or home, illness, or difficult or sudden life events and many other things. Stress is responsible for abnormal responses in the autonomic nervous system (ANS), which is combined with the sympathetic nervous system (SNS) and the parasympathetic nervous system (PNS) under antagonistic control.
For millennia, we have understood that heart rate (HR) responds to stress. When we are overwhelmed with stress, in our body, adrenal glands are triggered to release the hormones cortisol and adrenaline. These can make our heart beat faster and raise our blood pressure. Many parameters can indicate stress levels in the body in medical contexts; these include heart rate variability (HRV), galvanic skin response, cortisol, blood pressure (BP), electroencephalogram (EEG), and respiratory activity [1]. In this context, the heart rate variability (HRV), i.e., the variation in the time interval between heartbeats, is known to be a reliable non-invasive biomarker of the ANS. Using BP, heart rate, and HRV, it is possible to monitor the activity of the sympathetic and parasympathetic nervous systems [2]. Apart from such physically observable phenomena or responses of the body, various technologies have also been developed to detect stress levels using physiological signals; for example, in a study conducted by Akane, they used wearable sensor and mobile phones to detect the stress. There are many novel wearable devices such as Olive, Spire, BreathAcoustics, and Gizmodo integrated with various biosensors that help people monitor stress and organise their daily life accordingly. In a study conducted by Vrijkotte, work stress was evaluated using BP, heart rate, and HRV [3]. The study resulted that the high imbalance (a combination of high effort and low reward at work) was statistically correlated with a higher heart rate during work and higher systolic blood pressure during work and leisure time. Some of the studies are based on stress questionnaires, which are commonly used by psychologists to detect patients' stress levels; for example, a research conducted by Sheldon Cohen used a questionnaire for the reliability and validity of a 14-item instrument, the Perceived Stress Scale (PSS), which is designed to measure the degree to which situations in one's life are appraised as stressful [1]. Heart rate is also used as a parameter in various studies on stress identification [4].
Thus, we herein report the application of artificial intelligence to predict the effect of commute on BP and heart rate. We include as participants individuals who commute to and from work regularly. The participants are stratified based on how they commute to work (public transport, driving, or cycling/walking). Our approach will allow us to measure the effects during and after the period of commuting for a group of people. For this purpose, cutting-edge technology is used in this research: the MySignals device. We applied machine-learning approaches to predict the effect of a long commute on human heart rate and BP in the London area. Machine learning provides systems with the ability to learn and improve automatically from experience without being programmed explicitly. The value of machine learning in healthcare is its ability to process huge datasets beyond the scope of human capability and then reliably convert an analysis of that data ultimately leading to better outcomes. Machine learning provides systems with the ability to learn and improve automatically from the experience; it enables a broader range of scenarios (different commuting types, different environment, etc.) to be explored outside of the data. Moreover, it will help us provide a generalised module with the ability to help the employers provide the right support for their employees who have a long commute. In this process, we have chosen from among the various widely accepted artificial intelligence techniques those which are most relevant to our research.

Literature Review and the State of the Art
The Sano-Picard framework [1] applied correlation analysis to find statistically significant features associated with stress and used machine learning to classify whether the participants were stressed or not. They collected five-day physiological and behavioural data, including skin conductance. They obtained over 75% accuracy for low and high perceived stress recognition using a combination of mobile phone usage and sensor data. In a study conducted by Vrijkotte, BP, heart rate, and HRV were used to evaluate work stress [3]. The results of that study suggest that work stress can cause increased heart-rate reactivity to a stressful workday, an increase in systolic BP, and lower vagal tone. In another study, Hudson [4] used a machine-learning approach to predict increases in BP.
blood-pressure prediction. ANNs are one of the best artificial intelligence (AI) technologies with the capacity to classify, measure the region of interest precisely, and model the clinical evaluation [14]. In this study, the support vector machine, recurrent neural networks, and the K-nearest neighbour algorithm are used to confirm whether heart rate and BP would be higher post-commute compared to pre-commute. Feed-forward neural networks, linear discriminant analysis (LDA), and decision tree techniques are used to confirm whether the systolic BP is higher in longer commutes versus shorter. Before applying these machine-learning techniques, a feature selection phase was conducted using several correlation methods.
Feed-forward neural networks are one of the most effective ANN techniques. In this technique, the information only moves in the forward direction. There are three main layers in this network: the input layer, the hidden layer, and the output layer. In a study, the classification of heart diseases using HRV signals was performed for normal patients and patients with congestive heart failure (CHF) and myocardial infarction. The data were taken from ECG recordings, and a multi-layer feed-forward neural network was used for their classification [15]. Three different methods (time-domain, frequency-domain, and non-linear methods) were used to select the inputs to the neural network classifier. The results obtained based on the non-linear methods were used as a high accuracy rate for classifying heart diseases was achieved. A multi-layer feed-forward neural network consisting of an input layer, multiple hidden layers, and an output layer was used to predict the probability of occurrence of hypertension [16]. This technique was also used in feature selection in ischemic heart disease identification [17]. LDA is now a widely used technique in the field of artificial intelligence and machine learning and its associated methods, including statistical analysis, data analysis, pattern recognition, and classifier models. It can predict the value of the dependent variable using the values of predictor variables. This approach can achieve better results in metrics of accuracy, specificity, and sensitivity.
In previous research, the LDA technique was used to analyse medical datasets of blood-pressure recordings to predict post-induction hypotension (i.e., lower BP), and cross-validation and the receiver operating characteristic (ROC) curve were assessed with an accuracy of 95% when an LDA model was trained on the dataset [18]. In a further study involving a dataset of elderly patients at high risk of heart failure, ECG recordings and features of respiratory breathing patterns and flow signals were used to train the LDA classification method. The technique was optimised and performed well with certain parameters applicable in the dataset. It obtained good levels of accuracy (82.4%), sensitivity (81.8%), and specificity (83.3%) [19].
Decision tree learning, a supervised machine-learning technique that is also used as a classifier model, predicts the observations, decisions, and classifications regarding any problem until a target value is reached. A decision tree algorithm has been used for continuous BP measurement, that is, the predicting of BP at a continuous rate based on human physiological data from ECG signals and heart-rate readings. It has displayed higher accuracy in calculating the mean absolute error, applying the traditional least square method, calculating regression, and analysing the monitoring data for telemedicine applications. When the systolic BP of any single individual was predicted from the data, the accuracy rate was higher than 70%, and the diastolic BP was predicted with an accuracy rate higher than 64% when calculated with gradient-boosting decision tree algorithms [18]. A decision tree is a flowchart-like tree structure in which each node represents a test on an attribute, each branch displays the output for the test, and each leaf node or terminal node holds a class label. This technique is also used for regression. It can achieve high accuracy and interpretability in many aspects. In one case study, this technique was used for the diagnosis of cardiovascular dysautonomia [20].
A support vector machine (SVM) is a powerful machine-learning model that has outperformed most other systems in a wide variety of applications. In this technique, the learning machine is given a training set of examples (or inputs) belonging to two classes, with associated labels (or output values) [21]. An SVM-based hardware platform was created to predict BP [22]. In one study, a couple of heart rate turbulence denoising methodologies were proposed and attempted with uncommon meticulousness to reinforce SVM estimation [23]. In an experiment conducted by a public heart sound database and released by the Texas Heart Institute, the kernels of heartbeat cycle segmentation and recognition were based on autocorrelation, short-time Fourier transform, and the SVM [24]. An SVM has been used to classify heartbeat time series, whereas statistical methods and signal analysis techniques were used to extract features from the signals [21].
A recurrent neural network (RNN) is a type of neural network in which the yields from past progress are a kind of nourishment that contributes to present progress. In customary neural systems, every one of the data sources and yields is free of one another. However, for example, when it is required to anticipate the next expression in a sentence, the past words are required and, consequently, there is a need to recall them. In such cases, a K-nearest neighbours algorithm is easy to implement, and a simple machine-learning algorithm can be used for both regression and classification problems, making it easy to handle missing values.
In the present work, to test our hypotheses, we use three different artificial intelligence techniques for each hypothesis. Further, various artificial intelligence techniques were applied to the medical data analyses in previous research papers and articles.

Data Collection and Research Hypotheses
In this research, the data were collected from 16 participants who were employed and commuting regularly to work in London for five continuous working days. All participants signed an informed consent agreeing to participate in the research. Their participation in this study is entirely voluntary, and they were free to withdraw at any time during the research. They are from different parts of London, work in different places, and use different modes of commute. We collected two types of data-qualitative and quantitative-based on questionnaires (the Positive and Negative Affect Schedule [PANAS]) and bio-signals (BP and heart rate), respectively. Non-invasive wearable biosensor technology was employed to acquire the data from the research participants. The MySignals software-development platform was integrated into the system developed for the present research to measure blood pressure and heart rate. The normal BP measurement should be 120/80 mmHg systolic pressure over diastolic pressure. The BP monitor automatically measures the heart rate, where the normal reading should be between 60 and 100 beats per minute (bpm) [25]. Figure 1 shows the data collection process and study design.
After the BP and heart-rate readings of each participant were recorded, other subjective factors and parameters were taken into consideration, such as age, gender, smoking, height, alcohol intake, any medication intake, medical health, location, and weather temperature. The full dataset contains data for five days, with readings taken twice a day for each participant. High BP levels can represent fluctuations due to certain risk factors, such as high alcohol intake, high sodium intake, high protein intake, low calcium levels, as well as low potassium and magnesium intake [26].
Blood pressure is the pressure of the blood in the arteries as it is pumped around the body by the heart. When our heart beats, it contracts and pushes blood through arteries to the rest of our body. This force creates pressure on the arteries. Blood pressure is recorded as two numbers: the systolic pressure (as the heart beats) over the diastolic pressure (as the heart relaxes between beats). In this research, we recorded the bio-signal (systolic pressure, diastolic pressure and heart rate) before and after the commute from the participants. Figure 2 illustrates a comparison of the pre-systolic pressure over the post-systolic pressure. As pre-systolic refers to systolic pressure recorded before the journey and post refers to systolic pressure recorded after the journey. Meanwhile, Figure 3 shows a comparison of diastolic pressure before and after the commute. Similarly, Figure 4 compares the recorded heart rate before and after the commute. After the BP and heart-rate readings of each participant were recorded, other subjective factors and parameters were taken into consideration, such as age, gender, smoking, height, alcohol intake, any medication intake, medical health, location, and weather temperature. The full dataset contains data for five days, with readings taken twice a day for each participant. High BP levels can represent fluctuations due to certain risk factors, such as high alcohol intake, high sodium intake, high protein intake, low calcium levels, as well as low potassium and magnesium intake [26].
Blood pressure is the pressure of the blood in the arteries as it is pumped around the body by the heart. When our heart beats, it contracts and pushes blood through arteries to the rest of our body. This force creates pressure on the arteries. Blood pressure is recorded as two numbers: the systolic pressure (as the heart beats) over the diastolic pressure (as the heart relaxes between beats). In this research, we recorded the bio-signal (systolic pressure, diastolic pressure and heart rate) before and after the commute from the participants. Figure 2 illustrates a comparison of the pre-systolic pressure over the post-systolic pressure. As pre-systolic refers to systolic pressure recorded before the journey and post refers to systolic pressure recorded after the journey. Meanwhile, Figure 3 shows a comparison of diastolic pressure before and after the commute. Similarly, Figure 4 compares the recorded heart rate before and after the commute.      In this research, the data were divided into two categories. The first dataset contains only the relevant objective parameters (blood pressure and heart rate), and the second dataset includes all the subjective parameters such as age, height, weight, and alcohol consumption as well as the objective  In this research, the data were divided into two categories. The first dataset contains only the relevant objective parameters (blood pressure and heart rate), and the second dataset includes all the subjective parameters such as age, height, weight, and alcohol consumption as well as the objective ones. Different machine-learning-based techniques are used in this study to objectively validate the proposed research hypotheses, which are as follows: • Systolic BP will be higher in longer versus shorter commutes; and • Objective bio-signals (heart rate, BP) for all participants will be higher post-commute than pre-commute.
We aim to analyse the biodata collected from the commuters in London and apply a machine-learning-based approach to predict the effect of a long commute on their heart rate and BP. The objectives of this research are thus as follows: • to record biodata (BP and heart rate) of London commuters using non-invasive wearable technology; and • to apply a machine-learning-based approach to predict the effect of a long commute on commuters' heart rate and BP.
Questionnaires were used to gather the qualitative data, whereas the quantitative data are the biodata acquired from the participants via sensors. The research participants were asked to fill out a questionnaire form PANAS before and after commuting. The PANAS was developed in 1988 by researchers from the University of Minnesota and Southern Methodist University. Previous mood measures have shown correlations of variable strength between positive and negative affect, and these very measures are of questionable reliability and validity. Watson, Clark, and Tellegen developed the PANAS in an attempt to provide a better, purer measure of each of these dimensions [27]. The PANAS form contains a scale of different words that describe feelings and emotions that vary depending on the situation, environment, and weather [27]. It has been widely used as a self-report measure of effect in community and clinical contexts [28]. In the present study, this method is used to demonstrate effect related to commuting from a subjective point of view. The words employed in PANAS form describe how the participant feels at the moment of answering, such as expressing positive or negative affect before and after the journey [29]. In addition, we have a section in PANAS form for evaluation of the participant's general stress levels; a participant needs to mention about any upcoming deadline at work, whether they slept well last night, anything annoying that occurred during a commute, and whether they considered yesterday to be a stressful day. In this questionnaire, the feelings and emotions were rated on a scale of 1 to 5, as illustrated in Table 1. about any upcoming deadline at work, whether they slept well last night, anything annoying that occurred during a commute, and whether they considered yesterday to be a stressful day. In this questionnaire, the feelings and emotions were rated on a scale of 1 to 5, as illustrated in Table 1. in PANAS form for evaluation of the participant's general stress levels; a participant needs to mention about any upcoming deadline at work, whether they slept well last night, anything annoying that occurred during a commute, and whether they considered yesterday to be a stressful day. In this questionnaire, the feelings and emotions were rated on a scale of 1 to 5, as illustrated in Table 1. expressing positive or negative affect before and after the journey [29]. In addition, we have a section in PANAS form for evaluation of the participant's general stress levels; a participant needs to mention about any upcoming deadline at work, whether they slept well last night, anything annoying that occurred during a commute, and whether they considered yesterday to be a stressful day. In this questionnaire, the feelings and emotions were rated on a scale of 1 to 5, as illustrated in Table 1. employed in PANAS form describe how the participant feels at the moment of answering, such as expressing positive or negative affect before and after the journey [29]. In addition, we have a section in PANAS form for evaluation of the participant's general stress levels; a participant needs to mention about any upcoming deadline at work, whether they slept well last night, anything annoying that occurred during a commute, and whether they considered yesterday to be a stressful day. In this questionnaire, the feelings and emotions were rated on a scale of 1 to 5, as illustrated in Table 1. used to demonstrate effect related to commuting from a subjective point of view. The words employed in PANAS form describe how the participant feels at the moment of answering, such as expressing positive or negative affect before and after the journey [29]. In addition, we have a section in PANAS form for evaluation of the participant's general stress levels; a participant needs to mention about any upcoming deadline at work, whether they slept well last night, anything annoying that occurred during a commute, and whether they considered yesterday to be a stressful day. In this questionnaire, the feelings and emotions were rated on a scale of 1 to 5, as illustrated in Table 1. used to demonstrate effect related to commuting from a subjective point of view. The words employed in PANAS form describe how the participant feels at the moment of answering, such as expressing positive or negative affect before and after the journey [29]. In addition, we have a section in PANAS form for evaluation of the participant's general stress levels; a participant needs to mention about any upcoming deadline at work, whether they slept well last night, anything annoying that occurred during a commute, and whether they considered yesterday to be a stressful day. In this questionnaire, the feelings and emotions were rated on a scale of 1 to 5, as illustrated in Table 1. report measure of effect in community and clinical contexts [28]. In the present study, this method is used to demonstrate effect related to commuting from a subjective point of view. The words employed in PANAS form describe how the participant feels at the moment of answering, such as expressing positive or negative affect before and after the journey [29]. In addition, we have a section in PANAS form for evaluation of the participant's general stress levels; a participant needs to mention about any upcoming deadline at work, whether they slept well last night, anything annoying that occurred during a commute, and whether they considered yesterday to be a stressful day. In this questionnaire, the feelings and emotions were rated on a scale of 1 to 5, as illustrated in Table 1. vary depending on the situation, environment, and weather [27]. It has been widely used as a selfreport measure of effect in community and clinical contexts [28]. In the present study, this method is used to demonstrate effect related to commuting from a subjective point of view. The words employed in PANAS form describe how the participant feels at the moment of answering, such as expressing positive or negative affect before and after the journey [29]. In addition, we have a section in PANAS form for evaluation of the participant's general stress levels; a participant needs to mention about any upcoming deadline at work, whether they slept well last night, anything annoying that occurred during a commute, and whether they considered yesterday to be a stressful day. In this questionnaire, the feelings and emotions were rated on a scale of 1 to 5, as illustrated in Table 1.  [27]. The PANAS form contains a scale of different words that describe feelings and emotions that vary depending on the situation, environment, and weather [27]. It has been widely used as a selfreport measure of effect in community and clinical contexts [28]. In the present study, this method is used to demonstrate effect related to commuting from a subjective point of view. The words employed in PANAS form describe how the participant feels at the moment of answering, such as expressing positive or negative affect before and after the journey [29]. In addition, we have a section in PANAS form for evaluation of the participant's general stress levels; a participant needs to mention about any upcoming deadline at work, whether they slept well last night, anything annoying that occurred during a commute, and whether they considered yesterday to be a stressful day. In this questionnaire, the feelings and emotions were rated on a scale of 1 to 5, as illustrated in Table 1. developed the PANAS in an attempt to provide a better, purer measure of each of these dimensions [27]. The PANAS form contains a scale of different words that describe feelings and emotions that vary depending on the situation, environment, and weather [27]. It has been widely used as a selfreport measure of effect in community and clinical contexts [28]. In the present study, this method is used to demonstrate effect related to commuting from a subjective point of view. The words employed in PANAS form describe how the participant feels at the moment of answering, such as expressing positive or negative affect before and after the journey [29]. In addition, we have a section in PANAS form for evaluation of the participant's general stress levels; a participant needs to mention about any upcoming deadline at work, whether they slept well last night, anything annoying that occurred during a commute, and whether they considered yesterday to be a stressful day. In this questionnaire, the feelings and emotions were rated on a scale of 1 to 5, as illustrated in Table 1. about any upcoming deadline at work, whether they slept w occurred during a commute, and whether they considered y questionnaire, the feelings and emotions were rated on a scal in PANAS form for evaluation of the participant's general stre about any upcoming deadline at work, whether they slept w occurred during a commute, and whether they considered y questionnaire, the feelings and emotions were rated on a scal expressing positive or negative affect before and after the jour in PANAS form for evaluation of the participant's general stre about any upcoming deadline at work, whether they slept w occurred during a commute, and whether they considered y questionnaire, the feelings and emotions were rated on a scal employed in PANAS form describe how the participant feel expressing positive or negative affect before and after the jour in PANAS form for evaluation of the participant's general stre about any upcoming deadline at work, whether they slept w occurred during a commute, and whether they considered y questionnaire, the feelings and emotions were rated on a scal used to demonstrate effect related to commuting from a employed in PANAS form describe how the participant feel expressing positive or negative affect before and after the jour in PANAS form for evaluation of the participant's general stre about any upcoming deadline at work, whether they slept w occurred during a commute, and whether they considered y questionnaire, the feelings and emotions were rated on a scal used to demonstrate effect related to commuting from a employed in PANAS form describe how the participant feel expressing positive or negative affect before and after the jour in PANAS form for evaluation of the participant's general stre about any upcoming deadline at work, whether they slept w occurred during a commute, and whether they considered y questionnaire, the feelings and emotions were rated on a scal report measure of effect in community and clinical contexts [2 used to demonstrate effect related to commuting from a employed in PANAS form describe how the participant feel expressing positive or negative affect before and after the jour in PANAS form for evaluation of the participant's general stre about any upcoming deadline at work, whether they slept w occurred during a commute, and whether they considered y questionnaire, the feelings and emotions were rated on a scal vary depending on the situation, environment, and weather report measure of effect in community and clinical contexts [2 used to demonstrate effect related to commuting from a employed in PANAS form describe how the participant feel expressing positive or negative affect before and after the jour in PANAS form for evaluation of the participant's general stre about any upcoming deadline at work, whether they slept w occurred during a commute, and whether they considered y questionnaire, the feelings and emotions were rated on a scal  [27]. The PANAS form contains a scale of different words th vary depending on the situation, environment, and weather report measure of effect in community and clinical contexts [2 used to demonstrate effect related to commuting from a employed in PANAS form describe how the participant feel expressing positive or negative affect before and after the jour in PANAS form for evaluation of the participant's general stre about any upcoming deadline at work, whether they slept w occurred during a commute, and whether they considered y questionnaire, the feelings and emotions were rated on a scal developed the PANAS in an attempt to provide a better, pure [27]. The PANAS form contains a scale of different words th vary depending on the situation, environment, and weather report measure of effect in community and clinical contexts [2 used to demonstrate effect related to commuting from a employed in PANAS form describe how the participant feel expressing positive or negative affect before and after the jour in PANAS form for evaluation of the participant's general stre about any upcoming deadline at work, whether they slept w occurred during a commute, and whether they considered y questionnaire, the feelings and emotions were rated on a scal In the beginning, all the participants went through the consent form and initial assessment questionnaire to check their suitability for the study. The participants recorded their feelings according to the proposed scale and rated them accordingly from 1 to 5, as shown in Table 1. The participants expressed their subjective feelings twice a day-at the beginning of their commute and the end. After filling out the questionnaire form, the participants started recording their BP and heart-rate readings. All the forms were submitted online and exported to the database. Other factors and parameters are taken into consideration included age, gender, smoking, height, alcohol intake, any medication intake, medical health, location, and weather temperature, and all these data were also exported to the database.
To apply the relevant effective techniques to the data, the data first needed to be pre-processed into the training and testing data for each of the techniques to test the hypotheses. All the values of the parameters in the dataset are in numerical form. In this experiment, two datasets were created for each hypothesis. In the first dataset, only the main parameters related to the hypothesis were included so that we could determine the pure effect of commuting on heart rate and BP. Similarly, for the second dataset, we included the main parameters plus all other parameters collected from the participants. From the second dataset, we can identify the effect of other parameters on heart rate and BP.
For the first hypothesis, the dataset was divided into two subsets. The first one contained the main parameters, such as BP, heart-rate readings (pre-and post-commute), and the duration of the commute in minutes. The second dataset included the main parameters (BP, heart-rate readings [pre-and post-commute] and duration of the commute in minutes) along with the other parameters, such as age, weight, height, smoking, alcohol intake, and temperature according to the weather report in the morning.
Similarly, for the second hypothesis, the dataset was divided into two subsets: the first one with BP and heart-rate readings (pre-and post-commute), and the second one with all parameters (i.e., BP, heart-rate readings [pre-and post-commute], duration of the commute in minutes, age, weight, height, smoking, alcohol intake, and temperature according to the weather report in the morning).

Implementation
We developed a machine-learning approach for the implementation and execution of the dataset analysis. Machine learning-based techniques were implemented to create an effective model, and different patterns and training algorithms were created to optimise the performance. The analysis was conducted by treating the data with each technique to obtain outputs that could then be compared in light of the hypotheses of this study. The data were processed for the input and target files and loaded into the software either by importing them from the system or loading them manually from the workspace.
Model performance was evaluated using widely applied statistics, namely the area under the receiver-operator characteristics (ROC) curve or AUC statistic. The area under the ROC curve (AUC) has been used as a criterion to measure the performance of the classification algorithms even if the training data embraces an unbalanced class distribution and cost-sensitiveness [30]. In each class, the ROC curve applies the threshold values to the output values so that for each threshold, the true-positive ratio (TPR) and the false-positive ratio (FPR) values are simplified. This also represents the specificity and sensitivity of the data based on the predictions and observations carried out on the model throughout the training process of the model [31]. The confusion matrix measures and displays the accuracy of a classification model or a training model by comparing both the actual class and predicted class values. It is used to describe the efficiency of a classifier. It is critical for supervised learning in the field of machine learning [32].
To the relevant techniques to the data, the data must first be pre-processed to serve as training and testing data for each of the techniques to confirm the hypotheses. The data were divided into input data and target data. The input data are the values of the parameters from the dataset, and the target data were prepared by comparing the pre-and post-commute values from the data in the form of the numerical values 0, 1, and 2 for all the techniques. If the pre-and post-commute values are the same, then the target value is 0. If the pre-commute value is lower than the post-commute value, then the target value is 1. Finally, if the post-commute value is lower than the pre-commute value, then the target value is 2. In the feed-forward neural network technique, the target data value accepts binary values only. Therefore, the target data values for this technique were prepared in the form of a logical matrix with values of 0 and 1 only.
For each technique, the first input dataset and the target data were loaded into the workspace of the model. When the neural network pattern recognition application was opened, the datasets were then selected, and a training sample size of 70%, a validation sample size of 15%, and a testing sample size of 15% were selected under the training process. When the training started, the performance, training state, error histogram, confusion matrix, and ROC curve were plotted based on the data.

Validation of the First Hypothesis
The following three techniques were used to validate the first hypothesis, namely that "Systolic BP will be higher in longer commutes than in shorter commutes":

Feed-Forward Neural Network
The feed-forward neural network is one of the simplest and most popular among the wide range of ANNs. It is an artificial neuron that is made up of linear combinations of weighted sums of the inputs as the ANN contains an input layer, hidden neuron layer, and output layer [16]. Any information inserted into this network flows linearly in a forward, one-way direction from the input layer through the hidden layer and then towards the output layer. The size of the training dataset was previously set to 70% by default by the application, and the validation and testing data sizes were set manually. The validation data and the testing data were set to equal sizes of 15% each to optimise the results. One of the major challenges in the design of a neural network is the fixation of hidden neurons with minimal error and highest accuracy. The number of hidden neurons was set to 10 to the network to perform well during training. The neural network training toolbox allows training using custom datasets and plots the confusion matrix and the ROC curve, respectively. The data were prepared via the training of the neural networks and the classifier models. The dataset was partitioned into two datasets with the following parameters: one with only the relevant parameters and the other with all the parameters. The inputs and targets were loaded and the hidden layer size was set to 10. The data were then divided into 70% training data, 15% validation data, and 15% testing data. The training algorithm used was the scaled conjugate gradient backpropagation method. The performance of the neural network was evaluated by calculating the errors using loss functions of cross-entropy while adjusting the weights and updating the bias by using the scaled conjugate gradient training algorithm. The neural network training performance for a total of 20 epochs was plotted, and the validation performance was plotted based on the simplified error values against the number of iterations or training epochs, as shown in Figure 5 below. The neural network training state was evaluated and plotted by training the whole network based on the total number of records. The state depends upon the training function that was used to plot the network, which here is the scaled conjugate gradient function, as shown in Figure 6.  The neural network training state was evaluated and plotted by training the whole network based on the total number of records. The state depends upon the training function that was used to plot the network, which here is the scaled conjugate gradient function, as shown in Figure 6. The neural network training state was evaluated and plotted by training the whole network based on the total number of records. The state depends upon the training function that was used to plot the network, which here is the scaled conjugate gradient function, as shown in Figure 6.   or the neural network between target values and predicted values after training a feed-forward neural network. As these error values indicate how the predicted values differ from the target values, they can be negative. The bins are the number of vertical bars on the graph. The total error range is divided into 20 smaller bins here. An error histogram of the feed-forward neural network is shown in Figure 7 below. Symmetry 2020, 12, x FOR PEER REVIEW 12 of 25 Figure 7 below presents an error histogram, which is a plot of a graph of a histogram of error values. This histogram represents any number of errors that occurred during the training of the model or the neural network between target values and predicted values after training a feed-forward neural network. As these error values indicate how the predicted values differ from the target values, they can be negative. The bins are the number of vertical bars on the graph. The total error range is divided into 20 smaller bins here. An error histogram of the feed-forward neural network is shown in Figure 7 below. The confusion matrix in Figure 8 displays the accuracy of the feed-forward neural network by comparing the actual and predicted classes. The overall accuracy obtained for this model was 92% when the network was trained successfully. The model predicted 35 of the predicted values were found correct out of 35 to have increased just equal to the actual values, as per the assumed hypothesis. Similarly, for the second class, two values were misclassified out of 11, and in the third class, two values were misclassified out of four. The overall accuracy for this classifier is illustrated in Figure 8 below. The confusion matrix in Figure 8 displays the accuracy of the feed-forward neural network by comparing the actual and predicted classes. The overall accuracy obtained for this model was 92% when the network was trained successfully. The model predicted 35 of the predicted values were found correct out of 35 to have increased just equal to the actual values, as per the assumed hypothesis. Similarly, for the second class, two values were misclassified out of 11, and in the third class, two values were misclassified out of four. The overall accuracy for this classifier is illustrated in Figure 8 below. The ROC curve was plotted with all the iterations-all training, testing, and validating datasets and also with the whole dataset-and the accuracy was classified according to the training with the data in the network, as shown in Figure 9. The ROC curve was plotted with all the iterations-all training, testing, and validating datasets and also with the whole dataset-and the accuracy was classified according to the training with the data in the network, as shown in Figure 9. The ROC curve was plotted with all the iterations-all training, testing, and validating datasets and also with the whole dataset-and the accuracy was classified according to the training with the data in the network, as shown in Figure 9.

Linear Discriminant Analysis
Generally, this technique is considered for operations such as classification, regression, statistical analysis, and pattern recognition. As mentioned above, in this study, two datasets were compiled: one with the main parameters (BP and heartbeat) and the other with all the parameters collected from the participants, including the main parameters as well. The first dataset, with its input parameters and target data, was loaded into one file in the workspace.
Firstly, the classifier model was trained via a fivefold cross-validation method, which helps to protect against the overfitting of data or any noisy data. This training was successfully conducted for the first input data using the cross-validation method and no validation. After the model was trained, the accuracy obtained was 86% with validation and 92% without validation. When training was conducted with the second dataset, we obtained an accuracy level of 80% for the fivefold cross-validation and 94% without validation. Better results for metrics such as the accuracy and the precision values were shown for both datasets when trained with the no validation method compared to the cross-validation method, as shown in the confusion matrices in Figures 10 and 11 below.
The second dataset containing all the objective and subjective variables was divided into the input or predictor variables and target or response variables when trained a second time via the fivefold cross-validation method. An accuracy level of 80% was obtained. In the confusion matrix shown in Figure 12 below, the TPR is 94% and the FNR is 100%, whereas the positive predicted value rate is 94% and the false discovery rate is 100%. the first input data using the cross-validation method and no validation. After the model was trained, the accuracy obtained was 86% with validation and 92% without validation. When training was conducted with the second dataset, we obtained an accuracy level of 80% for the fivefold crossvalidation and 94% without validation. Better results for metrics such as the accuracy and the precision values were shown for both datasets when trained with the no validation method compared to the cross-validation method, as shown in the confusion matrices in Figures 10 and 11 below.    In the second dataset, the input predictor variables and the target response variables, when trained with no validation method, obtained a total accuracy level of 94%. In the confusion matrix in Figure 13, the TPR is 100%, and the FNR is 50%.
The second dataset containing all the objective and subjective variables was divided into the input or predictor variables and target or response variables when trained a second time via the fivefold cross-validation method. An accuracy level of 80% was obtained. In the confusion matrix shown in Figure 12 below, the TPR is 94% and the FNR is 100%, whereas the positive predicted value rate is 94% and the false discovery rate is 100%. In the second dataset, the input predictor variables and the target response variables, when trained with no validation method, obtained a total accuracy level of 94%. In the confusion matrix in Figure 13, the TPR is 100%, and the FNR is 50%.

Decision Tree Technique
A decision tree is a supervised machine-learning technique for creating a structured tree with the help of the training data of a trained classifier model. It is also known as a predictive model because it can conduct mapping from observations about the dataset or any parameters or predictor variables by comparing them with the target or response variables. During the training of the classifier model, the first dataset was imported with the relevant parameters, which are the predictor variables, including the target data, which are the response variables to compare with the output of the classifier model. Afterwards, the fivefold cross-validation method has been employed to protect against the overfitting of data.
The confusion matrix was plotted against TPRs, FNRs, positive predictive values, false discovery rates, and the total number of observations against true classes and the predicted class values. The

Decision Tree Technique
A decision tree is a supervised machine-learning technique for creating a structured tree with the help of the training data of a trained classifier model. It is also known as a predictive model because it can conduct mapping from observations about the dataset or any parameters or predictor variables by comparing them with the target or response variables. During the training of the classifier model, the first dataset was imported with the relevant parameters, which are the predictor variables, including the target data, which are the response variables to compare with the output of the classifier model. Afterwards, the fivefold cross-validation method has been employed to protect against the overfitting of data.
The confusion matrix was plotted against TPRs, FNRs, positive predictive values, false discovery rates, and the total number of observations against true classes and the predicted class values. The first dataset of input predictor variables and the target response variables, when trained via the cross-validation method, obtained a total accuracy of 76% overall. In the confusion matrix, for the predicted values, 3 predicted values were misclassified as decreased instead of increased, while just 5 predicted values were misclassified as increased instead of decreased. The TPR was 91%, and the FNR was 100%; however, the positive predicted value rate was 80%, and the false discovery rate was found to be 40%.
The same first dataset as before was used, which was comprised of input predictor variables and target response variables. When trained with no validation method, a higher accuracy of 90% was obtained. In the confusion matrix, 34 of the predicted values were found to be correct out of 35 to have increased just closer to the actual values, as per the assumed hypothesis. In the second class, three values were misclassified out of 11, and in the third class, one value was misclassified out of four. The TPR was 97%, which is higher than the validated trained model, and the FNR was 25%; however, the positive predicted value rate was 94%, and the false discovery rate was found to be 40%.
The second dataset including all the subjective and objective parameters was also used to train the classifier model using both validation methods. The target data values, or response variables, were in the form of 0 s, 1 s, and 2 s. In the target data, 0 means "the same", 1 indicates an increased systolic BP, and 2 indicates decreased systolic BP readings, as required to test the hypothesis. When the model was trained, the accuracy obtained was 76% with the cross-validation method. The confusion matrix and ROC curve were plotted per data. The same first dataset as before was used, which was comprised of the input predictor variables and the target response variables. When the model was trained with no validation method, a higher accuracy of 90% was obtained. Similarly, for the second dataset, we obtained 99% accuracy for both the fivefold cross-validation and no validation cases.

Comparison of Performance of Artificial Intelligence Techniques Using Confusion Matrices
In this research, for all of the techniques applied to the data, a confusion matrix was plotted against the TPRs, FNRs, positive predictive values, false discovery rates, and the total number of observations against the true classes and the predicted class values. The results in Table 2 show the accuracy levels of all the classifiers by comparing their actual and predicted classes. The feed-forward neural network exhibited the least misclassification of all the techniques. In Table 2, I represents that the value of the bio-parameter remained the same pre-and post-commute, II represents an increase from pre-to post-commute, and III represents a decrease in the value of the bio-parameter post-commute. The learning performance of the feed-forward neural network was shown to be much better than that of other techniques. Table 3 below shows the different artificial intelligence techniques used along with their accuracy levels for the first hypothesis: "Systolic BP will be higher in longer commutes versus shorter commutes".  Figure 14 shows comparisons of the different AI techniques used to examine the first hypothesis with their accuracy for the first and second datasets.  No validation 99% Figure 14 shows comparisons of the different AI techniques used to examine the first hypothesis with their accuracy for the first and second datasets.

Validating the second hypothesis
Similarly, for the second hypothesis, "The objective bio-signals (heart rate, BP) for all participants will be higher post-commute than pre-commute", we used the following three AI techniques:

Validating the Second Hypothesis
Similarly, for the second hypothesis, "The objective bio-signals (heart rate, BP) for all participants will be higher post-commute than pre-commute", we used the following three AI techniques:

Recurrent Neural Network
As mentioned above, a recurrent neural network is a type of neural network where the yields from past progress are a kind of nourishment that contributes to present progress. In traditional neural systems, every one of the data sources and yields is free of one another. However, for example, in cases when it is required to anticipate the next expression in a sentence, the past words are required and, consequently, there is a need to recall them. To deal with such cases, the RNN was developed, as it can explain such issues with the assistance of a "hidden layer". This layer is the principal and most significant component of an RNN, which recalls certain data about a grouping. In applying this technique, we used the training function TRAINLM, LEARNGD for adaption learning; the performance function was given as the mean square error (MSE); the number of layers was selected as two; the properties were selected as Layer 1; the number of neurons given was 10, and the transfer function was the TANSIG technique, which was named after the hyperbolic tangent. The accuracy for the first dataset was 72%, and for the second, it was 62%.

Support Vector Machine
An SVM is a supervised machine-learning algorithm that can be used for classification or regression problems. It uses a technique called the kernel trick to transform the data, and then, based on these transformations, it finds an optimal boundary between the possible outputs. Simply put, it does some extremely complex data transformations and then figures out how to separate the data based on the labels or outputs that have been defined. The popularity of this technique is due to its capability of doing both classification and regression. There are different types of SVM techniques available, namely linear SVM, quadratic SVM, cubic SVM, fine Gaussian SVM, medium Gaussian SVM, and coarse Gaussian SVM. After training all the SVM techniques, we obtained 86.0% accuracy for linear SVM and quadratic SVM in the BP-systolic case. For the second dataset, linear SVM and fine Gaussian SVM obtained the same level of accuracy.

K-Nearest Neighbours
In this algorithm, k-means clustering creates k groups from a set of objects to increase the similarity among the members of each group. It is a popular cluster analysis technique for exploring datasets. Cluster analysis is a family of algorithms designed to form groups such that the group members are more similar to one another than to non-group members. It is popular because of its simplicity, which means that it is generally fast and more efficient than other algorithms, especially over large datasets. For systolic BP, we obtained accuracy rates of 66% and 65% for the first and second datasets, respectively. Similarly, for diastolic BP, we obtained 78% accuracy for both datasets. Finally, we obtained 68% accuracy for both datasets for heart rate.

Comparison of Performance of Artificial Intelligence Techniques Using a Confusion Matrix
The confusion matrix is used to visualise the accuracy of all the classifiers by comparing the actual and predicted classes, as shown in Table 4 below. In the table, the SVM exhibits the least misclassification compared to other techniques. In the Predicted Class columns, I represents the case in which the values of the bio-parameters stay the same post-commute, II represents an increase post-commute, and III represents a decrease in values of the bio-parameters post-commute.  Table 5 below shows the different artificial intelligence techniques used for commuting-effect prediction with the accuracy as obtained for the second hypothesis: "The objective bio-signals (heart rate, BP) for all participants will be higher post-commute than pre-commute".  Figure 15 below shows different artificial intelligence techniques used for commuting-effect prediction with their accuracy for the second hypothesis.

PANAS Results
In this study, the participants were required to fill out the PANAS form before and after commuting. The form consists of different words that describe feeling and emotions [28] and is sensitive to fluctuations in mood.

Scoring Instructions
To score the positive affect, we added up the scores on lines 1, 3, 5, 9, 10, 12, 14, 16, 17, and 19 from Table 1. The scores on the PANAS Scorecard range anywhere from 10 to 50. Higher scores represent higher levels of positive affect. Similarly, to score the negative affect, we added up the scores on items 2, 4, 6,7,8,11,13,15,18, and 20 from Table 1. Again, the scores range anywhere from 10 to 50. Following the scoring instructions, we calculated the positive and negative affect pre-and post-commute. Then, we calculated the average of pre-positive affect, pre-negative affect, post-positive affect, and post-negative affect for all of the participants. Table 6 below shows the values for average positive and negative affect before and after commuting from the PANAS Scorecard.

PANAS Results
In this study, the participants were required to fill out the PANAS form before and after commuting. The form consists of different words that describe feeling and emotions [28] and is sensitive to fluctuations in mood.

Scoring instructions
To score the positive affect, we added up the scores on lines 1, 3, 5, 9, 10, 12, 14, 16, 17, and 19 from Table 1. The scores on the PANAS Scorecard range anywhere from 10 to 50. Higher scores represent higher levels of positive affect. Similarly, to score the negative affect, we added up the scores on items 2, 4, 6,7,8,11,13,15,18, and 20 from Table 1. Again, the scores range anywhere from 10 to 50. Following the scoring instructions, we calculated the positive and negative affect pre-and post-commute. Then, we calculated the average of pre-positive affect, pre-negative affect, postpositive affect, and post-negative affect for all of the participants. Table 6 below shows the values for average positive and negative affect before and after commuting from the PANAS Scorecard. Table 6. Average of positive and negative affect from PANAS.  From Table 6, we can see that the positive affect of pre-commute is higher than post-commute, which signifies that the participants' feelings and emotions were more positive before the commute. Similarly, the negative affect score is lower pre-commute than post-commute, signifying that the participants were more stressed, or their feelings were more negative after their commute.
Similarly, based on the results obtained using the PANAS, we found that positive affect was higher pre-commute, which indicates that the participants more positive or interested in going to work before the commute. Negative affect is higher after the commute, which indicates a less interested or stressed state post-commute.
When comparing the results obtained using both approaches, those obtained from the machine-learning-based approach matched the subjective results obtained from the PANAS.
In this research, blood pressure and heart rate are main parameters to predict the stress level. In addition, we collected the parameters such as age, gender, smoking, height, alcohol intake, any medication intake, medical health, location, weather (temperature). We have also added the section in PANAS form for evaluation of the participant's general stress levels; a participant needs to mention about any upcoming deadline at work, whether they slept well last night, anything annoying that occurred during a commute, and whether they considered yesterday to be a stressful day. In this research, the data were collected from participants who were employed and commuting regularly to work in London for five continuous working days. Some of the issues included the participants being from different part of London, having different cultural backgrounds, and being interviewed on different days. These things might slightly challenge model assumptions.

Conclusions
In this study, we developed an intelligent model based on different machine-learning approaches to predict the effect of commuting on heart rate and BP. Further, we used questionnaires (the PANAS) to demonstrate the impact of commuting on effect from a subjective point of view. When we applied the machine-learning based model, whether the commute duration was short or long, it was noticed that the systolic pressure was usually higher post-commute than pre-commute one, and we found the objective bio-signals (heart rate and BP) to be higher post-commute than pre-commute one. BP and heart rate are positively correlated to mood and stress. Based on this machine-learning approach, we were able to determine the participants' level of stress after commuting.
A comprehensive experiment was conducted to achieve the best structure for the feed-forward neural network, which suited the processed datasets. An accuracy level of 92% was obtained for the first dataset, which included only the main bio-signals, while an accuracy level of 94% was achieved for the second dataset, which included the main bio-parameters plus other subjective parameters collected from the participants. This increase in accuracy shows that the neural network was able to achieve better performance with the dataset containing both quantitative and qualitative parameters. The quantitative results confirmed the proposed hypothesis, which assumed that the systolic BP would be higher for longer commutes versus shorter ones, as it was found that the post-commute readings for systolic BP were higher, irrespective of the duration of the commute. Systolic BP was normally higher for shorter commutes than for longer ones.
Similarly, the results achieved by the fused machine-learning techniques confirmed the second hypothesis, which assumed that the bio-parameters (diastolic BP and heart rate) would be higher post-commute than pre-commute. The processed dataset was also partitioned into two datasets of parameters, one with only the relevant bio-parameters and the other with all the quantitative and qualitative parameters. In addition to the objective evaluation based on the machine-learning techniques, we used the PANAS survey, which has been widely utilised as a self-report measure of effect in both community and clinical contexts. From the PANAS results, it was determined that the positive affect of the participants was higher pre-commute than post-commute, which indicates that the mood and emotional state of the participants were more positive before commuting. Similarly, the negative affect of the participants was higher post-commute than pre-commute, which indicates that the participants were more stressed after the commute.