# A Bayesian Network Model on the Public Bicycle Choice Behavior of Residents: A Case Study of Xi’an

Authors: Qiuping Wang; Hao Sun; Qi Zhang
Journal: Mathematical Problems in Engineering
 (2017)

---

## Abstract

In order to study the main factors affecting the behaviors that city residents make regarding public bicycle choice and to further study the public bicycle user’s personal characteristics and travel characteristics, a travel mode choice model based on a Bayesian network was established. Taking residents of Xi’an as the research object, a K2 algorithm combined with mutual information and expert knowledge was proposed for Bayesian network structure learning. The Bayesian estimation method was used to estimate the parameters of the network, and a Bayesian network model was established to reflect the interactions among the public bicycle choice behaviors along with other major factors. The K-fold cross-validation method was used to validate the model performance, and the hit rate of each travel mode was more than 80%, indicating the precision of the proposed model. Experimental results also present the higher classification accuracy of the proposed model. Therefore, it may be concluded that the resident travel mode choice may be accurately predicted according to the Bayesian network model proposed in our study. Additionally, this model may be employed to analyze and discuss changes in the resident public bicycle choice and to note that they may possibly be influenced by different travelers’ characteristics and trip characteristics.


---

## Body

## 1. Introduction

Under the requirements of sustainable development in China that prescribe low carbon development and environmental harmony, more and more cities have begun to build bike-sharing systems that integrate traditional bicycle usage with public transit, providing the advantages of the flexibility of bicycles and the open sharing of public transit [1, 2], as shown in Figure 1. The construction of special facilities for these systems is relatively simple and easy to implement. The public use of bicycles is highly adaptable to the existing urban road network, and it can cooperate with public transportation networks to connect to the bus or subway, making public transit service from door to door a reality in the true sense [3]. The bike-sharing system first appeared in Holland, Amsterdam in 1968, where it was known as the “white bicycle plan.” After four technical innovations, public usage of bicycles has made great progress around the world in terms of scale, security, comfort, and other aspects. In the 21st century, we have seen public bicycle usage expand throughout the world; in Europe, Asia, and the other five continents, at least 199 bicycle sharing projects have been implemented, and Europe has accounted for approximately 78.1% of that total number. By the end of 2010, 192 cities in 27 countries had built a bike-sharing system [4–6].Figure 1
Distribution of public bicycle at a certain time in Xi’an, China.Research on bicycle travel behavior and decisions can reflect the operational effects and mechanisms of a bike-sharing system. To date, western countries have conducted in-depth research in this area [7, 8]. Research on public bicycle travel behavior and decisions can be divided into five areas: (1) study of the operational effects of bike-sharing system usage and the constructive effects of its related facilities [9–13]; (2) usage times and average distance of public bicycle travel, which can reflect the basic usage characteristics of public bicycles [14, 15]; (3) the choice behavior of travel modes, including studies that discuss the factors that influence the choice to use public bicycles and other studies examining the combined effects of multiple factors on the choice of bicycle travel patterns and established theoretical models of the choice mechanism, among which the rational choice theory and discrete choice models were widely used [10, 16–18]; (4) public bicycle route choice behavior, for which qualitative methods were used to analyze the relationship between the road environment and route choice of riders in many studies, some studies exploring the most important factors affecting bicycle route selection and some relying on selection models that were used to quantitatively investigate route choice behavior of bicyclers under the influence of multiple factors [19–23]; (5) the difference in travel behavior of public bicyclers under conditions of different travel times and travel destinations [24, 25].In the research of travel mode choice theory and method, the discrete model has been widely used to study the mode choice behavior of travelers, and the binary Logit, MNL, logistic regression, and nested Logit models were established [26–29]. Yang and Zhu [27] established a structural equation model of residents’ mode choice in the process of urbanization based on an analysis of the trip chain, and this study came to the conclusion that family and personal attributes, land use, and trip chain influenced the choice of travel mode. Parkin et al. [28] explained the bicycle travel rate at the constituency level using the logistic model, which indicated that the car ownership rate is a significant factor hindering bike travel and noting that the pulling effect of the trip rate is weak if it relies only on the construction of bicycle facilities. Zhang et al. [29] analyzed the passenger flow composition of the Beijing-Shanghai railway and passenger travel mode choice behavior characteristics; this study utilized disaggregation theory and the binary Logit model of passengers’ mode choice. With further research on travel mode choice theory and method, many scholars have begun to study the mode choice behavior models that consider psychological and environmental variables as well [30–32].Overall, most existing researches construct in-depth and accurate models of mode choice behavior by employing the discrete model. However, the discrete model cannot directly reflect changes in individual factors and other factors that influence the mode choice. Even though public cycling is an increasingly popular way to travel, few studies have looked at the survey data about urban public bicycles, and most mode choice behavior models have not considered the public bicycle. Bias network theory expresses the association between random variables using graph theory and conditional probability to express the uncertainty relation among factors, taking advantage of a priori probability and sample information to predict a posterior probability. Bias network theory is one of the most effective methods currently applied in the uncertainty prediction field. In the transportation field, the Bayesian method has been applied in many aspects, such as predicting traffic accident situations, using rapidly collected data to calculate the probability of traffic accidents, analyzing the causes of accidents, and predicting the safety of subway operations [33–39]. Therefore, the Bayesian network can express the coupling mechanism between the decision behavior and the influencing factors visually. Accordingly, this paper constructs a travel mode choice model based on a Bayesian network, in order to reflect the interaction among factors and mode choice behavior and to enrich the current understanding of the theories behind public bicycle travel behavior and decisions.


## 2. Data Collection

Reasonable and accurate basic data is conducive to the foundation of a strong and logical Bayesian network.


### 2.1. Questionnaire Design

Our survey was conducted in Xi’an, China, and the questionnaires were designed for RP and SP surveys. The RP questionnaire was mainly used to investigate the age, sex, income, and other attributes of travelers, as well as their travel distances, departure times, travel mode choices, and other travel characteristics. The RP questionnaires were randomly distributed at public bicycle rental points near bus and subway stations and outside the entrances and exits of large residential areas, shopping centers, business office buildings, and so on. In order to comprehensively investigate residents’ willingness to travel under assumed conditions, the SP questionnaire was designed to supplement the shortcomings of the RP survey. The SP survey was conducted on the WeChat and questionnaire Apps, which reduced the cost of the investigation and obtained a large number of responses to the questionnaire. Traveler characteristics were investigated through the SP survey. The SP survey also investigated the mode choice of residents according to four demand assumptions (rigid demand during peak hours, elastic demand during peak hours, rigid demand during off-peak hours, and elastic demand during off-peak hours) for travel distances of <1 km, 1–3 km, 3–6 km, and >6 km.


### 2.2. Questionnaire Data Statistics

A total of 500 RP questionnaires were distributed, and 459 effective questionnaires were ultimately collected. 2000 valid questionnaires were collected from the SP survey. The statistical data about travelers’ attributes, as well as the travel attributes for residents who chose public bicycle, are shown in Table1.Table 1
Statistical data of public bicycle users.
Survey items
Level
Frequency
Ratio (%)
Gender
Male
1281
52.1
Female
1178
47.9
Age
<18
278
11.3
18–35
1163
47.3
35–55
740
30.1
>55
278
11.3
Income level
<2000
1001
40.7
2000–5000
804
32.7
5000–10000
573
23.3
>10000
81
3.3
Occupation
Student
551
22.4
Worker
467
19.0
Employees
964
39.2
Individuals
477
19.4
Owning a private car or not
Yes
482
19.6
No
1977
80.4
Trip purposes
Rigid demand travel (commute)
1532
62.3
Elastic demand travel (shopping, visiting, etc.)
927
37.7
Cost
Low
630
25.6
Middle
1424
57.9
High
406
16.5
Public bicycle service level
Good
927
37.7
Ordinary
1040
42.3
Bad
492
20.0
Trip distance (km)
<1
531
21.6
1–3
1424
57.9
3–6
418
17.0
>6
86
3.5
Trip duration (min)
<30
460
18.7
30–60
1581
64.3
>60
418
17.0
Trip time
Morning or evening peak hours
1559
63.4
Off-peak hours
900
36.6


## 2.1. Questionnaire Design

Our survey was conducted in Xi’an, China, and the questionnaires were designed for RP and SP surveys. The RP questionnaire was mainly used to investigate the age, sex, income, and other attributes of travelers, as well as their travel distances, departure times, travel mode choices, and other travel characteristics. The RP questionnaires were randomly distributed at public bicycle rental points near bus and subway stations and outside the entrances and exits of large residential areas, shopping centers, business office buildings, and so on. In order to comprehensively investigate residents’ willingness to travel under assumed conditions, the SP questionnaire was designed to supplement the shortcomings of the RP survey. The SP survey was conducted on the WeChat and questionnaire Apps, which reduced the cost of the investigation and obtained a large number of responses to the questionnaire. Traveler characteristics were investigated through the SP survey. The SP survey also investigated the mode choice of residents according to four demand assumptions (rigid demand during peak hours, elastic demand during peak hours, rigid demand during off-peak hours, and elastic demand during off-peak hours) for travel distances of <1 km, 1–3 km, 3–6 km, and >6 km.


## 2.2. Questionnaire Data Statistics

A total of 500 RP questionnaires were distributed, and 459 effective questionnaires were ultimately collected. 2000 valid questionnaires were collected from the SP survey. The statistical data about travelers’ attributes, as well as the travel attributes for residents who chose public bicycle, are shown in Table1.Table 1
Statistical data of public bicycle users.
Survey items
Level
Frequency
Ratio (%)
Gender
Male
1281
52.1
Female
1178
47.9
Age
<18
278
11.3
18–35
1163
47.3
35–55
740
30.1
>55
278
11.3
Income level
<2000
1001
40.7
2000–5000
804
32.7
5000–10000
573
23.3
>10000
81
3.3
Occupation
Student
551
22.4
Worker
467
19.0
Employees
964
39.2
Individuals
477
19.4
Owning a private car or not
Yes
482
19.6
No
1977
80.4
Trip purposes
Rigid demand travel (commute)
1532
62.3
Elastic demand travel (shopping, visiting, etc.)
927
37.7
Cost
Low
630
25.6
Middle
1424
57.9
High
406
16.5
Public bicycle service level
Good
927
37.7
Ordinary
1040
42.3
Bad
492
20.0
Trip distance (km)
<1
531
21.6
1–3
1424
57.9
3–6
418
17.0
>6
86
3.5
Trip duration (min)
<30
460
18.7
30–60
1581
64.3
>60
418
17.0
Trip time
Morning or evening peak hours
1559
63.4
Off-peak hours
900
36.6


## 3. Establishment of Public Bicycle Choice Model

A Bayesian network is a directed acyclic graph (DAG). Each node in the network structure represents a random variable, the directed arcs between the nodes represent the causal relationship between the variables, and the condition is considered to be independent if there is no arc connection. The process of constructing Bayesian networks (prior Bayesian networks) is generally divided into the three steps: (1) determine variables and variable range, (2) determine network structure, and (3) determine the local probability distribution and complete network parameter learning.


### 3.1. Model Variables’ Determination and Discretization

Many factors influence the behavior of resident travel mode choices. In this paper, the 12 node variables were initially selected based on a survey of public bicycle choice behavior and the factors that were identified in previous studies as influencing factors. Discretization of the 12 node variables and the corresponding variable set is summarized in Table2.Table 2
Variable definition and discretization.
Variable
Symbol
Discrete variable value
Gender
Ge
(1) Male, (2) female
Age
Ag
(1) <18, (2) 18–35, (3) 36–55, (4) >55
Income (¥)
In
(1) <2000, (2) 2000–5000, (3) 5000–10000, (4) >10000
Occupation
Oc
(1) Student, (2) worker, (3) employees, (4) individuals, (5) others
Owning a private car or not
Ow
(1) Yes, (2) no
Trip purposes
Ai
(1) Rigid demand travel (commute), (2) Elastic demand travel (shopping, visiting, etc.)
Trip distance (km)
Di
(1) <1, (2) 1–3, (3) 3–6, (4) >6
Trip duration (min)
Ti
(1) <30, (2) 30–60, (3) >60
Trip time
Pe
(1) Morning or evening commuting times, (2) normal periods
Cost
Co
(1) Low, (2) middle, (3) high
Public bicycle service level
BS
(1) Good, (2) ordinary, (3) bad
Travel mode choice
Wa
(1) Walking, (2) private bicycle and moped, (3) car, (4) public transportation (bus or subway), (5) public bicycle


### 3.2. Bayesian Network Structure Learning

The K2 algorithm was established by Cooper and Herskovits [40] based on a scoring function and the hill-climbing search strategy, which are common methods used to structure Bayesian networks. The algorithm provides a priori information about the node order, using Bayesian probability as the standard to evaluate the degree of coincidence between the model and the data. It then uses the greedy search method, and the optimal network structure can be found by continuously adding the arc to the network, thus improving the evaluation index. This is the process for node ordering: if node Xi is sorted before Xj, then node Xj cannot be the parent node of node Xi.There are many factors that affect residents’ travel mode choice behavior, and the relationship among them is fuzzy. However, the dependencies of data variables can be shown via DAG. To construct a DAG, it is necessary to determine the correlation between the nodes (i.e., arcs) and the size of relevance. In previous studies, certain expert methods have been used to examine the nodes and the order of the nodes to determine subjectivity. Based on this, we propose a Bayesian network structure learning method based on the combination of mutual information, expert knowledge, and the K2 algorithm.Mutual information may be used to measure the dependence degree among random variables by calculating the mutual information between any two nodes in a network. This method may be used if the mutual information between the two nodes is greater than a given threshold value, and it is considered that there is an arc between the two nodes [41]. Set the variable as X=Xi∣i∈[1:n] (where n is the total number of variables in the sample data set). Then, the size of the relevance between any two variables may be represented by mutual information (mutual information, MI), and the greater the value of the mutual information, the stronger the correlation between Xi and Xj(i,j∈[1:n]). The mutual information MI(Xi,Xj) between Xi and Xj is defined as follows:(1)MIXi,Xj=∑iri∑jrjPxi,xjlog⁡Pxi,xjPxiPxj,where ri is the number of possible values of the independent variable Xi, xi means that independent variable Xi takes its first i value, rj is the number of possible values of the independent variable Xj, and xj means that independent variable Xj takes its first j value.It can be seen from the definition of mutual information that the mutual information between two variables is symmetrical; namely,MI(Xi,Xj)=MI(Xj,Xi). At the same time, when P(Xi,Xj)=P(Xi)P(Xj), then Xi and Xj are independent of each other and MI(Xi,Xj)=0. Therefore, the smaller the value of the mutual information, the greater the possibility that the variables Xi and Xj are independent. According to the mutual information value for variables selection, we selected 0.002 bits as a threshold, and we found that when the mutual information value was lower than 0.002 bits, the correlation between variables was low [41].The steps of Bayesian network structural learning based on the combination of mutual information, expert knowledge, and the K2 algorithm are as follows.(1) Undirected graph establishment: compute mutual information for each pair of variablesXi, Xj∈X, when MI(Xi,Xj)>0.002. Connect arc Xi-Xj to get the undirected network G′.(2) Prune undirected graph: for each nodeXi, the descending order list LXi(Xj) is obtained according to the mutual information value. Regarding the conditional independence test, if conditional independence is established, delete the corresponding arcs and obtain the optimized undirected network G′′.(3) According to expert knowledge, the direction of the arc in the undirected networkG′′ is determined, and the directed network G′′′ is obtained.(4) After using the directed networkG′′′ to confirm the node order as the input of the K2 algorithm, employ the K2 score function to search for the highest scoring network, expressed as G∗.


### 3.3. Bayesian Network Parameter Learning

Parameter learning is to determine the conditional probability distribution at each node in the case of a given Bayesian network structure. The principle of using the Bayesian method for parameter learning is as follows: given a distribution with unknown parameters, and a complete data setD, parameter θ is a random variable with a prior distribution of Pθ. When the information of parameter θ changes, and the posterior probability is expressed as Pθ∣D, the task of Bayesian network parameter learning is to calculate Pθ∣D.


### 3.4. Bayesian Network Model Validation

The effectiveness of the established Bayesian network model is validated by calculating the hit rate of the analysis of mode choice behavior. Assume that the total number of alternative travel modes isn, and dk=i if sample data k chooses the first i travel mode; then, the corresponding prediction probability is Pik, and Pm=max⁡Pik(i=1,2,…,n)(2)ordersk=1δk=dk0δk≠dk,then:HitR=∑k=1mskm,where m is the total number of samples as travel mode i. Generally, when the hit rate reaches 80%, the model is considered to have achieved good results.Additionally, to validate the method proposed in this paper, K-fold cross-validation method was employed in experimental procedure. More specifically, in machine learning, the data setA is divided into training set B and test set C. In the case of insufficient sample size, to test the algorithm effect by making full use of the data set, the data set A is randomly divided into k packets. Each time one of the packets is used as the test set, and the remaining k-1 packages are trained as the training set. The advantage of this method is that the samples are randomly generated and trained at once, and the results are verified every time. Accordingly, 10-fold cross-validation is a common test method, which divides the data set into 10 parts, taking nine of them as training data and one of them as test data. The hit rate (or error rate) can be obtained in each test. And the average hit rate (or error rate) of results from the 10 tests is used as an estimate of the algorithm accuracy. Generally, multiple 10-fold cross-validation is required, and then the average value is calculated as an estimate of the algorithm accuracy. Therefore, the 10-fold cross-validation will be conducted 10 times to validate the model.In summary, the process of travel mode selection model based on the Bayesian network combining mutual information and expert knowledge is presented in Figure2 [42–46].Figure 2
Forecast and analysis process.


## 3.1. Model Variables’ Determination and Discretization

Many factors influence the behavior of resident travel mode choices. In this paper, the 12 node variables were initially selected based on a survey of public bicycle choice behavior and the factors that were identified in previous studies as influencing factors. Discretization of the 12 node variables and the corresponding variable set is summarized in Table2.Table 2
Variable definition and discretization.
Variable
Symbol
Discrete variable value
Gender
Ge
(1) Male, (2) female
Age
Ag
(1) <18, (2) 18–35, (3) 36–55, (4) >55
Income (¥)
In
(1) <2000, (2) 2000–5000, (3) 5000–10000, (4) >10000
Occupation
Oc
(1) Student, (2) worker, (3) employees, (4) individuals, (5) others
Owning a private car or not
Ow
(1) Yes, (2) no
Trip purposes
Ai
(1) Rigid demand travel (commute), (2) Elastic demand travel (shopping, visiting, etc.)
Trip distance (km)
Di
(1) <1, (2) 1–3, (3) 3–6, (4) >6
Trip duration (min)
Ti
(1) <30, (2) 30–60, (3) >60
Trip time
Pe
(1) Morning or evening commuting times, (2) normal periods
Cost
Co
(1) Low, (2) middle, (3) high
Public bicycle service level
BS
(1) Good, (2) ordinary, (3) bad
Travel mode choice
Wa
(1) Walking, (2) private bicycle and moped, (3) car, (4) public transportation (bus or subway), (5) public bicycle


## 3.2. Bayesian Network Structure Learning

The K2 algorithm was established by Cooper and Herskovits [40] based on a scoring function and the hill-climbing search strategy, which are common methods used to structure Bayesian networks. The algorithm provides a priori information about the node order, using Bayesian probability as the standard to evaluate the degree of coincidence between the model and the data. It then uses the greedy search method, and the optimal network structure can be found by continuously adding the arc to the network, thus improving the evaluation index. This is the process for node ordering: if node Xi is sorted before Xj, then node Xj cannot be the parent node of node Xi.There are many factors that affect residents’ travel mode choice behavior, and the relationship among them is fuzzy. However, the dependencies of data variables can be shown via DAG. To construct a DAG, it is necessary to determine the correlation between the nodes (i.e., arcs) and the size of relevance. In previous studies, certain expert methods have been used to examine the nodes and the order of the nodes to determine subjectivity. Based on this, we propose a Bayesian network structure learning method based on the combination of mutual information, expert knowledge, and the K2 algorithm.Mutual information may be used to measure the dependence degree among random variables by calculating the mutual information between any two nodes in a network. This method may be used if the mutual information between the two nodes is greater than a given threshold value, and it is considered that there is an arc between the two nodes [41]. Set the variable as X=Xi∣i∈[1:n] (where n is the total number of variables in the sample data set). Then, the size of the relevance between any two variables may be represented by mutual information (mutual information, MI), and the greater the value of the mutual information, the stronger the correlation between Xi and Xj(i,j∈[1:n]). The mutual information MI(Xi,Xj) between Xi and Xj is defined as follows:(1)MIXi,Xj=∑iri∑jrjPxi,xjlog⁡Pxi,xjPxiPxj,where ri is the number of possible values of the independent variable Xi, xi means that independent variable Xi takes its first i value, rj is the number of possible values of the independent variable Xj, and xj means that independent variable Xj takes its first j value.It can be seen from the definition of mutual information that the mutual information between two variables is symmetrical; namely,MI(Xi,Xj)=MI(Xj,Xi). At the same time, when P(Xi,Xj)=P(Xi)P(Xj), then Xi and Xj are independent of each other and MI(Xi,Xj)=0. Therefore, the smaller the value of the mutual information, the greater the possibility that the variables Xi and Xj are independent. According to the mutual information value for variables selection, we selected 0.002 bits as a threshold, and we found that when the mutual information value was lower than 0.002 bits, the correlation between variables was low [41].The steps of Bayesian network structural learning based on the combination of mutual information, expert knowledge, and the K2 algorithm are as follows.(1) Undirected graph establishment: compute mutual information for each pair of variablesXi, Xj∈X, when MI(Xi,Xj)>0.002. Connect arc Xi-Xj to get the undirected network G′.(2) Prune undirected graph: for each nodeXi, the descending order list LXi(Xj) is obtained according to the mutual information value. Regarding the conditional independence test, if conditional independence is established, delete the corresponding arcs and obtain the optimized undirected network G′′.(3) According to expert knowledge, the direction of the arc in the undirected networkG′′ is determined, and the directed network G′′′ is obtained.(4) After using the directed networkG′′′ to confirm the node order as the input of the K2 algorithm, employ the K2 score function to search for the highest scoring network, expressed as G∗.


## 3.3. Bayesian Network Parameter Learning

Parameter learning is to determine the conditional probability distribution at each node in the case of a given Bayesian network structure. The principle of using the Bayesian method for parameter learning is as follows: given a distribution with unknown parameters, and a complete data setD, parameter θ is a random variable with a prior distribution of Pθ. When the information of parameter θ changes, and the posterior probability is expressed as Pθ∣D, the task of Bayesian network parameter learning is to calculate Pθ∣D.


## 3.4. Bayesian Network Model Validation

The effectiveness of the established Bayesian network model is validated by calculating the hit rate of the analysis of mode choice behavior. Assume that the total number of alternative travel modes isn, and dk=i if sample data k chooses the first i travel mode; then, the corresponding prediction probability is Pik, and Pm=max⁡Pik(i=1,2,…,n)(2)ordersk=1δk=dk0δk≠dk,then:HitR=∑k=1mskm,where m is the total number of samples as travel mode i. Generally, when the hit rate reaches 80%, the model is considered to have achieved good results.Additionally, to validate the method proposed in this paper, K-fold cross-validation method was employed in experimental procedure. More specifically, in machine learning, the data setA is divided into training set B and test set C. In the case of insufficient sample size, to test the algorithm effect by making full use of the data set, the data set A is randomly divided into k packets. Each time one of the packets is used as the test set, and the remaining k-1 packages are trained as the training set. The advantage of this method is that the samples are randomly generated and trained at once, and the results are verified every time. Accordingly, 10-fold cross-validation is a common test method, which divides the data set into 10 parts, taking nine of them as training data and one of them as test data. The hit rate (or error rate) can be obtained in each test. And the average hit rate (or error rate) of results from the 10 tests is used as an estimate of the algorithm accuracy. Generally, multiple 10-fold cross-validation is required, and then the average value is calculated as an estimate of the algorithm accuracy. Therefore, the 10-fold cross-validation will be conducted 10 times to validate the model.In summary, the process of travel mode selection model based on the Bayesian network combining mutual information and expert knowledge is presented in Figure2 [42–46].Figure 2
Forecast and analysis process.


## 4. Experimental and Comparative Analysis

In this section, 2459 questionnaires (2000 SP questionnaires and 459 RP questionnaires) were used as experimental data sets, which is a complete experimental data set. And all the variables have been discretized. To make it clear, the whole data sets were selected for Bayesian network structure learning and parameter learning.


### 4.1. Structure Learning

In order to determine the main factors that influence residents’ travel mode choice behavior, we use formula (1) to calculate the mutual information between the travel mode (Wa) and the other 11 variables; the results are shown in Table 3.Table 3
Mutual information value between mode choice behavior and other variables (unit/bits).
Ge
Ag
In
Oc
Ow
Ai
Di
Ti
Pe
Co
BS
Wa
0.0007
0.085
0.147
0.128
0.152
0.103
0.178
0.231
0.182
0.0008
0.001Thus, for Ag, Oc, Ai, In, Ow, Di, Pe, Ti, and Wa, these eight main factors were screened out. Then, for each nodeXi, the mutual information of all the nodes was calculated, and the conditional independence test was obtained, yielding the undirected network. Based on the undirected network and expert knowledge, the direction of the arc between nodes was determined, and the directed network and node order were obtained.Adopting the BNT toolbox of the MATLAB software, we used the K2 algorithm for structural learning. The process of structure learning allows for the node order to be adjusted to obtain the optimal network structure. Finally, a network structure with nine nodes (eight factors and one decision variable) and a number of directed arcs was obtained. The results of this structural learning are shown in Figure3.Figure 3
Bayesian network structure for travel mode choice analysis.


### 4.2. Parameter Learning

Using the BNT toolbox in the MATLAB software for parameter learning, we obtain the parameters of each node (see Tables4–12).Table 4
Parameter estimation table of Wa.
Ti
Wa1
Wa2
Wa3
Wa4
Wa5
Walk
Private bicycle or moped
Car
Bus or subway
Public bicycle
(1) <30 min
0.195
0.088
0.178
0.461
0.078
(2) 30 min–1 h
0.028
0.178
0.246
0.485
0.063
(3) >1 h
0.004
0.150
0.257
0.565
0.024Table 5
Parameter estimation table of Ti.
Pe
Di
Ti1
Ti2
Ti3
<30 min
30 min–1 h
>1 h
(
1
)
(
1
)
0.883
0.077
0.040
(
1
)
(
2
)
0.765
0.211
0.022
(
1
)
(
3
)
0.093
0.715
0.192
(
1
)
(
4
)
0.013
0.026
0.961
(
2
)
(
1
)
0.948
0.037
0.015
(
2
)
(
2
)
0.845
0.148
0.009
(
2
)
(
3
)
0.123
0.834
0.043
(
2
)
(
4
)
0.045
0.230
0.725Table 6
Parameter estimation table of Di.
Ow
Di1
Di2
Di3
Di4
<1 km
1–3 km
3–6 km
>6 km
(1) Yes
0.135
0.247
0.581
0.037
(2) No
0.324
0.427
0.163
0.086Table 7
Parameter estimation table of Ow.
In
Ag
Ow1
Ow2
Yes
No
(
1
)
(
1
)
0.004
0.996
(
1
)
(
2
)
0.073
0.927
(
1
)
(
3
)
0.079
0.921
(
1
)
(
4
)
0.113
0.887
(
2
)
(
1
)
0.009
0.991
(
2
)
(
2
)
0.335
0.625
(
2
)
(
3
)
0.278
0.722
(
2
)
(
4
)
0.199
0.801
(
3
)
(
1
)
0.013
0.987
(
3
)
(
2
)
0.440
0.560
(
3
)
(
3
)
0.625
0.375
(
3
)
(
4
)
0.020
0.980
(
4
)
(
1
)
0.019
0.981
(
4
)
(
2
)
0.602
0.398
(
4
)
(
3
)
0.783
0.217
(
4
)
(
4
)
0.009
0.991Table 8
Parameter estimation table of Pe.
Ai
Pe1
Pe2
Morning or evening peak hours
Off-peak hours
(1) Rigid demand travel
0.895
0.105
(2) Elastic demand travel
0.114
0.886Table 9
Parameter estimation table of In.
Oc
In1
In2
In3
In4
<2000
2000–5000
5000–10000
>10000
(
1
)
0.991
0.005
0.002
0.002
(
2
)
0.343
0.634
0.011
0.012
(
3
)
0.006
0.543
0.365
0.086
(
4
)
0.005
0.462
0.434
0.099Table 10
Parameter estimation table of Ai.
Oc
Ai1
Ai2
Rigid demand travel
Elastic demand travel
(
1
)
0.875
0.225
(
2
)
0.631
0.369
(
3
)
0.873
0.127
(
4
)
0.431
0.569Table 11
Parameter estimation table of Oc.
Oc1
Oc2
Oc3
Oc4
Student
Worker
Employees
Individuals
0.154
0.171
0.494
0.181Table 12
Parameter estimation table of Ag.
Ag1
Ag2
Ag3
Ag4
<18
18–35
35–55
>55
0.168
0.388
0.359
0.085


### 4.3. Model Validation

To validate the method proposed by this paper, 10-fold cross-validation method is employed in the experimental procedure, which is implemented by MATLAB. And the experiment tests ten times on each data set. All attributes are discrete and there is no missing value. The approach described in Section3.4 is used to calculate hit ratio. The performance of classifiers will be quantified using the hit ratio of each traffic mode. The hit ratio is undoubtedly the most commonly used measure of performance of a classifier, which measures the percentage of correctly classified observations. 10-fold cross-validation of the whole data set is performed in the above method. Experiments are repeated 10 times for each sample size. The hit rate of the 10 experiments is shown in Table 13.Table 13
Travel mode hit rate of the 10 experiments.
Experiment number
Hit rate
Wa1
Wa2
Wa3
Wa4
Wa5
Walk
Private bicycle or moped
Car
Bus or subway
Public bicycle
(
1
)
86.1%
84.2%
87.5%
87.7%
90.5%
(
2
)
87.1%
85.1%
84.5%
85.7%
89.7%
(
3
)
88.6%
86.1%
88.3%
87.9%
91.1%
(
4
)
84.1%
83.1%
84.4%
84.9%
86.3%
(
5
)
84.4%
84.6%
85.3%
87.7%
87.5%
(
6
)
85.7%
85.5%
86.8%
87.7%
88.9%
(
7
)
83.9%
83.0%
84.2%
83.7%
86.0%
(
8
)
84.5%
84.3%
85.5%
86.5%
87.3%
(
9
)
84.5%
85.0%
86.7%
87.5%
88.4%
(
10
)
85.1%
83.9%
85.5%
87.7%
88.2%
Average
85.0%
84.5%
85.9%
86.7%
88.4%
Standard deviation
0.9990
0.9421
1.3244
1.3914
1.6084
Variance
0.9980
0.8876
1.7541
1.9360
2.5869As detailed in Table13, based on the established algorithm, the average hit rate of the prediction model is higher, and the hit rate of each travel mode is more than 80%, indicating that the hit rate is higher and the model precision is better. From the calculated standard deviation of hit rate in 10 experiments, it can be seen that the standard deviation of hit rate of each travel mode is smaller, indicating the better performance of the model.


### 4.4. Comparative Analysis

To test the performance of the algorithm in this paper, the following experiment was conducted by using the complete data set described above. The test results were compared with those obtained by using two commonly used Bayesian network structure learning algorithms (random K2, hill-climbing), two most commonly used Bias classifiers (naive Bayes, tree-augmented naive Bayes), and one most commonly used travel behavior prediction method (multinomial Logit model) in traffic engineering. In this study, the programs of these five classes of classification models were compiled in turn by the software Matlab7.04. In the experiment, 10-fold cross-validation method was employed, and all the data sets were discretized without missing values. The experimental running environment is as follows: operating system of Windows 7, Intel®Core™i5 CPU, RAM: 4.0 GB.


#### 4.4.1. Experimental Models

(1) Random K2 Algorithm. The random K2 algorithm uses random node order for structural learning.(2) Hill-Climbing Algorithm. Hill-climbing algorithm is the process of simulating mountain climbing. It randomly selects a location to climb the mountain, and each time moves in a higher direction until it reaches the top of the mountain. The optimal solution is chosen in the near space as the current solution; it runs until a local optimum solution is obtained. This algorithm is easy to fall into the local optimal solution, and whether the global optimal solution can be obtained depends on the location of the initial point.(3) Naïve-Bayes. A Naïve-Bayes BN, as discussed in literature [47–49] is a simple structure that has the classification node as the parent node of all other nodes. No other connections are allowed in a Naïve-Bayes. Its classification time is short, which is widely used in real life, such as in text classification. Its classification accuracy is comparable to that constructed by neural networks. It has two advantages over many other classifiers. First, it is easy to construct, as the structure is given a priori (no structure learning procedure is required). Second, the classification process is very efficient. Both advantages are due to its assumption that all the features are independent of each other. Although this independence assumption is obviously problematic, Naïve-Bayes has surprisingly outperformed many sophisticated classifiers over a large number of data sets, especially where the features are not strongly correlated. A simple Naïve-Bayes structure is structured as shown in Figure 4.Figure 4
A simple Naïve-Bayes structure.(4) Tree-Augmented Naïve-Bayes (TAN). TAN is an extension structure of the simple Naïve-Bayes classifier, which is an improvement on the simple Naïve-Bayes. Friedman et al. [50] studied TAN, which allows tree-like structures to be used to represent dependencies among features. It relaxes the conditional independence hypothesis of attribute nodes of simple Naïve-Bayes classifier and allows attribute nodes to have interdependencies between each other. However, the feature node has only one feature node except the classification node. The TAN classifier model structure is presented in Figure 5.Figure 5
A simple TAN structure.(5) Multinomial Logit Model (MNL). Multinomial Logit is one of the most classic models for travel behavior prediction [51, 52]. It establishes the individual utility model based on the random utility theory. The selection principle of individual n is to select the highest utility option; the formula is as follows:(3)Uin=Vin+εini∈Cn,where Uin is the utility value with the selection of option i by the individual n, Vin is the utility value that can be determined, εin is a random term of utility value (it represents the uncertainty of utility value), and Cn is the option set of individual n.Assuming thatεin obeys an independent Gumbel distribution, the Logit model can be obtained, as shown in(4)Pin=exp⁡μVin∑j∈Cnexp⁡μVjn,where μ is parameter of the Gumbel distribution.This method has its inherent shortcomings, the most obvious being the independence of irrelevant alternatives (IIA), which is highly likely to lead to inaccurate forecasts.


#### 4.4.2. Comparison Results

The performance of a model or an algorithm can only be known by comparison. To more comprehensively evaluate the classification performance of the established Bayesian network model, the proposed algorithm is compared with the classification models. The Hill-climbing and K2 algorithm are of random ordering. The data used in the experiment and the operating conditions are the same. Specifically, 500, 1000, and the whole data samples are selected for testing. To be clearer, the data needed for MNL model are obtained from the same data set. All experiments are repeated 10 times for each sample size, and the numerical results of hit rate are average values of 10-fold cross-validation of 10 experiments. The comparison results are detailed in Table14.Table 14
Travel mode hit rate comparison.
Sample size
Our method
Hill-climbing
Random K2
Naïve-Bayes
TAN
MNL
500
Average
80.52
78.75
78.20
79.36
82.93
65.70
Standard deviation
3.19
3.29
3.76
3.54
3.46
4.49
1000
Average
83.51
83.37
82.73
80.27
83.25
78.20
Standard deviation
2.76
3.14
3.24
3.11
3.04
1.49
2459 (whole data set)
Average
86.57
84.06
84.45
81.38
84.66
78.20
Standard deviation
2.11
2.96
3.06
3.03
2.96
1.36As can be seen from Table14 and Figure 6, both the presented method and other five algorithms have high classification accuracy, but classification accuracy of our method is higher than other five classification algorithms as a whole. The Naïve-Bayes and TAN perform better on small data sets and achieve higher accuracy. The Random K2 and hill-climbing algorithm have better overall performance than the Naïve-Bayes and TAN in these experiments. Our model outperforms TAN significantly. The average hit rate for our model is 86.57%, which is higher than that for TAN (84.66%). With the increase of training data, the accuracy of our model increases gradually, but our method does not perform well on small data sets. Among all experimental results, the standard deviation of our method is relatively small with the higher stability. Experimental results show that the novel method proposed in this paper has good classification performance on larger sample data sets.Figure 6
Comparison of travel mode hit rates.


## 4.1. Structure Learning

In order to determine the main factors that influence residents’ travel mode choice behavior, we use formula (1) to calculate the mutual information between the travel mode (Wa) and the other 11 variables; the results are shown in Table 3.Table 3
Mutual information value between mode choice behavior and other variables (unit/bits).
Ge
Ag
In
Oc
Ow
Ai
Di
Ti
Pe
Co
BS
Wa
0.0007
0.085
0.147
0.128
0.152
0.103
0.178
0.231
0.182
0.0008
0.001Thus, for Ag, Oc, Ai, In, Ow, Di, Pe, Ti, and Wa, these eight main factors were screened out. Then, for each nodeXi, the mutual information of all the nodes was calculated, and the conditional independence test was obtained, yielding the undirected network. Based on the undirected network and expert knowledge, the direction of the arc between nodes was determined, and the directed network and node order were obtained.Adopting the BNT toolbox of the MATLAB software, we used the K2 algorithm for structural learning. The process of structure learning allows for the node order to be adjusted to obtain the optimal network structure. Finally, a network structure with nine nodes (eight factors and one decision variable) and a number of directed arcs was obtained. The results of this structural learning are shown in Figure3.Figure 3
Bayesian network structure for travel mode choice analysis.


## 4.2. Parameter Learning

Using the BNT toolbox in the MATLAB software for parameter learning, we obtain the parameters of each node (see Tables4–12).Table 4
Parameter estimation table of Wa.
Ti
Wa1
Wa2
Wa3
Wa4
Wa5
Walk
Private bicycle or moped
Car
Bus or subway
Public bicycle
(1) <30 min
0.195
0.088
0.178
0.461
0.078
(2) 30 min–1 h
0.028
0.178
0.246
0.485
0.063
(3) >1 h
0.004
0.150
0.257
0.565
0.024Table 5
Parameter estimation table of Ti.
Pe
Di
Ti1
Ti2
Ti3
<30 min
30 min–1 h
>1 h
(
1
)
(
1
)
0.883
0.077
0.040
(
1
)
(
2
)
0.765
0.211
0.022
(
1
)
(
3
)
0.093
0.715
0.192
(
1
)
(
4
)
0.013
0.026
0.961
(
2
)
(
1
)
0.948
0.037
0.015
(
2
)
(
2
)
0.845
0.148
0.009
(
2
)
(
3
)
0.123
0.834
0.043
(
2
)
(
4
)
0.045
0.230
0.725Table 6
Parameter estimation table of Di.
Ow
Di1
Di2
Di3
Di4
<1 km
1–3 km
3–6 km
>6 km
(1) Yes
0.135
0.247
0.581
0.037
(2) No
0.324
0.427
0.163
0.086Table 7
Parameter estimation table of Ow.
In
Ag
Ow1
Ow2
Yes
No
(
1
)
(
1
)
0.004
0.996
(
1
)
(
2
)
0.073
0.927
(
1
)
(
3
)
0.079
0.921
(
1
)
(
4
)
0.113
0.887
(
2
)
(
1
)
0.009
0.991
(
2
)
(
2
)
0.335
0.625
(
2
)
(
3
)
0.278
0.722
(
2
)
(
4
)
0.199
0.801
(
3
)
(
1
)
0.013
0.987
(
3
)
(
2
)
0.440
0.560
(
3
)
(
3
)
0.625
0.375
(
3
)
(
4
)
0.020
0.980
(
4
)
(
1
)
0.019
0.981
(
4
)
(
2
)
0.602
0.398
(
4
)
(
3
)
0.783
0.217
(
4
)
(
4
)
0.009
0.991Table 8
Parameter estimation table of Pe.
Ai
Pe1
Pe2
Morning or evening peak hours
Off-peak hours
(1) Rigid demand travel
0.895
0.105
(2) Elastic demand travel
0.114
0.886Table 9
Parameter estimation table of In.
Oc
In1
In2
In3
In4
<2000
2000–5000
5000–10000
>10000
(
1
)
0.991
0.005
0.002
0.002
(
2
)
0.343
0.634
0.011
0.012
(
3
)
0.006
0.543
0.365
0.086
(
4
)
0.005
0.462
0.434
0.099Table 10
Parameter estimation table of Ai.
Oc
Ai1
Ai2
Rigid demand travel
Elastic demand travel
(
1
)
0.875
0.225
(
2
)
0.631
0.369
(
3
)
0.873
0.127
(
4
)
0.431
0.569Table 11
Parameter estimation table of Oc.
Oc1
Oc2
Oc3
Oc4
Student
Worker
Employees
Individuals
0.154
0.171
0.494
0.181Table 12
Parameter estimation table of Ag.
Ag1
Ag2
Ag3
Ag4
<18
18–35
35–55
>55
0.168
0.388
0.359
0.085


## 4.3. Model Validation

To validate the method proposed by this paper, 10-fold cross-validation method is employed in the experimental procedure, which is implemented by MATLAB. And the experiment tests ten times on each data set. All attributes are discrete and there is no missing value. The approach described in Section3.4 is used to calculate hit ratio. The performance of classifiers will be quantified using the hit ratio of each traffic mode. The hit ratio is undoubtedly the most commonly used measure of performance of a classifier, which measures the percentage of correctly classified observations. 10-fold cross-validation of the whole data set is performed in the above method. Experiments are repeated 10 times for each sample size. The hit rate of the 10 experiments is shown in Table 13.Table 13
Travel mode hit rate of the 10 experiments.
Experiment number
Hit rate
Wa1
Wa2
Wa3
Wa4
Wa5
Walk
Private bicycle or moped
Car
Bus or subway
Public bicycle
(
1
)
86.1%
84.2%
87.5%
87.7%
90.5%
(
2
)
87.1%
85.1%
84.5%
85.7%
89.7%
(
3
)
88.6%
86.1%
88.3%
87.9%
91.1%
(
4
)
84.1%
83.1%
84.4%
84.9%
86.3%
(
5
)
84.4%
84.6%
85.3%
87.7%
87.5%
(
6
)
85.7%
85.5%
86.8%
87.7%
88.9%
(
7
)
83.9%
83.0%
84.2%
83.7%
86.0%
(
8
)
84.5%
84.3%
85.5%
86.5%
87.3%
(
9
)
84.5%
85.0%
86.7%
87.5%
88.4%
(
10
)
85.1%
83.9%
85.5%
87.7%
88.2%
Average
85.0%
84.5%
85.9%
86.7%
88.4%
Standard deviation
0.9990
0.9421
1.3244
1.3914
1.6084
Variance
0.9980
0.8876
1.7541
1.9360
2.5869As detailed in Table13, based on the established algorithm, the average hit rate of the prediction model is higher, and the hit rate of each travel mode is more than 80%, indicating that the hit rate is higher and the model precision is better. From the calculated standard deviation of hit rate in 10 experiments, it can be seen that the standard deviation of hit rate of each travel mode is smaller, indicating the better performance of the model.


## 4.4. Comparative Analysis

To test the performance of the algorithm in this paper, the following experiment was conducted by using the complete data set described above. The test results were compared with those obtained by using two commonly used Bayesian network structure learning algorithms (random K2, hill-climbing), two most commonly used Bias classifiers (naive Bayes, tree-augmented naive Bayes), and one most commonly used travel behavior prediction method (multinomial Logit model) in traffic engineering. In this study, the programs of these five classes of classification models were compiled in turn by the software Matlab7.04. In the experiment, 10-fold cross-validation method was employed, and all the data sets were discretized without missing values. The experimental running environment is as follows: operating system of Windows 7, Intel®Core™i5 CPU, RAM: 4.0 GB.


### 4.4.1. Experimental Models

(1) Random K2 Algorithm. The random K2 algorithm uses random node order for structural learning.(2) Hill-Climbing Algorithm. Hill-climbing algorithm is the process of simulating mountain climbing. It randomly selects a location to climb the mountain, and each time moves in a higher direction until it reaches the top of the mountain. The optimal solution is chosen in the near space as the current solution; it runs until a local optimum solution is obtained. This algorithm is easy to fall into the local optimal solution, and whether the global optimal solution can be obtained depends on the location of the initial point.(3) Naïve-Bayes. A Naïve-Bayes BN, as discussed in literature [47–49] is a simple structure that has the classification node as the parent node of all other nodes. No other connections are allowed in a Naïve-Bayes. Its classification time is short, which is widely used in real life, such as in text classification. Its classification accuracy is comparable to that constructed by neural networks. It has two advantages over many other classifiers. First, it is easy to construct, as the structure is given a priori (no structure learning procedure is required). Second, the classification process is very efficient. Both advantages are due to its assumption that all the features are independent of each other. Although this independence assumption is obviously problematic, Naïve-Bayes has surprisingly outperformed many sophisticated classifiers over a large number of data sets, especially where the features are not strongly correlated. A simple Naïve-Bayes structure is structured as shown in Figure 4.Figure 4
A simple Naïve-Bayes structure.(4) Tree-Augmented Naïve-Bayes (TAN). TAN is an extension structure of the simple Naïve-Bayes classifier, which is an improvement on the simple Naïve-Bayes. Friedman et al. [50] studied TAN, which allows tree-like structures to be used to represent dependencies among features. It relaxes the conditional independence hypothesis of attribute nodes of simple Naïve-Bayes classifier and allows attribute nodes to have interdependencies between each other. However, the feature node has only one feature node except the classification node. The TAN classifier model structure is presented in Figure 5.Figure 5
A simple TAN structure.(5) Multinomial Logit Model (MNL). Multinomial Logit is one of the most classic models for travel behavior prediction [51, 52]. It establishes the individual utility model based on the random utility theory. The selection principle of individual n is to select the highest utility option; the formula is as follows:(3)Uin=Vin+εini∈Cn,where Uin is the utility value with the selection of option i by the individual n, Vin is the utility value that can be determined, εin is a random term of utility value (it represents the uncertainty of utility value), and Cn is the option set of individual n.Assuming thatεin obeys an independent Gumbel distribution, the Logit model can be obtained, as shown in(4)Pin=exp⁡μVin∑j∈Cnexp⁡μVjn,where μ is parameter of the Gumbel distribution.This method has its inherent shortcomings, the most obvious being the independence of irrelevant alternatives (IIA), which is highly likely to lead to inaccurate forecasts.


### 4.4.2. Comparison Results

The performance of a model or an algorithm can only be known by comparison. To more comprehensively evaluate the classification performance of the established Bayesian network model, the proposed algorithm is compared with the classification models. The Hill-climbing and K2 algorithm are of random ordering. The data used in the experiment and the operating conditions are the same. Specifically, 500, 1000, and the whole data samples are selected for testing. To be clearer, the data needed for MNL model are obtained from the same data set. All experiments are repeated 10 times for each sample size, and the numerical results of hit rate are average values of 10-fold cross-validation of 10 experiments. The comparison results are detailed in Table14.Table 14
Travel mode hit rate comparison.
Sample size
Our method
Hill-climbing
Random K2
Naïve-Bayes
TAN
MNL
500
Average
80.52
78.75
78.20
79.36
82.93
65.70
Standard deviation
3.19
3.29
3.76
3.54
3.46
4.49
1000
Average
83.51
83.37
82.73
80.27
83.25
78.20
Standard deviation
2.76
3.14
3.24
3.11
3.04
1.49
2459 (whole data set)
Average
86.57
84.06
84.45
81.38
84.66
78.20
Standard deviation
2.11
2.96
3.06
3.03
2.96
1.36As can be seen from Table14 and Figure 6, both the presented method and other five algorithms have high classification accuracy, but classification accuracy of our method is higher than other five classification algorithms as a whole. The Naïve-Bayes and TAN perform better on small data sets and achieve higher accuracy. The Random K2 and hill-climbing algorithm have better overall performance than the Naïve-Bayes and TAN in these experiments. Our model outperforms TAN significantly. The average hit rate for our model is 86.57%, which is higher than that for TAN (84.66%). With the increase of training data, the accuracy of our model increases gradually, but our method does not perform well on small data sets. Among all experimental results, the standard deviation of our method is relatively small with the higher stability. Experimental results show that the novel method proposed in this paper has good classification performance on larger sample data sets.Figure 6
Comparison of travel mode hit rates.


## 4.4.1. Experimental Models

(1) Random K2 Algorithm. The random K2 algorithm uses random node order for structural learning.(2) Hill-Climbing Algorithm. Hill-climbing algorithm is the process of simulating mountain climbing. It randomly selects a location to climb the mountain, and each time moves in a higher direction until it reaches the top of the mountain. The optimal solution is chosen in the near space as the current solution; it runs until a local optimum solution is obtained. This algorithm is easy to fall into the local optimal solution, and whether the global optimal solution can be obtained depends on the location of the initial point.(3) Naïve-Bayes. A Naïve-Bayes BN, as discussed in literature [47–49] is a simple structure that has the classification node as the parent node of all other nodes. No other connections are allowed in a Naïve-Bayes. Its classification time is short, which is widely used in real life, such as in text classification. Its classification accuracy is comparable to that constructed by neural networks. It has two advantages over many other classifiers. First, it is easy to construct, as the structure is given a priori (no structure learning procedure is required). Second, the classification process is very efficient. Both advantages are due to its assumption that all the features are independent of each other. Although this independence assumption is obviously problematic, Naïve-Bayes has surprisingly outperformed many sophisticated classifiers over a large number of data sets, especially where the features are not strongly correlated. A simple Naïve-Bayes structure is structured as shown in Figure 4.Figure 4
A simple Naïve-Bayes structure.(4) Tree-Augmented Naïve-Bayes (TAN). TAN is an extension structure of the simple Naïve-Bayes classifier, which is an improvement on the simple Naïve-Bayes. Friedman et al. [50] studied TAN, which allows tree-like structures to be used to represent dependencies among features. It relaxes the conditional independence hypothesis of attribute nodes of simple Naïve-Bayes classifier and allows attribute nodes to have interdependencies between each other. However, the feature node has only one feature node except the classification node. The TAN classifier model structure is presented in Figure 5.Figure 5
A simple TAN structure.(5) Multinomial Logit Model (MNL). Multinomial Logit is one of the most classic models for travel behavior prediction [51, 52]. It establishes the individual utility model based on the random utility theory. The selection principle of individual n is to select the highest utility option; the formula is as follows:(3)Uin=Vin+εini∈Cn,where Uin is the utility value with the selection of option i by the individual n, Vin is the utility value that can be determined, εin is a random term of utility value (it represents the uncertainty of utility value), and Cn is the option set of individual n.Assuming thatεin obeys an independent Gumbel distribution, the Logit model can be obtained, as shown in(4)Pin=exp⁡μVin∑j∈Cnexp⁡μVjn,where μ is parameter of the Gumbel distribution.This method has its inherent shortcomings, the most obvious being the independence of irrelevant alternatives (IIA), which is highly likely to lead to inaccurate forecasts.


## 4.4.2. Comparison Results

The performance of a model or an algorithm can only be known by comparison. To more comprehensively evaluate the classification performance of the established Bayesian network model, the proposed algorithm is compared with the classification models. The Hill-climbing and K2 algorithm are of random ordering. The data used in the experiment and the operating conditions are the same. Specifically, 500, 1000, and the whole data samples are selected for testing. To be clearer, the data needed for MNL model are obtained from the same data set. All experiments are repeated 10 times for each sample size, and the numerical results of hit rate are average values of 10-fold cross-validation of 10 experiments. The comparison results are detailed in Table14.Table 14
Travel mode hit rate comparison.
Sample size
Our method
Hill-climbing
Random K2
Naïve-Bayes
TAN
MNL
500
Average
80.52
78.75
78.20
79.36
82.93
65.70
Standard deviation
3.19
3.29
3.76
3.54
3.46
4.49
1000
Average
83.51
83.37
82.73
80.27
83.25
78.20
Standard deviation
2.76
3.14
3.24
3.11
3.04
1.49
2459 (whole data set)
Average
86.57
84.06
84.45
81.38
84.66
78.20
Standard deviation
2.11
2.96
3.06
3.03
2.96
1.36As can be seen from Table14 and Figure 6, both the presented method and other five algorithms have high classification accuracy, but classification accuracy of our method is higher than other five classification algorithms as a whole. The Naïve-Bayes and TAN perform better on small data sets and achieve higher accuracy. The Random K2 and hill-climbing algorithm have better overall performance than the Naïve-Bayes and TAN in these experiments. Our model outperforms TAN significantly. The average hit rate for our model is 86.57%, which is higher than that for TAN (84.66%). With the increase of training data, the accuracy of our model increases gradually, but our method does not perform well on small data sets. Among all experimental results, the standard deviation of our method is relatively small with the higher stability. Experimental results show that the novel method proposed in this paper has good classification performance on larger sample data sets.Figure 6
Comparison of travel mode hit rates.


## 5. Analysis of the Resident Travel Mode Choice

The logic sampling method is a kind of stochastic simulation method commonly used in Bayesian network inference. The logical sampling algorithm in GENIE software (it has been developed at the Decision Systems Laboratory, University of Pittsburgh) was used to implement the inference of the established Bayesian network. In this study, the influence of four single factors (owning a private car or not, resident age, trip time, and trip purpose) on the residents travel mode choice is analyzed. Specifically, the selection probability of each travel mode can be obtained by inputting each state of the attribute as evidence. And the reasoning results are shown in Figures7–10.Figure 7
Influence of the private car on the resident travel mode.Figure 8
Influence of the age on the resident travel mode.Figure 9
Influence of the trip time on the resident travel mode.Figure 10
Influence of the trip purpose on the resident trip mode.From Figure7, people who have private cars mainly choose to travel by car, and residents who have no private cars mainly choose public transport travel. However, from the results of our analysis of the choice to use the bike-sharing system, we found that the public bicycle selection probability of residents without a private car was higher than those who own a private car. From Figure 8, the public transport choice proportion at any age is very high; public transportation is proven to be the main method of travel for residents of Xi’an. At the same time, it can be seen that residents in the age group of 18–35 make up the largest group of people who choose the bike-sharing system, followed by those in the 36–55 age group. Residents of an older age (>55 years) rarely chose public bicycles for travel, likely because older people may not have the physical strength to cycle.Figure9 shows that, regardless of morning and evening peak hours or off-peak hours, the main methods of travel for Xi’an residents are bus and subway. During the morning and evening peak hours, the probability of public bicycle travel is 5.6% higher than during other periods; in other words, the proportion of residents who use the bike-sharing system do so mostly during the morning and evening peak hours. Figure 10 shows that the selection of the bike-sharing system was affected more by rigid travel needs of Xi’an residents than by elastic purposes.Then the states of the residents with different age and travel time are selected as the evidence input, and the influence of the two factors on the travel mode is analyzed. Taking [Ag = 2] [Pe = 1] and [Ag = 2] [Pe = 2] as the evidence input, for example, the probability of the residents behavior under the combined effect of the two factors is shown in Table15.Table 15
Influence of the resident age and trip time on the resident travel mode.
Travel mode
Walk
Private bicycle and moped
Car
Bus or subway
Public bicycle
[Ag = 2] [Pe = 1]Selection probability
0.120
0.122
0.215
0.465
0.077
[
A
g
=
2
]
[
P
e
=
2
] Selection probability
0.106
0.116
0.267
0.479
0.032The most likely choices for young adults in Xi’an, as shown in Table15, are the public transport and the subway, whether in the morning and evening peaks or in other periods. For young adults, in the morning and evening peak, the probability of choosing a public bicycle is 4.5% higher than that of other periods, while, in other periods, the probability of choosing a car is 5.1% higher than that in the morning and evening peak. Accordingly, the trip time will affect travel mode choice for young adults, and, in the morning and evening peak, young adults have a greater chance of choosing a public bicycle that can be used flexibly.When the evidence variable is set as [Wa5 = 1, “choosing the public bicycle”], the trip purpose at this period, the possibility of travel groups can be studied. Using the established Bayesian network inference, the trip purpose distribution can be shown in Table16.Table 16
Distribution of trip purpose in diagnostic reasoning.
Trip purpose
Rigid demand
Elastic demand
Selection probability
0.765
0.235From the results in Table16, when a traveler chooses a public bicycle to travel, his trip purpose is more likely to be a rigid one. And the probability of various trip groups is indicated in Table 17. As a result, employees are most likely to choose public bicycles. Therefore, employees should be majorly considered in the management and operation of public bicycles.Table 17
Distribution of trip group in diagnostic reasoning.
Trip group
Student
Worker
Employees
Individuals
Selection probability
0.155
0.173
0.489
0.183Figure11 shows node probability of Bayesian network for the public bicycle chosen, it is the inference result in the case of [Wa5 = 1, “choosing the public bicycle”], and it can be used to analyze the uncertainty relationship among nodes. In conclusion, the resident age, trip time, trip purposes, and other factors have a significant impact on the choice of bike-sharing system. The public bicycle selection probability of residents in the morning and evening peak is higher than that of other periods, which is in good agreement with the fact that the main purpose of travel is dictated by rigid travel demands.Figure 11
Node probability of Bayesian network.


## 6. Conclusions

Using Xi’an city in China as a case study, this paper analyzes the behavior of the public bicycle choices of urban residents.(1) A Bayesian network structure learning method based on the combination of mutual information, expert knowledge, and K2 algorithm was proposed. Bayesian parameter estimation, which has a high accuracy of posterior probability, was used to establish Bayesian parameter learning. The general K2 algorithm is a “greedy” algorithm, meaning that its results may not yield an optimal network. The K2 algorithm combined with mutual information and expert knowledge may be used in Bayesian network structure learning. A Bayesian network allows for the main factors affecting the traffic mode choice of residents to be accurately selected and for the interdependence between variables to be obtained quickly and accurately.(2) According to the validity of the model, the model based on a Bayesian network has a high hit rate and high accuracy. By comparing with the other 5 classification models, the novel method proposed in this paper has good classification performance.(3) Through the establishment of the analysis model for travel mode choice based on a Bayesian network, the resident mode choice under the conditions of the traveler attributes could be accurately determined by the Bayesian network inference. Changes in the public bicycle choice under the influence of various factors (such as private car, resident age, travel time, and travel purpose) can be presented, which directly reflects the relationship between the resident travel mode choice and the influencing variables. It will be helpful in judging the behavior mechanism of urban resident choices regarding public bicycles. This study enriches the research on the travel mode choices of urban residents, as well as on the research of bicycle travel behavior and decisions. The research results may be used to analyze the personal and travel characteristics of public bicycle users, to determine the main function that the bike-sharing system offers to residents, to determine the service times and distances of this system, and to guide the future development of public bicycle usage.



---

*Source: 3023956-2017-11-05.xml*