# Projection Pursuit Multivariate Sampling of Parameter Uncertainty
## 2 Sampling Techniques
### Latin Hypercube Sampling  
CLHS, which was proposed by [PERSON] et al. [8], partitions each CDF of the sample of size \((n)\) from \(k\) variables into \(n\) contiguous intervals. An independent random number from the uniform distribution \(p_{i}\in[0,1]\), \(i=1,\dots,n\) is then selected from each interval, resulting in \(n\) random numbers for each of the \(k\) variables. The aforementioned \(n\) random numbers are then randomly combined without replacements to generate the ordered quantiles. For example, consider that the sampling space is two-dimensional \((k=2)\) and the required number of realizations is five \((n=5)\). The elements of the following matrix \(\mathbf{P}\) consist of the random numbers \([0,1]\) selected from each interval of the CDFs of two random variables. The matrix \(\mathbf{R}\) contains the random permutations. \[\mathbf{P}= \begin{bmatrix}0.53&0.53\\ 0.51&0.71\\ 0.26&0.75\\ 0.88&0.15\\ 0.67&0.64\end{bmatrix} \mathbf{R}= \begin{bmatrix}4&5\\ 2&4\\ 3&1\\ 5&2\\ 1&3\end{bmatrix} \]  
The ordered quantiles are then generated by  
\[\mathbf{H}=\frac{1}{n}(\mathbf{R}-\mathbf{P}), \tag{3}\]  
The pairwise elements of the following matrix \(\mathbf{H}\) indicate a stratigraphic sampling design, that is, one realization from each row and each column is generated from the sampling space, as shown in Figure 2a. \[\mathbf{H}= \begin{bmatrix}0.69&0.89\\ 0.30&0.66\\ 0.55&0.05\\ 0.82&0.37\\ 0.06&0.47\end{bmatrix} \]Each element of the matrix \(\mathbf{H}\) can then be mapped according to a target CDF as \(x_{ij}=F^{-1}(h_{ij});\ i=1,\ldots,n=5\) and \(j=1,\ldots,k=2\), as shown in Figure 2b. In the case of correlated random variables, the linear dependency can be added to the realizations using the Cholesky decomposition (Equation (1)). As for maximin LHS, which is based on the distance-based criterion proposed by [PERSON] et al. [21], the realizations are generated by CLHS so that the minimum Euclidean distance between all of the realizations is maximized. Let \(w\) be the variable indicating the minimum distance between all of the realizations. The optimization problem can then be defined by  
\[ \begin{split}\text{maximize}& w\\ \text{subject to}& w\leq\big{\|}\mathbf{h}_{i}- \mathbf{h}_{j}\big{\|},\ \ (i,j)\in\mathcal{J}\\ &\mathbf{h}_{i}\in\mathcal{F},\ i=1,\ldots,n,\end{split}  \tag{4}\]  
where \(\mathcal{J}=\{(i,j)\ |\ 1\leq i<j\leq n\}\), \(\ \mathbf{h}=(\mathbf{h}_{1}^{\mathsf{T}},\ldots,\mathbf{h}_{n}^{\mathsf{T}})\) and \(\mathbf{h}_{i}\) is the vector of coordinates for realization \(i\) in \(\mathbb{R}^{d}\) with \(d=2\). Considering a large number of iterations, the realizations tend to be separated from each other, allowing for a more uniform space coverage. The algorithm steps of the maximin LHS are given as follows:  
1. Set the initial value of the minimum Euclidean distance to zero, \(w_{initial}=0\). 2. Generate a sampling design \(D_{l},l=1,\ldots,L\) using CLHS. 3. Calculate the minimum Euclidean distance \(w_{l}\) from the CLHS design \(D_{l}\) generated in step 2. 4. If \(w_{l}>w_{initial}\), with \(l=1,\ldots,L\), set the new initial minimum Euclidean distance value as \(w_{l}\), that is, \(w_{initial}=w_{l}\). 5. Return to step 2 and repeat the steps \(L\) times. 6. End. The algorithm steps given above are used to generate a maximin LHS design which takes into account a multidimensional uniformity through the maximization of the minimum Euclidean distance calculated from the predefined number of CLHS designs. In step 1, the initial value of the minimum Euclidean distance is equal to zero. In step 2, a CLHS design is generated. In step 3, the minimum Euclidean distance is calculated from that CLHS design, and step 4 checks if the minimum Euclidean distance calculated from the CLHS design is greater than the initial value of the Euclidean distance, which is zero. If so, the calculated minimum Euclidean distance is set as the new initial value. In step 5, the iteration is carried out a predefined number of times, and in step 6, the algorithm completes all of the iterations.