Phase estimation statistics

When performing phase estimation, you will likely need to quantify one or more of mean, standard deviation and accuracy. All estimators contain helper methods for automatically computing mean, standard deviation and accuracy of triggers to a target phase.

Mean and standard deviation

Mean and standard deviation (std) are computed using scipy.stats circular statistics. To compute the mean and standard deviation of phase given a list of trigger samples, you can use the EEGPhasePy.estimators.Estimator.mean_phase_from_triggers() and EEGPhasePy.estimators.Estimator.std_phase_from_triggers(). You can specify radian or degree output when calling each method. See below:

Computing mean and std using etp
phase_standard_deviation = etp.std_phase_from_triggers(testing_signal, triggers, degree=True)
phase_mean = etp.mean_phase_from_triggers(testing_signal, triggers, degree=True)

Accuracy

Accuracy is defined as 50% being completely random, 0% being completely opposite to the target phase and 100% being exactly at the target phase. We calculate accuracy based on the equation described by Shirinpour et al. [1]. You can specify the target phase when you call the EEGPhasePy.estimators.Estimator.phase_accuracy_from_triggers() method:

Computing accuracy to target phase from triggers
accuracy = etp.phase_accuracy_from_triggers(testing_signal, triggers, 0) # in this case the target phase was 0 deg

Examples

Polar histograms

Polar histograms