biophysics_fitting
❭ exploration_from_seedpoint
❭ evaluation_function_incremental_helper
evaluation_function_incremental_helper¶
- biophysics_fitting.exploration_from_seedpoint.evaluation_function_incremental_helper(p, s=None, cutoffs=None, stim_order=['bAP', 'BAC', 'StepOne', 'StepTwo', 'StepThree'], verbose=True, evaluators_by_stimulus=None, additional_evaluation_functions=[], objectives_by_stimulus=None)¶
Helper function for the evaluation function. As soon as a single stimulus shows that a biophysical model does not match the objectives, it is not necessary to evaluate the other stimuli. This method runs the evaluation functions one by one and exits prematurely as soon as an objective is above the desired cutoff defined in
cutoffs
.- Parameters:¶
p (dict |
pandas.Series
) – Parameter values used in the simulation. Seehay_complete_default_setup
for an example.s (Simulator) – Simulator object.
cutoffs (dict) – Dictionary with keys that are in
stim_order
. Values are floats that define a maximum allowed error for any objective corresponding to that stimulus. Note that each stimulus evokes a voltage trace that is parametrized by multiple objectives, each with their own error. This method checks if the largest error exceeds some value. Default: {‘bAP’:3.2, ‘BAC’: 3.2, ‘StepOne’:4.5, ‘StepTwo’: 4.5, ‘StepThree’: 4.5}, as used in Hay et al. [2]stim_order (array-like) – Order in which stimuli are simulated. Default: [‘bAP’, ‘BAC’, ‘StepOne’, ‘StepTwo’, ‘StepThree’], which is the order of stimuli used in Hay et al. [2]
verbose (bool) – If True, print intermediate results.
evaluators_by_stimulus (dict) – Dictionary with keys that are in
stim_order
. Values are evaluators that are used to evaluate the voltage traces.additional_evaluation_functions (list) – List of functions that are called after the voltage traces are evaluated. The results are added to the evaluation dict, and returned.
objectives_by_stimulus (dict) – Dictionary with keys that are in
stim_order
. Values are lists of objectives that are used to evaluate the voltage traces.
- Returns:¶
- (bool, dict). The first value is True if all stimuli are within the cutoffs, False otherwise.
The second value is a dictionary with the evaluation results.
- Return type:¶
tuple