In this project, I implement a Gaussian Naive Bayes classifier to predict the behavior of vehicles on a highway. In the image below you can see the behaviors you'll be looking for on a 3 lane highway (with lanes of 4 meter width). The dots represent the d (y axis) and s (x axis) coordinates of vehicles as they either.
- change lanes left (shown in blue)
- keep lane (shown in black)
- change lanes right (shown in red)
The Naive Bayes Classifier predicts which of these three maneuvers a vehicle is engaged in given a single coordinate (sampled from the trajectories shown below). Four features are given: s, d, s_dot, d_dot.
- Compute the conditional probabilities for each feature/label combination. For a feature x and label C with mean μ and standard deviation σ :
- Use the conditional probabilities in a Naive Bayes Classifier.
The main program can be built and run by doing the following from the project top directory.
- mkdir build
- cd build
- cmake ..
- make
- ./NBC