evox.operators.sampling.latin_hypercube
¶
Module Contents¶
Functions¶
Generate Latin Hypercube samples in the unit hypercube. |
|
Generate Latin Hypercube samples in the given hypercube defined by |
API¶
- evox.operators.sampling.latin_hypercube.latin_hypercube_sampling_standard(n: int, d: int, device: torch.device, smooth: bool = True)[source]¶
Generate Latin Hypercube samples in the unit hypercube.
- Parameters:
n – The number of sample points to generate.
d – The dimensionality of the samples.
device – The device on which to generate the samples.
smooth – Whether to generate sample in random positions in the cells or not. Defaults to True.
- Returns:
A tensor of shape (n, d), where each row represents a sample point and each column represents a dimension.
- evox.operators.sampling.latin_hypercube.latin_hypercube_sampling(n: int, lb: torch.Tensor, ub: torch.Tensor, smooth: bool = True)[source]¶
Generate Latin Hypercube samples in the given hypercube defined by
lb
andub
.- Parameters:
n – The number of sample points to generate.
lb – The lower bounds of the hypercube. Must be a 1D tensor of size
d
with same shape, dtype, and device asub
.ub – The upper bounds of the hypercube. Must be a 1D tensor of size
d
with same shape, dtype, and device aslb
.smooth – Whether to generate sample in random positions in the cells or not. Defaults to True.
- Returns:
A tensor of shape (n, d), where each row represents a sample point and each column represents a dimension whose device is the same as
lb
andub
.