View source: R/percent_overlap.R
| percent_overlap_kde | R Documentation |
Computes the proportional overlap (shared area) between two categories in an n-dimensional acoustic space using multivariate kernel density estimation. Despite the historical function name, the return value is a 0–1 proportion: 0 = no overlap, 1 = identical.
percent_overlap_kde(
data,
features,
category_col,
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,
method = c("mc", "legacy"),
density = c("kde", "mvnorm"),
mc_n = 10000L,
bw_scale = 1,
...
)
data |
Data frame. |
features |
Character vector of numeric feature columns. |
category_col |
String; exactly two categories. |
bw |
Bandwidth selection method. Uses the same options as
|
eval_on |
Where to evaluate the KDEs. Uses the same options as
|
eval_n |
Optional positive integer giving the maximum number of evaluation points to use. |
eval_seed |
Optional integer seed used only when |
engine |
KDE evaluation engine. Uses the same options as
|
chunk_size |
Positive integer controlling the number of evaluation
points processed per chunk by |
method |
Estimator: |
density |
Density model behind the estimate: |
mc_n |
Positive integer; number of Monte-Carlo samples drawn from each
fitted Gaussian when |
bw_scale |
Positive number multiplying the selected kernel bandwidth on
the standard-deviation scale (univariate bandwidths by |
... |
Reserved for future extensions; currently unused. |
Numeric scalar proportion in [0, 1].
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.