simulator#
Simulate virtual experimental data
Classes
|
Simulator class for generating in-silico responses to requested experiments. |
- class obsidian.experiment.simulator.Simulator(X_space: ParamSpace, response_function: Callable, name: str | list[str] = 'Response', eps: float | list[float] = 0.0, **kwargs)[source]#
Bases:
object
Simulator class for generating in-silico responses to requested experiments.
This class provides functionality to simulate responses to a set of experiments based on a given response function. The simulated responses can be subject to error, which is controlled by the eps parameter.
- X_space#
The ParamSpace object representing the allowable space for optimization.
- Type:
- response_function#
The callable function used to convert experiments to responses.
- Type:
Callable
- name#
Name of the simulated output(s). Default is
Response
.- Type:
str or list[str]
- eps#
The simulated error to apply, as the standard deviation of the Standard Normal distribution. Default is
0
.- Type:
float or list[float]
- kwargs#
Optional hyperparameters for the response function.
- Type:
dict
- Raises:
TypeError – If response_function is not a callable function.
TypeError – If X_space is not an obsidian ParamSpace object.
- simulate(X_prop: DataFrame) ndarray [source]#
Generates a response to a set of experiments.
Currently, response function only handles strictly numeric values and categories are manually penalized.
- Parameters:
X_prop (pd.DataFrame) – Proposed experiments to evaluate.
- Returns:
Array of response values to experiments.
- Return type:
np.ndarray