create_1D_mapper_object function

Run 1D mapper

Run 1D mapper

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") )

Arguments

  • 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.

Returns

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.

Examples

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)
  • Maintainer: George Clare Kennedy
  • License: MIT + file LICENSE
  • Last published: 2025-02-20