Double Gaussian Runner
Example runner that implements a simple synthetic function for testing and demonstration purposes.
SyntheticDoubleGaussianRunner
SyntheticDoubleGaussianRunner(*args, **kwargs)
Bases: Runner
A simple Runner that implements a double Gaussian with a background slope.
kwargs
dimensions (int): Number of dimensions (1 or 2). model_parameters - vector of model parameters [a, g11, g12, g13, g21, g22, g23]: y = ax + g11np.exp(-(x - g13)2/g12) + g21*np.exp(-(x - g23)2/g22)
Returns a dictionary of containing the output and True for success. Future developments can include synthetic failure implementations.
Source code in src/enchanted_surrogates/runners/synthetic_double_gaussian_runner.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |
single_code_run
single_code_run(run_dir, params=None)
Run the synthetic function with given parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_dir
|
str
|
Directory to save outputs. |
required |
params
|
dict
|
Dictionary of parameter values. For 1D: {'x': value} For 2D: {'x': value, 'y': value} |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the output and success status. |
Source code in src/enchanted_surrogates/runners/synthetic_double_gaussian_runner.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | |