# Active Learning Strategy for Surrogate-Based Quantile Estimation of Field Function
## 3 Active Learning for Surrogate-Based Stochastic Process Quantile Estimation
### Infill Criterion  
The infill criterion for active learning is used to quantify the possibility of improvement of the quantile estimation given by a candidate sample to be added to the current dataset. The proposed infill criterion determines the confidence area associated to a quantile \(q_{\eta}(\cdot)\) accounting for the uncertainty in the Gaussian processes involved in the KL decomposition. The proposed infill criterion calculation is summarized in Algorithm 1. Let consider a potential candidate \(\tilde{\mathbf{u}}\) to be added to the current dataset \(\mathcal{U}_{M}\). For each GP \(\xi_{k}(\cdot)\) involved in the KL decomposition, the mean GP prediction \(\hat{\xi}_{k}^{*}(\tilde{\mathbf{u}})\) is used to virtually extend the current dataset for the GPs. Therefore, the new input virtual dataset is \(\hat{\mathcal{U}}_{M+1}=\{\mathbf{u}_{1},\dots,\mathbf{u}_{M},\tilde{\mathbf{ u}}\}\) and the GP output dataset is \(\hat{\mathcal{Y}}_{k_{M+1}}=\{y_{1}=\xi_{k}(\mathbf{u}_{1}),\dots,y_{M}=\xi_{ k}(\mathbf{u}_{M}),\)\(y_{M+1}=\frac{\delta}{\Sigma_{k}}(\tilde{\mathbf{u}})\}\). Then, based on this dataset, the new \"virtual\" GPs \(\xi_{k}^{*}(\cdot)\) are trained to update the hyperparameters \(\mathbf{\Theta}\), \(m\) and \(\sigma\). Therefore, it is possible to define the resulting surrogate model for the stochastic process:  
\[\hat{\mathbf{X}}(t,\mathbf{u})=\hat{\mu}(t)+\sum_{k=1}^{N_{KL}}\sqrt{\hat{ \lambda}_{k}}\xi_{k}^{*}(\mathbf{u})\hat{\mathcal{L}}_{k}(t) \tag{22}\]  
To estimate the influence of the virtual addition of the candidate sample \(\tilde{\mathbf{u}}\) into the dataset, \(N_{GP}\) Gaussian process trajectories are generated \(\left\{\hat{\xi}_{k}^{*(1)}(\cdot),\dots,\ \hat{\xi}_{k}^{*(s)}(\cdot),\dots,\hat{\xi}_{k}^{*(N_{GP})}( \cdot)\right\}\) for each GP present in the KL decomposition. Then, \(N_{GP}\) quantiles of \(\hat{\mathbf{X}}(t,\mathbf{U})\) are estimated using:  
\[\hat{\mathbf{X}}^{(s)}(t,\mathbf{U})=\hat{\mu}(t)+\sum_{k=1}^{N_{KL}}\sqrt{\hat {\lambda}_{k}}\xi_{k}^{*(s)}(\mathbf{u})\hat{\mathcal{L}}_{k}(t) \tag{23}\]and with a Monte-Carlo sampling (as explained in the previous section):  
\[\dot{q}_{\eta}^{(s)}(t)=\dot{\Phi}_{\widehat{\mathbf{x}}^{(s)}(t,\mathbf{U})}^{-1} (\eta) \tag{24}\]  
for \(s\in\{1,\ldots,N_{GP}\}\). It results \(N_{GP}\) estimates of the quantile \(\mathbb{Q}_{N_{GP}}=\left\{\dot{q}_{\eta}^{(1)}(t),\ldots,\dot{q}_{\eta}^{(s)}( t),\right.\)\(\left.\ldots,\dot{q}_{\eta}^{(N_{GP})}(t)\right\}\) which may be used to define a confidence area associated to the quantile:  
\[A(\tilde{\mathbf{u}})=\int\Bigl{(}\overline{\dot{q}}_{\eta}(t)-\underline{ \dot{q}}_{\eta}(t)\Bigr{)}\mathrm{d}t \tag{25}\]  
where \(\overline{\dot{q}}_{\eta}(t)\) and \(\underline{\dot{q}}_{\eta}(t)\) are upper and lower bounds on the quantile estimates in the set \(\mathbb{Q}_{N_{GP}}\), for instance defined by a quantile of level \(\beta\) and \(1-\beta\). The confidence area is computed over the mono-dimensional mesh domain \(\mathcal{T}_{n_{p}}\) (Figure 2). This confidence area \(A(\tilde{\mathbf{u}})\) translates the uncertainty in the quantile estimate due to the uncertainty in the Gaussian process given by the virtual current dataset which includes the candidate sample \(\tilde{\mathbf{u}}\). It requires to evaluate \(N_{q}\times N_{GP}\) times the surrogate model \(\hat{\mathbf{X}}(t,\mathbf{U})\) corresponding to the number of samples in the Monte-Carlo simulation for empirical quantile estimate times the number of GP trajectories sampled. In order to improve the accuracy of the quantile estimate, a relevant candidate sample \(\tilde{\mathbf{u}}\) to be added to the current dataset is a sample that will reduce the uncertainty in the quantile estimate therefore that will reduce the confidence interval \(A(\cdot)\).