# Estimation of Distribution Algorithms with Fuzzy Sampling for Stochastic Programming Problems
## 3 Estimation of Distribution Algorithms for Simulation-Based Optimization
### Sampling Techniques
#### 3.1.2 Fuzzy Sampling  
The basic study of possible definitions of a fuzzy number is proposed in [60]. In the case of a valuation (Boolean) set, the membership of any element \(x\in X\) to the subset \(A(\subseteq X)\) is given by  
\[\mu_{A}(x)=\left\{ \begin{array}{ll}1&\text{iff }\,x\in A,\\ 0&\text{iff }\,x\
ot\in A.\end{array} \right.\]  
In the fuzzy set, the membership values fall in the real interval [0,1], as in [34], and \(\mu_{A}\) measures the degree of membership of an element \(x\) in \(X\)--i.e., \(\mu_{A}(x):X\rightarrow[0,1]\). Many definitions have been introduced for the membership function \(\mu\) depending on the problem's properties [39; 61]. The average sampling in Algorithm 5 works well whenever the sample size \(N\) is sufficiently large. However, it fails to estimate the objective function values with small sample sizes, especially in the early stages of the search process, and promising solutions may be lost. Because of this, we proposed a new sampling technique based on fuzzy sets for the better estimation of function values even with relatively small sample sizes. Specifically, if our target is to estimate \(\hat{f}(x)\) using a sample of size \(N\); \(\widehat{g}(x,\omega_{1}),\ldots,\widehat{g}(x,\omega_{N})\). The proposed fuzzy sampling technique defines that estimation as  
\[\hat{f}(x)=\frac{\mu_{1}\widehat{g}(x,\omega_{1})+\ldots+\mu_{N}\widehat{g}(x, \omega_{N})}{\sum_{i=1}^{N}\mu_{i}}, \tag{7}\]  
where \(\mu_{i}\) is the associated membership function for every simulated value \(\widehat{g}(x,\omega_{i})\), and \(i=1,\ldots,N\). In order to compute the membership values, three featured sample values are stored. The first two are the maximum value \(\widehat{g}_{\max}\) and the minimum value \(\widehat{g}_{\min}\) among the current sample values; \(\widehat{g}(x,\omega_{1}),\ldots,\widehat{g}(x,\omega_{N})\). The last feature value is called the guide value \(\widehat{g}_{G}\) and is selected within the interval \([\widehat{g}_{\min},\widehat{g}_{\max}]\). Then, the membership values \(\mu_{i},i=1.\ldots,N\), can be defined as in the following formula:  
\[\mu_{i}= \begin{cases}1-\frac{\widehat{g}_{G}-\widehat{g}_{i}}{\rho},&\widehat{ g}_{G}-\rho\leq\widehat{g}_{i}\leq\widehat{g}_{G},\\ 1-\frac{\widehat{g}_{i}-\widehat{g}_{G}}{\rho},&\widehat{g}_{G}<\widehat{g}_{i} \leq\widehat{g}_{G}+\rho,\\ 0,&\widehat{g}_{i}\leq\widehat{g}_{G}-\rho,\,\,\text{ or }\,\,\widehat{g}_{i}\geq \widehat{g}_{G}+\rho,\end{cases}  \tag{8}\]  
where \(\rho\) is a radius value set based on the sample size \(N\). The calculation of the membership values takes into consideration two main points:  
* \(\mu_{i}\) is set to take values between 0 and 1: its value is near to 1 when the sample values are close to \(\widehat{g}_{G}\), and it is reduced and reaches 0 when it is far from this value at the end of the radius \(\rho\), which is initialized to be \(\ll(\widehat{g}_{\max}-\widehat{g}_{\min})\) if the sample size is small;
* While the sample size \(N\) is increased during the search process, the values of \(\mu_{i}\) become close to 1 since the radius \(\rho\) is expanded to cover the whole interval \([\widehat{g}_{\min},\widehat{g}_{\max}]\). Algorithm 6 contains the main steps of the proposed Fuzzy Sampling Random Search (FSRS) method to deal with the objective function noise. ```
1: Generate a point \(x_{0}\in X\) at random; set an initial sample size \(N_{0}\), and \(k:=0\). 2: Generate a point \(y\in X\) at random. 3: Generate a sample \(\omega_{1}^{k},\ldots,\omega_{N_{k}}^{k}\). 4:for\(i=1,\ldots,N_{k}\), do
5: Compute \(\mathfrak{F}(x_{k},\omega_{i}^{k})\), and \(\mathfrak{F}(y,\omega_{i}^{k})\). 6:endfor
7: Sort the sample values to set \(\mathfrak{F}_{\max}\) and \(\mathfrak{F}_{\min}\). 8: Set \(\rho=\alpha(\mathfrak{F}_{\max}-\mathfrak{F}_{\min})\), where \(\alpha\) is a control parameter depends on \(N_{k}\). 9: Choose a guide value \(\mathfrak{F}_{G}\in[\mathfrak{F}_{\min},\mathfrak{F}_{\max}]\). 10:for\(i=1,\ldots,N_{k}\), do
11: Compute \(\mu_{i}\) according to Equation (8).