Standard experimental designs

epyc comes with a small set of experimental designs: we intend to add more to reflect experiences in doing a wider set of experiments.

FactorialDesign: All combinations of of parameters

class epyc.FactorialDesign

A simple factorial design.

In a factorial design, an experiment is perform for every combination of a lab’s parameters. Essentially this forms the cross-product of all parameter values, returned as a list of dicts. If the lab was set up with the following parameters:

lab['a'] = [1, 2]
lab['b'] = [3, 4]

then this design would generate a space consisting of four points:

  • {a=1, b=3}
  • {a=1, b=4}
  • {a=2, b=3}
  • {a=2, b=4}

at which it would run the given experiment. The experiments are returned in random order.

FactorialDesign.experiments(e: epyc.experiment.Experiment, ps: Dict[str, Any]) → List[Tuple[epyc.experiment.Experiment, Dict[str, Any]]]

Form the cross-product of all parameters.

Parameters:ps – a dict of parameter values
Returns:an experimental configuration

PointwiseDesign: Corresponding parameters combined

class epyc.PointwiseDesign

A design whose space is the sequence of values taken from the range of each parameter. If the lab was set up with the following parameters:

lab['a'] = [1, 2]
lab['b'] = [3, 4]

then this design would generate a space consisting of two points:

  • {a=1, b=3}
  • {a=2, b=4}

This design requires that all parameters have the same length of range: if a parameter is a singleton (only a single value), this will be extended across all the space. So if the parameters were:

lab['a'] = 1
lab['b'] = [3, 4]

the design would generate:

  • {a=1, b=3}
  • {a=1, b=4}
PointwiseDesign.experiments(e: epyc.experiment.Experiment, ps: Dict[str, Any]) → List[Tuple[epyc.experiment.Experiment, Dict[str, Any]]]

Form experimental points from corresponding values in the parameter ranges, extending any singletons.

Parameters:ps – a dict of parameter values
Returns:an experimental configuration