compute_similarity_graph | R Documentation |
For each pair of samples (x_i, x_j)
, the entry s_{ij}
in the similarity
matrix S
is computed as:
s_{ij} =
\begin{cases}
\frac{1}{2}\left( e^{-\|x_i - x_j\|^2 / \tau_i^+} + e^{-\|x_j - x_i\|^2 / \tau_j^+} \right), & \text{if } c_i = c_j, \\
-\frac{1}{2}\left( e^{-\|x_i - x_j\|^2 / \tau_i^-} + e^{-\|x_j - x_i\|^2 / \tau_j^-} \right), & \text{if } c_i \neq c_j,
\end{cases}
where \tau_i^+
and \tau_i^-
(Eqs. (5) and (6)) characterize the intra- and inter-class
geometric distributions for sample x_i
, respectively.
compute_similarity_graph(X, y, q = 1.5)
X |
A numeric matrix of size |
y |
A length- |
q |
A positive exponent (see Eqs. (5) and (6)). Typical range is 1, 3. |
An n \times n
matrix S
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.