swiftemulator.design.latin module
Generates a latin hypercube ModelValues container given
the ModelSpecification. Uses :mod:pyDOE.
- swiftemulator.design.latin.create_hypercube(model_specification: ModelSpecification, number_of_samples: int, correlation_retries: Optional[int] = 32, prefix_unique_id: Optional[str] = None) ModelParameters[source]
Creates a Latin Hypercube model design.
- Parameters:
model_specification (ModelSpecification) – Model specification for which to create a latin hypercube from.
number_of_samples (int) – The number of samples to draw; this will be the number of input simulations that you wish to create.
correlation_retries (int, optional) – Number of times to re-try creating a random hypercube, to minimize the correlation coefficient even further. Default: 32.
prefix_unique_id (str, optional) – An optional prefix for the newly generated unique IDs. Defaults to no prefix.
- Returns:
model_parameters – A model values container with the prepared latin hypercube. Contains methods to visualise the output hypercube.
- Return type:
Notes
Uses :mod:
pyDOE’slhs()function, with themaximinmethod.