Skip to content
Snippets Groups Projects
Commit b672be1b authored by Hu Zhao's avatar Hu Zhao
Browse files

docs: add description of Latin hypercube sampling

parent 49454d49
Branches
No related tags found
No related merge requests found
Latin Hypercube Sampling
========================
Latin hypercube sampling is one type of space-filling sampling method. It is often
used to draw input points for emulator training. The following figure gives a
three-dimensional example.
.. image:: ../_static/latin_hypercube_sampling_sketch.png
:width: 800
:alt: an illustration of Latin hypercube sampling
:align: center
Three random variables :math:`X`, :math:`Y`, and :math:`Z` consist of
a three-dimensional space. If we want to draw :math:`6` samples from this space
using Latin hypercube sampling, we first divide the range of each variable into
:math:`6` equally probable intervals as shown on the left. In each interval,
we pick a value for the corresponding variable. Then we shuffle the picked values
of each variable (e.g. :math:`x_1` to :math:`x_6`) as shown in the middle. Last,
each combination gives us one sample of the three variables as shown on the right.
It should be noted that each sample excludes any other samples from the intervals
that it locates in. This can be straightforwardly extended to draw :math:`M` samples
from :math:`N`-dimensional space consisting of :math:`N` random variables.
LHS Class
---------
......@@ -11,4 +32,9 @@ The :class:`.LHS` class is imported by::
Methods
^^^^^^^
.. autoclass:: psimpy.sampler.latin.LHS
:members: sample
\ No newline at end of file
:members: sample
.. warning:: The :class:`.LHS` class considers each random variable being uniformly
distributed in its range. If this is not the case, one needs to transform picked
samples accordingly.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment