compute_diversity_graph | R Documentation |
For each pair of samples (x_i, x_j)
, the entry d_{ij}
in the diversity
matrix D
is:
d_{ij} =
\begin{cases}
\frac{1}{2}\left( e^{\|x_i - x_j\|^2 / \rho_i^+} + e^{\|x_j - x_i\|^2 / \rho_j^+} \right), & \text{if } c_i = c_j, \\
\frac{1}{2}\left( e^{\|x_i - x_j\|^2 / \rho_i^-} + e^{\|x_j - x_i\|^2 / \rho_j^-} \right), & \text{if } c_i \neq c_j,
\end{cases}
where \rho_i^+
and \rho_i^-
follow Eqs. (5) and (6) but with q=0
.
compute_diversity_graph(X, y)
X |
A numeric matrix of size |
y |
A length- |
An n \times n
matrix D
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.