mapper: mapper function

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/mapper.R

Description

This function uses a filter function f: X -> R^m on a data set X that has n rows (observations) and k columns (variables).

Usage

1
2
mapper(dist_object, filter_values, num_intervals, percent_overlap,
  num_bins_when_clustering)

Arguments

filter_values

A n x m data frame of real numbers.

num_intervals

A length m vector of positive integers.

percent_overlap

A length m vector of numbers between 0 and 100 specifying how much adjacent intervals should overlap.

num_bins_when_clustering

A positive integer that controls whether points in the same level set end up in the same cluster.

distance_matrix

An n x n matrix of pairwise dissimilarities.

Value

An object of class TDAmapper which is a list of items named adjacency (adjacency matrix for the edges), num_vertices (integer number of vertices), level_of_vertex (vector with level_of_vertex[i] = index of the level set for vertex i), points_in_vertex (list with points_in_vertex[[i]] = vector of indices of points in vertex i), points_in_level (list with points_in_level[[i]] = vector of indices of points in level set i, and vertices_in_level (list with vertices_in_level[[i]] = vector of indices of vertices in level set i.

Author(s)

Paul Pearson, pearsonp@hope.edu

References

https://github.com/paultpearson/TDAmapper

See Also

mapper1D, mapper2D

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
X <- data.frame( x=2*cos(0.5*(1:100)), y=sin(1:100) )
f <- X
m1 <- mapper(
       distance_matrix = dist(X),
       filter_values = f[,1:2],
       num_intervals = c(10,10),
       percent_overlap = c(50,50),
       num_bins_when_clustering = 10)
## Not run: 
#install.packages("igraph")
library(igraph)
g1 <- graph.adjacency(m1$adjacency, mode="undirected")
plot(g1, layout = layout.auto(g1) )

## End(Not run)

paultpearson/TDAmapper documentation built on May 24, 2019, 10:34 p.m.