View source: R/baskin_robbins.R
create_1D_mapper_object | R Documentation |
Run mapper using a one-dimensional filter, a cover of intervals, and a clustering algorithm.
create_1D_mapper_object(
data,
dists,
filtered_data,
cover,
clusterer = hierarchical_clusterer("single")
)
data |
A data frame. |
dists |
A distance matrix for the data frame. |
filtered_data |
The result of a function applied to the data frame; there should be one filter value per observation in the original data frame. |
cover |
A 2D array of interval left and right endpoints; rows should be intervals and columns left and right endpoints (in that order). |
clusterer |
A function which accepts a list of distance matrices as input, and returns the results of clustering done on each distance matrix. |
A list of two data frames, one with node data containing bin membership, data points 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)))
projx = data$x
num_bins = 10
percent_overlap = 25
cover = create_width_balanced_cover(min(projx), max(projx), num_bins, percent_overlap)
create_1D_mapper_object(data, dist(data), projx, cover)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.