Created on 16 aug. 2011
This module contains various classes that can be used for specifying different types of samplers. These different samplers implement basic sampling techniques including Full Factorial sampling, Latin Hypercube sampling, and Monte Carlo sampling.
Code author: jhkwakkel <j.h.kwakkel (at) tudelft (dot) nl>
Bases: object
base class from which different samplers can be derived
types of distributions known by the sampler. by default it knows the uniform continuous distribution for sampling floats, and the uniform discrete distribution for sampling integers.
method for sampling a number of samples from a particular distribution. The various samplers differ with respect to their implementation of this method.
Parameters: |
|
---|
The main method of :class: ~sampler.Sampler and its children. This will call the sample method for each of the uncertainties and return the resulting designs.
Parameters: |
|
---|---|
Return type: | tuple with the designs as the first entry and the names of the uncertainties as the second entry. |
Bases: samplers.Sampler
generates a Latin Hypercube sample for each of the uncertainties in case of categorical uncertainties, it handles the transform as well
generate a Latin Hypercupe Sample.
Parameters: |
|
---|
Latin Hypercube sampling of any distribution.
modified from code found online.
Parameters: |
|
---|
Bases: samplers.Sampler
generates a Monte Carlo sample for each of the uncertainties. In case of a Categorical Uncertainty it also handles the transform
generate a Monte Carlo Sample.
Parameters: |
|
---|
Bases: samplers.Sampler
generates a full factorial sample. If the uncertainty is non categorical, resolution is used to set the samples. If the uncertainty is an integer, their wont be duplicates in the sample. So, samples is equal to or smaller then the specified resolution
max number of designs that is allowed (Default 50.000).
This method provides an alternative implementation to the default implementation provided by Sampler. This version returns a full factorial design across the uncertainties.
Parameters: |
|
---|---|
Return type: | tuple with the designs as the first entry and the names of the uncertainties as the second entry. |
Note
The current implementation has a hard coded limit to the number of designs possible. This is set to 50.000 designs. If one want to go beyond this, set self.max_designs to a higher value.