sampling

This module contains multiple generation functions for sampling a domain. All use (and return) a random stream in persis_info, given by the allocation function.

sampling.latin_hypercube_sample(H, persis_info, gen_specs, _)

Generates gen_specs['user']['gen_batch_size'] points in a Latin hypercube sample over the domain defined by gen_specs['user']['ub'] and gen_specs['user']['lb'].

See also

test_1d_sampling.py # noqa

sampling.uniform_random_sample(H, persis_info, gen_specs, _)

Generates gen_specs['user']['gen_batch_size'] points uniformly over the domain defined by gen_specs['user']['ub'] and gen_specs['user']['lb'].

See also

test_uniform_sampling.py # noqa

sampling.uniform_random_sample_obj_components(H, persis_info, gen_specs, _)

Generates points uniformly over the domain defined by gen_specs['user']['ub'] and gen_specs['user']['lb'] but requests each obj_component be evaluated separately.

sampling.uniform_random_sample_with_different_nodes_and_ranks(H, persis_info, gen_specs, _)

Generates points uniformly over the domain defined by gen_specs['user']['ub'] and gen_specs['user']['lb']. Also randomly requests a different number_of_nodes and ranks_per_node to be used in the evaluation of the generated point.

persistent_uniform_sampling

persistent_uniform_sampling.persistent_uniform(H, persis_info, gen_specs, libE_info)

This generation function always enters into persistent mode and returns gen_specs['gen_batch_size'] uniformly sampled points the first time it is called. Afterwards, it returns the number of points given. This can be used in either a batch or asynchronous mode by adjusting the allocation function.