## 2 Related Work
The definitions of \(d,\ s,\) and \(f\) are for a scenario where the desired outcome is an improvement of the current alternative \((F(\overline{x})>F(\overline{c}))\). For the opposite scenario, i.e., if one would like to decrease the output of the decision model, \(d\) should be modified to consider only the attributes for which the alternative has lower values compared to the current alternative \(\overline{c}\). Additionally, in that scenario, \(f\) should be modified to return the similarity when \(F(x)<F(\overline{c})\) and \(0\) otherwise. Such a scenario can be used to explore the stability of the current alternative \(\overline{c}\). [PERSON] theorem describes a way of calculating the conditional probability of an event:  
\[P(A|B)=\frac{P(B|A)*P(A)}{P(B)}. \tag{6}\]  
This equation can be simplified by removing the normalizing value of \(P(B)\) and describing the conditional probability as a proportional quantity \(((A|B)\propto P(B|A)*P(A))\), where \(P(A|B)\) is the posterior probability, \(P(B|A)\) is the likelihood, and \(P(A)\) is the prior probability (therefore, _posterior_\(\propto\)_likelihood_\(*\)_prior_). Following this idea, we can generate specific alternatives and evaluate them using the objective function \(f\). By iteratively generating such alternatives, learning data \(D\) can be created: \(D=\{(\overline{x_{1}},f(\overline{x_{1}})),(\ \overline{x_{2}},f(\overline{x_{2}})),\ldots,( \overline{x_{k}},f(\overline{x_{k}}))\}\), where \(\overline{x_{1}},\overline{x_{2}},\ldots,\overline{x_{k}}\) are \(k\) vectors (alternatives), each of them consisting of \(n\) attribute values (e.g., \(\overline{x_{k}}=(x_{k1},\ x_{k2},\ldots,\ x_{kn})\)), and \(f(\overline{x_{k}})\) is the objective function that returns the outcome for each alternative \(\overline{x_{k}}\). These data define the prior probability for the specific problem. The likelihood function is defined as the probability of observing the data given the objective function \(f\ P(D|f)\). This likelihood function will change as more alternatives are generated:  
\[P(f|D)=P(D|f)*P(f) \tag{7}\]  
where \(P(f|D)\) represents the updated expectations about the unknown objective function [27]. This step can also be interpreted as estimating the objective function with a surrogate function. **A surrogate function** is a Bayesian approximation of the objective function that can be sampled efficiently. The surrogate function \(P(f|D)\) provides an estimate of the objective function by summarizing the conditional probability of the objective function \(f\), given the learning data \(D\). Usually, the surrogate function is learned using regression algorithms, with the \(D\) representing the input and the objective value (the output of the objective function) representing the output to the model. This is often modeled using a Gaussian process (GP) [28; 29; 30] because regression models based on the GP do not output just a single predicted value, but rather they output the whole probability distribution. By exploiting the mean and the standard deviation of the output distribution, one can balance the tradeoff of exploiting (higher mean) and exploring (higher standard deviation). In Bayesian optimization, that output distribution also represents the posterior distribution. Since GP models are computationally expensive with the complexity of \(O(n^{3})\), ensemble models such as random forest (RF) can also be used [26; 28; 31; 32]. In that case, the mean and the variance are calculated based on the predictions of all base models available in the ensemble. BAG-DSM uses RF with 1000 decision trees as base models. The surrogate model (\(SM\)) is used to estimate the objective value of a large number of candidate alternatives from the search space. From those estimations, one or more candidates can be selected and evaluated with the objective function. The selection process also involves the use of the posterior (the output of the surrogate model) in a function known as the acquisition function.