View source: R/compare_overlap_metrics.R
| compare_overlap_metrics | R Documentation |
compare_overlap_metrics() was renamed to phontrast() in phontrast 2.0.0
(the package formerly released as 'phonJSD'). It remains as a thin wrapper
that calls phontrast() with output = "wide" for backward compatibility
and will be removed in a future release. New code should call phontrast().
compare_overlap_metrics(
data,
features,
category_col,
group_col = NULL,
min_tokens = 20,
bw = c("Hpi", "Hscv", "Hpi.diag", "scott.diag"),
eval_on = c("pooled", "group1", "group2", "pooled_sample"),
eval_n = NULL,
eval_seed = NULL,
engine = c("ks", "fast_diag", "fast_diagonal"),
chunk_size = 1000L,
eps = 1e-06,
output = c("wide", "long"),
do_boot = FALSE,
n_boot = 1000,
conf_level = 0.95,
progress = TRUE,
method = c("mc", "legacy"),
density = c("kde", "mvnorm"),
mc_n = 10000L,
bw_scale = 1
)
data |
Data frame containing category labels and acoustic features. |
features |
Character vector of numeric feature columns. |
category_col |
String; column giving the two categories to compare. |
group_col |
Optional character vector of one or more grouping columns.
If |
min_tokens |
Minimum tokens required globally or per group. |
bw |
Bandwidth selection method passed to |
eval_on |
KDE evaluation points passed to |
eval_n |
Optional maximum number of KDE evaluation points passed to
|
eval_seed |
Optional integer seed for KDE evaluation-point subsampling. |
engine |
KDE evaluation engine passed to |
chunk_size |
Chunk size for |
eps |
Small ridge constant for covariance-based metrics. |
output |
Output format: |
do_boot |
Logical; if |
n_boot |
Number of bootstrap resamples if |
conf_level |
Confidence level for bootstrap intervals. |
progress |
Logical; if |
method |
KDE estimator for the JSD and percent-overlap columns, passed
to |
density |
Density model behind the two distributional metrics
(Jensen-Shannon and proportional overlap): |
mc_n |
Positive integer; number of Monte-Carlo samples drawn from each
fitted Gaussian for the Jensen-Shannon and overlap columns when
|
bw_scale |
Positive number multiplying the selected kernel bandwidth on
the standard-deviation scale for the Jensen-Shannon and overlap columns
(default |
See phontrast(); wide format by default.
phontrast()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.