Exemplo n.º 1
0
#
# Spectral Coefficient of Variation (SCV)
# ---------------------------------------
#
# As noted above, the range of log-power values in the theta frequency range is lower
# compared to other frequencies, while that of 30-100Hz appear to be quite constant
# across the entire frequency axis (homoscedasticity).
#
# To quantify that, we compute the coefficient of variation (standard deviation/mean) as a
# normalized estimate of variance.
#

###################################################################################################

# Calculate SCV
freqs, scv = spectral.compute_scv(sig, fs, nperseg=int(fs), noverlap=0)

# Plot the SCV
plot_scv(freqs, scv)

###################################################################################################
#
# As shown above, SCV calculated from the entire segment of data is quite noise due to the
# single estimate of mean and standard deviation. To overcome this, we can compute a
# bootstrap-resampled estimate of SCV, by randomly drawing slices from the non-overlapping
# spectrogram and taking their average.
#

###################################################################################################

# Calculate SCV with the resampling method
Exemplo n.º 2
0
#
# Next, let's look at computing the spectral coefficient of variation, with
# :func:`~.compute_scv`.
#
# As noted above, the range of log-power values in the theta frequency range is lower
# compared to other frequencies, while that of 30-100Hz appear to be quite constant
# across the entire frequency axis (homoscedasticity).
#
# To quantify that, we compute the coefficient of variation (standard deviation/mean) as a
# normalized estimate of variance.
#

###################################################################################################

# Calculate SCV
freqs, scv = compute_scv(sig, fs, nperseg=int(fs), noverlap=0)

###################################################################################################
#
# There is also a plotting function for SCV, :func:`~.plot_scv`.
#

###################################################################################################

# Plot the SCV
plot_scv(freqs, scv)

###################################################################################################
#
# As shown above, SCV calculated from the entire segment of data is quite noisy due to the
# single estimate of mean and standard deviation.