| compute_dc_distances | R Documentation |
The main entry point for constructing the DC-distance matrix used throughout the DISCO metric. The procedure is:
Compute core distances and build the minimum spanning tree of the
mutual-reachability distances (see
calculate_reachability_distance). Since version 0.2.0
the tree is built in compiled code with distances computed on the fly,
so the mutual-reachability matrix is never stored.
Extract pairwise DC distances as minimax-path weights in the MST
(extract_dc_distances_from_mst).
Note that the returned matrix has n^2 entries;
disco_samples and disco_score do not need it
and use far less memory.
compute_dc_distances(X, min_points = 5)
X |
A numeric matrix of shape |
min_points |
A positive integer for the core-distance neighbourhood
size. Default is |
A symmetric n \times n numeric matrix of DC distances.
set.seed(1)
X <- matrix(rnorm(40), ncol = 2)
D <- compute_dc_distances(X, min_points = 5)
dim(D) # 20 x 20
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.