create_clusterball_mapper_object {mappeR} | R Documentation |
Run ball mapper, but additionally cluster within the balls. Can use two different distance matrices to accomplish this.
create_clusterball_mapper_object(
data,
dist1,
dist2,
eps,
clustering_method,
global_clustering = TRUE
)
data |
A data frame. |
dist1 |
A distance matrix for the data frame; this will be used to ball the data. |
dist2 |
Another distance matrix for the data frame; this will be used to cluster the data after balling. |
eps |
A positive real number for your desired ball radius. |
clustering_method |
A string to pass to hclust to determine clustering method. |
global_clustering |
Whether you want clustering to happen in a global (all level visible) or local (only current level set visible) context. |
A list of two dataframes, one with node data containing bin membership, datapoints per cluster, and cluster dispersion, and one with edge data containing sources, targets, and weights representing overlap strength.
data = data.frame(x = sapply(1:100, function(x) cos(x)), y = sapply(1:100, function(x) sin(x)))
data.dists = dist(data)
eps = 1
create_clusterball_mapper_object(data, data.dists, data.dists, eps, "single")