| getSurprisal_matrix | R Documentation |
Internal soundgen function called by getSurprisal.
getSurprisal_matrix(
x,
win,
method = c("acf", "np")[1],
sameLagAllFreqs = TRUE,
weightByAmpl = TRUE,
rescale = FALSE
)
x |
input matrix such as a spectrogram (columns = time, rows = frequency) |
win |
length of analysis window |
method |
acf = change in maximum autocorrelation after adding the final
point, np = nonlinear prediction (see |
sameLagAllFreqs |
(only for method = 'acf') if TRUE, the best_lag is calculated by averaging the ACFs of all channels, and the same best_lag is used to calculate the surprisal in each frequency channel (we expect the same "rhythm" for all frequencies); if FALSE, the best_lag is calculated separately for each frequency channel (we can track different "rhythms" at different frequencies) |
weightByAmpl |
if TRUE, ACFs and surprisal are weighted by max amplitude per frequency channel |
rescale |
if TRUE, surprisal is normalized from (-Inf, Inf) to [-1, 1] |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.