Computes the mapper graph. Mapper is a tool for summarizing topological information from datasets and maps defined on them. It takes as input a set of 'point cloud' data, a (possibly lower dimensional) map defined on the data, and produces a topological summary of the data expressed through a cover equipped to the codomain of the map. For more information, see the references below.

mapper(X, filter, cover = c(cover = "fixed interval", number_intervals =
  10L, percent_overlap = 35), distance_measure = "euclidean",
  clustering_algorithm = c(cl = "single"), return_reference = FALSE)

Arguments

X

Either an \(n x D\) data matrix.

filter

An \(n x d\) data matrix, or a function.

cover

Named list of cover parameters. See details.

distance_measure

String indicating the measure in the data space. Accepts any in pr_DB.

clustering_algorithm

Named list of clustering parameters. See details.

return_reference

Boolean whether or not to return the reference class used to construct Mapper. See MapperRef.

Value

If return_reference is TRUE, the MapperRef object is returned, otherwise a list given by exportMapper

Details

mapper is a generic function that concisely parameterizes the Mapper framework into a single function definition. This function serves as a convenience wrapper around the MapperRef R6 generator for users that prefer a single function to parameterize the construction. For finer control over the mapper construction, it's recommended to use MapperRef instead. If return_reference is TRUE, the MapperRef instance used by this function is returned.

The cover must be a named list of all of the parameters needed by the cover, as is used in e.g. use_cover.

The clustering_algorithm must be a named list the parameters needed to parameterize the clustering algorith, as is used in e.g. use_clustering_algorithm

References

Singh, Gurjeet, Facundo Memoli, and Gunnar E. Carlsson. "Topological methods for the analysis of high dimensional data sets and 3d object recognition." SPBG. 2007.

See also

Examples

data("noisy_circle", package="Mapper") left_pt <- noisy_circle[which.min(noisy_circle[, 1]),] f_x <- matrix(apply(noisy_circle, 1, function(pt) (pt - left_pt)[1])) m <- mapper(X = noisy_circle, filter = f_x, cover = list(cover="fixed interval", number_intervals=10L, percent_overlap=50), distance_measure = "euclidean", clustering_algorithm = list(cl="single", threshold = 0.0))