twinlab.Emulator.design#
- Emulator.design(priors, num_points, params=<twinlab.params.DesignParams object>, verbose=False)[source]#
Generate an initial design space for an emulator.
The method is used to generate an initial design for evaluating a set of experiments, emulator, or simulation. This is useful if data has not yet been collected and a user wants to generate an initial design space to train an emulator. Optimal space-filling methods can be used to generate an initial design space that are significantly better than either random or grid sampling. If data has already been acquired then an initial emulator can be trained using
Emulator.train()
and new sampling locations can be recommended usingEmulator.recommend()
.- Parameters:
priors (list[Prior]) – A list of
Prior
objects that define the prior distributions for each input. These are independent one-dimensional probability distributions for each parameter.num_points (int) – The number of points to sample in designing the initial space.
params (twinlab.DesignParams, optional) – A parameter configuration that contains all of the optional initial-design parameters.
- Return type:
Example
emulator = tl.Emulator("emulator_id") my_priors = [ tl.Prior("x1", tl.distributions.Uniform(0, 12)), tl.Prior("x2", tl.distributions.Uniform(0, 0.5)), tl.Prior("x3 ", tl.distributions.Uniform(0, 10)), ] initial_design = emulator.design(my_priors, 10)