mapper2D: mapper2D function

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

Description

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

Usage

1
2
3
4
mapper2D(distance_matrix = dist(data.frame(x = 2 * cos(1:100), y =
  sin(1:100))), filter_values = list(2 * cos(1:100), sin(1:100)),
  num_intervals = c(5, 5), percent_overlap = 50,
  num_bins_when_clustering = 10)

Arguments

distance_matrix

an n x n matrix of pairwise dissimilarities

filter_values

a list of two length n vector of real numbers

num_intervals

a vector of two positive integers

percent_overlap

a number 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

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
m2 <- mapper2D(
       distance_matrix = dist(data.frame( x=2*cos(1:100), y=sin(1:100) )),
       filter_values = list( 2*cos(1:100), sin(1:100) ),
       num_intervals = c(5,5),
       percent_overlap = 50,
       num_bins_when_clustering = 10)
## Not run: 
library(igraph)
g2 <- graph.adjacency(m2$adjacency, mode="undirected")
plot(g2, layout = layout.auto(g2) )

## End(Not run)

Example output

[1] "Level set is empty"
[1] "Level set is empty"
[1] "Level set is empty"
[1] "Level set is empty"
[1] "Level set is empty"
[1] "Level set is empty"
[1] "Level set is empty"
[1] "Level set is empty"
[1] "Level set is empty"

Attaching package: 'igraph'

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union

TDAmapper documentation built on May 1, 2019, 10:30 p.m.