Studies

Generation of calibration study results

class pysimmmulator.study.batch_study(channel_rois: dict, channel_distributions: dict[str, dict] = {}, random_seed: int = None, bias: float = 0.0, stdev: float = 0.05)

Object for generating study values across all channels

generate(count: int = 1) dict[str, array]

Produces study results for all of the registered channels

Parameters:

count (int) – number of study results to return (default is 1)

Retuns:

study_results (dict[iterable[float]]): an array of study results

generate_dynamic(universal_bias: List[float] | None = None, universal_stdev: List[float] | None = None, channel_bias: dict[str, list[float]] | None = None, channel_stdev: dict[str, list[float]] | None = None) dict[str, list[float]]

Produces study results for all of the registered channels

Parameters:
  • universal_bias (List[float]) – iterable of bias values used to update the distribution per results

  • universal_stdev (List[float]) – iterable of stdev values used to update the distribution per results

  • channel_bias (dict[str, list[float]]) – lookup of iterable of bias values used to update the distribution per results

  • channel_stdev (dict[str, list[float]]) – iterable of stdev values used to update the distribution per results

Returns:

an array of study results

Return type:

study_results (iterable[float])

class pysimmmulator.study.study(channel_name: str, true_roi: float, random_seed: int = None, bias: float = 0.0, stdev: float = 0.05)

Object for generating study values from a normal distribution around true the true channel roi

generate(count: int = 1) array

Provides a study ‘result’

Parameters:

count (int) – number of study results to return (default is 1)

Retuns:

study_results (iterable[float]): an array of study results

generate_dynamic(bias: list[float], stdev: list[float]) list

Provides study results with non-stationary distribution

Parameters:
  • bias (list[float]) – iterable of bias values used to update the distribution per results

  • stdev (list[float]) – iterable of stdev values used to update the distribution per results

Returns:

an array of study results

Return type:

study_results (iterable[float])

property roi: float

Reports the true ROI of the channel set at initializaiton

Returns:

the true ROI value for the channel.

Return type:

true_roi (float)

update_bias(value: float) None

Updates the distribution bias to the passed value

Parameters:

value (float) – value to set the distribution bias to

Returns:

None

update_roi(value: float) None

Updates the roi assigned to the channel as the passed value

Parameters:

value (float) – value to set the channel roi to

Returns:

None

update_stdev(value: float) None

Updates the distribution stdev to the passed value

Parameters:

value (float) – value to set the distribution stdev to

Returns:

None