# Scenario Optimisation and Sensitivity Analysis for Safe Automated Driving Using Gaussian Processes
## 4 Sensitivity Analysis
### Emulators-Based Sensitivity Analysis  
In principle, if the function of interest, \(f(\mathbf{x})\) was adequately simple, the sensitivity measures, discussed in Section 4.1 and Appendix A, could be computed in an analytical manner. As the function of interest representing an AV system/scenario become more complex, which is the case for this paper, these SA measures cannot be analytically evaluated, and thus a computationally more efficient and robust model is required to compute these measures discussed in Section 4.1. If \(f(\mathbf{x})\) is computationally cheap enough and can be quickly evaluated for a large number of different inputs, standard MC methods would be sufficient to efficiently evaluate the SA measures described in Section 4.1. The MC-based computation techniques proposed in References [33, 34, 40] demand considerable (thousands to millions) function evaluations. Thus, these methods are impractical for a computationally expensive function, such as the vehicle simulation at hand. In order to tackle this computational complexity, the methodology proposed in References [36, 37] was used and further developed based on the Bayesian paradigm. A Bayesian approach lets us estimate all the quantities that are required to examine the SA in modelling and predicting the outcomes of concrete scenarios (derived of the two addressed logical scenarios), amounting to a global sensitivity analysis. Until we actually run a concrete scenario in simulation, the functional relationship \(f(\cdot)\), between the scenario outcome and other input parameters are unknown for any particular input configuration \(\mathbf{X}\). Within the Bayesian setting, it is therefore plausible to specify a prior distribution for the unknown input parameters, \(\mathbf{X}\). Please note that placing prior distribution on the input parameters would provide a useful operational meaning to the SA measures of interest in this paper, and also provide a way to quantify the uncertainty on the input parameters as described in Reference [37]. The elicited prior can then be updated to the posterior distribution via the Bayesian paradigm in the light of the data, \(\mathcal{D}=\{(\mathbf{x}_{i},y_{i}):y_{i}=f(\mathbf{x}_{i}),i=1,\ldots,n\}\), generated via simulation from a set of known concrete scenarios, as described in Section 5.1. The resulting posterior distribution for \(f(\cdot)\) can then be used to make formal Bayesian inferences about the SA measures discussed in the previous section. Although there is still uncertainty about the exact value of the function \(f(\cdot)\) at input values where it was not evaluated, we can further reduce uncertainty when the correlation of function values from one point to another is taken into account. This is done by taking the expected value of the obtained posterior distribution as a point estimate for \(f(\cdot)\). Furthermore, this means that there are two different distributions being used in the SA computation: firstly, the distribution \(G\) representing the uncertainty in the input parameters \(\mathbf{x}\), which is then propagated to the output values through the function \(f(\cdot)\); and secondly, the posterior distribution on \(f(\cdot)\) which is very necessary for the efficient computation of the SA measures. The uncertainty on the model output (or the scenario output) can be reduced as much as required by evaluating the function \(f(\cdot)\) through many simulation runs and thus increasing the training points. The next section describes the probabilistic approach for computing the SA measures using the Gaussian Process emulator. Inference for Variance-Based Sensitivity Analysis Measures  
This section will outline how the GP posterior distribution, which we derived in Section 3, can be used to estimate the sensitivity measures introduced in Section 4.1 and Appendix A.