In this method, the samples passed in are not used. samples ( ndarray): A set of samples drawn from within each LHS bin.Method for generating a Latin hypercube design with samples centered in the bins. Methods static centered ( samples, random_state=None, a=None, b=None ) ¶ samples_U01 ( ndarray): The generated LHS samples on the unit hypercube.samples ( ndarray): The generated LHS samples.‘correlate’ - minimizing the correlation between the points.Īdditional arguments to be passed to the method specified by criterion.‘maximin’ - maximizing the minimum distance between points.‘centered’ - points only at the centre.criterion ( str or callable): The criterion for pairing the generating sample points Options:.Therefore, for multi-variate designs the dist_object must be a list of DistributionContinuous1D objects LHS does not generate correlated random variables. List of Distribution objects corresponding to each random variable.Īll distributions in LHS must be independent. Perform Latin hypercube sampling (MCS) of random variables. LHS ( dist_object, nsamples, criterion=None, random_state=None, verbose=False, **kwargs ) ¶ LHS Class Descriptions ¶ class UQpy.SampleMethods. The transform_u01 method has no returns, although it creates and/or appends the samplesU01 attribute of The transform_u01 method is an instance method that perform the transformation on an existing MCS Transform random samples to uniform on the unit hypercube. The run method has no returns, although it creates and/or appends the samples attribute of the MCS If the run method is invoked multiple times, the newly generated samples will be appended to the Times and each time the generated samples are appended to the existing samples. The run method of the MCS class can be invoked many The run method directly to generate samples. Provided, the run method is automatically called when the MCS object is defined. The run method is the function that performs random sampling in the MCS class. Methods run ( nsamples, random_state=None ) ¶Įxecute the random sampling in the MCS class. This attribute exists only if the transform_u01 method is invoked by the user. Generated samples transformed to the unit hypercube. Samples is a list with len(samples)=nsamples and len(samples) = len(dist_object). If a list of mixed DistributionContinuous1D and DistributionContinuousND objects is provided then If a DistributionContinuousND object is provided for dist_object then samples is an array with If a DistributionContinuous1D object is provided for dist_object then samples is an array with Ndarray with samples.shape=(nsamples, len(dist_object)). If a list of DistributionContinuous1D objects is provided for dist_object, then samples is an Otherwise, theĪ boolean declaring whether to write text to the terminal. If an integer is provided, this sets the seed for an object of. Random seed used to initialize the pseudo-random number generator. random_state (None or int or object):.MCS object is created but samples are not generated. The run method is automatically called if nsamples is provided. Number of samples to be drawn from each distribution. Must be an object (or a list of objects) of the Probability distribution of each random variable. dist_object ((list of) Distribution object(s)):.Perform Monte Carlo sampling (MCS) of random variables. MCS ( dist_object, nsamples=None, random_state=None, verbose=False ) ¶ The properties of the method are highlighted for several very high-dimensional problems, demonstrating the method has the distinct benefit of rapid convergence for transformations of all kinds.MCS Class Descriptions ¶ class UQpy.SampleMethods. This causes statistical estimates to converge at rates that are equal to or better than HLHS while affording maximal flexibility in sample size extension (one-at-a-time or n-at-a-time sampling are possible) that does not exist in HLHS-which grows the sample size exponentially. The intermediate sample designs are then produced using the refined stratified sampling method. The method works by hierarchically creating sample designs that are both Latin and stratified. The method combines the benefits of the two leading approaches, hierarchical Latin hypercube sampling (HLHS) and refined stratified sampling, to produce a method that significantly reduces the variance of statistical estimators for very high-dimensional problems. A robust sequential sampling method, refined latinized stratified sampling, for simulation-based uncertainty quantification and reliability analysis is proposed.