comnum.search_spec#
- comnum.search_spec(spec, *, threads=None, batch=None, progress=False, csv_path=None, json_path=None)#
Search the operating point of a specification: the value of a variable at which a metric reaches a target, for every combination of the other grid axes.
The specification needs a
searchsection (along,range,metric,target, and optionallytolerance,log,max_evaluations). The bracket is halved until it is narrower than the tolerance; every evaluation runs the stopping rule of the specification on the same random streams (common random numbers); the crossing is interpolated inlog10of the metric, with a confidence interval from those of the bracketing estimates.- Parameters:
spec (str | os.PathLike | dict) – as for
run_spec.threads (int, optional) – worker threads.
batch (int, optional) – trials between two checks of the stopping rule.
progress (bool) – print every evaluation on the standard error.
csv_path (str | os.PathLike, optional) – CSV report (one row per combination).
json_path (str | os.PathLike, optional) – JSON report (with every evaluation).
- Returns:
per combination
condition,along,metric,target,value,lo,hi,convergedandevaluations(x,value,lo,hi,trials).- Return type:
- Raises:
ValueError – without a search section, or when the target is not bracketed.