lkpautos.blogg.se

Matlab latin hypercube sampling
Matlab latin hypercube sampling








Included in all copies or substantial portions of the Software. The above copyright notice and this permission notice shall be Software is furnished to do so, subject to the following Sell copies of the Software, and to permit persons to whom the Restriction, including without limitation the rights to use,Ĭopy, modify, merge, publish, distribute, sublicense, and/or Obtaining a copy of this software and associated documentationįiles (the "Software"), to deal in the Software without Permission is hereby granted, free of charge, to any person # Array space is filled using strata index exclusion # Once array space is filled, a random value is generated within each cell # Parameter space is mapped to an array index space using integer truncation # Script for generating standard uniform/standard normal Latin-Hypercube samples Where "x" is the parameter value, is the parameter standard deviation, is the parameter mean value, and is the standard normal value. Where "x" is the parameter value, is the parameter minimum, is the parameter maximum, and is the standard uniform value.Ĭonverting LHS output from Standard Normal to Parameter Space _ Each random sample can be converted to parameter values via the following equations:Ĭonverting LHS output from Standard Uniform to Parameter Space _ This code outputs samples for the standard uniform and standard normal distributions. Posterior Distribution – the resulting statistical distribution of the model outputĪn example implementation of a LHS algorithm is below. Prior Distribution – the statistical distribution of the input parameters to a model

matlab latin hypercube sampling

Due to the possibility of clustering (LHS sample with points close together) of sample points, a nearest neighbour restriction can be imposed. This is best visualized in a 2D space with the following figure:Īs seen in Figure 1, there is only one sample in each row and column in (X,Y) space. Once a suitable CDF sample is made, the sample CDF value is inversely mapped back to a parameter value.Ī requirement for LHS is that each region of the CDF can only be sampled once for each parameter.

matlab latin hypercube sampling

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. LHS typically requires less samples and converges faster than Monte Carlo Simple Random Sampling (MCSRS) methods when used in uncertainty analysis. Latin Hypercube Sampling (LHS) is a method of sampling a model input space, usually for obtaining data for training metamodels or for uncertainty analysis. 3.2 Converting LHS output from Standard Normal to Parameter Space.3.1 Converting LHS output from Standard Uniform to Parameter Space.










Matlab latin hypercube sampling