Calculate Measures¶
This module contains functions for calculating measures on parsed experiments. Calculated measures are saved as a dictionary in the measures attribute of the experiment. These functions do not return anything, they only calculate the measure or measures on each trial or region of the experiments.
-
sideeye.calculate.
calculate_measure
(experiments: List[sideeye.data.experiment.Experiment], measure: str, verbose: int = 0)¶ Given an array of experiments and the name of a measure, calculate the measure for every trial in the experiment.
Parameters: - experiments (List[Experiment]) – List of experiments to calculate measures for.
- measure (str) – Name of measure to calculate.
- verbose (int) – Debugging output level.
-
sideeye.calculate.
calculate_all_measures
(experiments: List[sideeye.data.experiment.Experiment], output_file: str = None, config: sideeye.config.Configuration = <sideeye.config.Configuration object>)¶ Given an array of experiments and config file, calculate all measures specified in the config file for the experiment, and optionally output the results as a csv.
Parameters: - experiments (List[Experiment]) – List of experiments to calculate measures for.
- output_file (str) – Name of output file. if None, no file is produced.
- config (Configuration) – SideEye configuration.