# A Scenario-Adaptive Driving Behavior Prediction Approach to Urban Autonomous Driving
## Materials and Methods  
### Problem Formulation and Method Overview  
#### 2.1.1 Problem Formulation  
The driving behavior prediction algorithm should be running for each target vehicle at every time step. The prediction process can be divided into three steps: First, for target vehicle \(i\) at time \(t\), the characteristics of its current scenario \(s^{i}\) need to be extracted and analyzed. Then, pre-trained driving behavior models \(M^{i}_{s^{i}}\), input features \(F^{i}_{s^{i}}\), and a priori probabilities \(P^{i}_{s^{i}}\) for \(M^{i}_{s^{i}}\) should be specified. Finally, one of the pre-defined maneuvers \(b^{i}\) should be assigned for the next time steps by  
\[b^{i}=\mathcal{M}(F^{i}_{s^{i}},M^{i}_{s^{i}},P^{i}_{s^{i}}). \tag{1}\]  
This process can also be named \"behavior tagging,\" tagging a sequence of observations with a similar driving behavior \(b^{i}\). \(b^{i}\) belongs to a finite set of predefined maneuvers:  
\[b^{i}\in\mathfrak{B}:=\{LK,LCL,LCR,TR,TL,GS,SS,...\}, \tag{2}\]  
corresponding to lane keeping (LK), lane change to left (LCL), lane change to right (LCR), turn right (TR), turn left (TL), go straight at intersection (GS), stop before the stop line (SS). In this study, we just considered the aforementioned lateral behaviors and more behaviors can be added easily. The candidate driving behavior prediction models \(M^{i}_{s^{i}}\) are chosen based on \(s^{i}\) from the complete model set:  
\[M^{i}_{s^{i}}\subset\mathfrak{M}:=\{M_{LK},M_{LCR},M_{TR},...\}, \tag{3}\]where \(\mathfrak{M}\) contains all the possible driving behavior models, in which one behavior model corresponds to one type of behavior. The models' input features \(F^{i}_{s^{i}}\) are determined based on \(s^{i}\) and \(M^{i}_{s^{i}}\), and belong to the pre-defined feature set:  
\[F^{i}_{s^{i}}\subset\mathfrak{F}, \tag{4}\]  
where \(\mathfrak{F}\) is a pre-defined feature set, including all the possible input features for all the models in \(\mathfrak{M}\). In this study, the input features that contribute more prediction power were selected. For the lane-changing behaviors (LK, LCR, LCL), there are two features. The first one is the difference \(d_{diff-lane}\) between distance to right lane line \(d_{right-lane}\) and distance to left lane line \(d_{left-lane}\). The second is the lateral velocity \(v_{lat}\) of the target vehicle. These two features have been verified as the most important features for lane-changing behavior prediction [14]. For the junction-related maneuvers (TL, TR, GS, SS), the Time to Intersection \(TTI\), and longitudinal velocity \(v_{lon}\), \(v_{lat}\) of the target vehicle were chosen [12].  
\(P^{i}_{s^{i}}\) in Equation (1) is a vector to represent the a priori probabilities for the candidate models. These values are weights to balance the possibility of the candidate behaviors in the given scenario:  
\[P^{i}_{s^{i}}=p(M_{j}),M_{j}\in M^{i}_{s^{i}}, \tag{5}\]  
where the summary of these weights are equal to one:  
\[\sum p(M_{j})=1,M_{j}\in M^{i}_{s^{i}}. \tag{6}\]  
\(P^{i}_{s^{i}}\) is defined by drivers' experiences or learned from training data. \(F^{i}_{s^{i}},\ M^{i}_{s^{i}}\), \(P^{i}_{s^{i}}\) are determined by the current scenario \(s^{i}\) of the \(i-\)th vehicle.