Package BIP :: Package Bayes :: Module lhs
[hide private]
[frames] | no frames]

Module lhs

source code

Functions [hide private]
 
lhsFromSample(sample, siz=100)
Latin Hypercube Sample from a set of values.
source code
 
lhsFromDensity(kde, siz=100)
LHS sampling from a variable's Kernel density estimate.
source code
 
lhs(dist, parms, siz=100, noCorrRestr=False, corrmat=None)
Latin Hypercube sampling of any distribution.
source code
 
rank_restr(nvars=4, smp=100, noCorrRestr=False, Corrmat=None)
Returns the indices for sampling variables with the desired correlation structure.
source code
Function Details [hide private]

lhsFromSample(sample, siz=100)

source code 
Latin Hypercube Sample from a set of values. For univariate distributions only
Parameters:
  • sample - list, tuple of array
  • siz - Number or shape tuple for the output sample

lhsFromDensity(kde, siz=100)

source code 
LHS sampling from a variable's Kernel density estimate.
Parameters:
  • kde - scipy.stats.kde.gaussian_kde object
  • siz - Number or shape tuple for the output sample

lhs(dist, parms, siz=100, noCorrRestr=False, corrmat=None)

source code 
Latin Hypercube sampling of any distribution. dist is is a scipy.stats random number generator such as stats.norm, stats.beta, etc parms is a tuple with the parameters needed for the specified distribution.
Parameters:
  • dist - random number generator from scipy.stats module or a list of them.
  • parms - tuple of parameters as required for dist, or a list of them.
  • siz - number or shape tuple for the output sample

rank_restr(nvars=4, smp=100, noCorrRestr=False, Corrmat=None)

source code 
Returns the indices for sampling variables with the desired correlation structure.
Parameters:
  • nvars - number of variables
  • smp - number of samples
  • noCorrRestr - No correlation restriction if True
  • Corrmat - Correlation matrix. If None, assure uncorrelated samples.