LHS
Bases: BaseSampling
Latin Hypercube Sampling (LHS) class.
This class performs the LHS algorithm for some input data.
Attributes: |
|
---|
Methods:
Name | Description |
---|---|
generate |
Generate LHS samples. |
Notes
- This class is designed to perform the LHS algorithm.
Examples:
>>> from bluemath_tk.datamining.lhs import LHS
>>> dimensions_names = ['CM', 'SS', 'Qb']
>>> lower_bounds = [0.5, -0.2, 1]
>>> upper_bounds = [5.3, 1.5, 200]
>>> lhs = LHS(num_dimensions=3, seed=0)
>>> lhs_sampled_df = lhs.generate(
... dimensions_names=dimensions_names,
... lower_bounds=lower_bounds,
... upper_bounds=upper_bounds,
... num_samples=100,
... )
__init__(num_dimensions, seed=1)
Initializes the LHS class.
Parameters: |
|
---|
Raises: |
|
---|
generate(dimensions_names, lower_bounds, upper_bounds, num_samples)
Generate LHS samples.
Parameters: |
|
---|
Returns: |
|
---|
LHSError
Bases: Exception
Custom exception for LHS class.