evaluatePars | R Documentation |
Internal soundgen function.
evaluatePars(
p,
pars,
myfun,
bounds = NULL,
fitnessPar,
fitnessFun = function(x) 1 - cor(x, key, use = "pairwise.complete.obs"),
myfolder,
key,
otherPars = list(plot = FALSE),
verbose = TRUE
)
p |
numeric vector of evaluated values of parameters |
pars |
names of arguments to |
myfun |
the function being optimized: either 'segment' or 'analyze' (in quotes) |
bounds |
a list setting the lower and upper boundaries for possible
values of optimized parameters. For ex., if we optimize |
fitnessPar |
the name of output variable that we are comparing with the key, e.g. 'nBursts' or 'pitch_median' |
fitnessFun |
the function used to evaluate how well the output of
|
myfolder |
path to where the .wav files live |
key |
a vector containing the "correct" measurement that we are aiming to reproduce |
otherPars |
a list of additional arguments to |
verbose |
if TRUE, reports the values of parameters evaluated and fitness |
Called by optimizePars
.
Returns 1 - Pearson's correlation between fitness measure and the key (i.e. 0 is perfect fit, 1 is awful fit).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.