|
Overview
Latin Hypercube Sampling (LHS) is a method of sampling a model input space, usually for obtaining data for training metamodels or for uncertainty analysis. LHS typically requires less samples and converges faster than Monte Carlo Simple Random Sampling (MCSRS) methods when used in uncertainty analysis. By representing each variable as its Cumulative Distribution Function (CDF) (prior distribution) and partitioning the CDF into N regions and taking a single sample from each region, this increases the likelihood that the full range of the posterior distribution is sampled. Once a suitable CDF sample is made, the sample CDF value is inversely mapped back to a parameter value.
Solver SDK Platform - Monte Carlo Simulation. The speed of Standard Monte Carlo with the 'coverage' of Latin Hypercube sampling. Unlike other software, the SDK can find a PSD matrix that leaves your 'desired correlations' among key distributions nearly unchanged.
A requirement for LHS is that each region of the CDF can only be sampled once for each parameter. This is best visualized in a 2D space with the following figure:
As seen in Figure 1, there is only one sample in each row and column in (X,Y) space. Due to the possibility of clustering (LHS sample with points close together) of sample points, a nearest neighbour restriction can be imposed.
Terminology
Prior Distribution – the statistical distribution of the input parameters to a model
Posterior Distribution – the resulting statistical distribution of the model output
Python Implementation
An example implementation of a LHS algorithm is below. This code outputs samples for the standard uniform and standard normal distributions. Each random sample can be converted to parameter values via the following equations:
Converting LHS output from Standard Uniform to Parameter Space
______________________________ | ______________________________ | (1) |
---|
Where 'x' is the parameter value, is the parameter minimum, is the parameter maximum, and is the standard uniform value.
Converting LHS output from Standard Normal to Parameter Space
______________________________ | ______________________________ | (2) |
---|
Where 'x' is the parameter value, is the parameter standard deviation, is the parameter mean value, and is the standard normal value.
Retrieved from 'https://icme.hpc.msstate.edu/mediawiki/index.php?title=Latin_Hypercube_Sampling_(LHS)&oldid=22214'