Skip to content

Enforce Latin Hyper Cube sampler to take on samples from the bounds #586

Answered by OOAmusat
izsahara asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @izsahara,

The method is performing as expected: the LHS algorithm does not place points at the corners of the sample space; it only enforces that all the samples are within the range covered by the original dataset.

If you explicitly require points at the corners of your space, you can take two approaches:

  1. Use uniform sampling. Uniform sampling (with edges=True) ensures that points are placed at the corner of the design space.
  2. Use LHS and then manually add the boundary points: this should be fairly straightforward (with np.concatenate) since the sampling tool returns a numpy array.

Hopefully one of these solutions is be suitable for your case.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@izsahara
Comment options

Answer selected by izsahara
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #580 on November 03, 2021 04:24.