Learn R Programming

BallMapper (version 0.2.0)

The Ball Mapper Algorithm

Description

The core algorithm is described in "Ball mapper: a shape summary for topological data analysis" by Pawel Dlotko, (2019) . Please consult the following youtube video the idea of functionality. Ball Mapper provide a topologically accurate summary of a data in a form of an abstract graph. To create it, please provide the coordinates of points (in the points array), values of a function of interest at those points (can be initialized randomly if you do not have it) and the value epsilon which is the radius of the ball in the Ball Mapper construction. It can be understood as the minimal resolution on which we use to create the model of the data.

Copy Link

Version

Install

install.packages('BallMapper')

Monthly Downloads

196

Version

0.2.0

License

MIT + file LICENCE

Maintainer

Pawel Dlotko

Last Published

August 20th, 2019

Functions in BallMapper (0.2.0)

BallMapper

Create vertices and edges (with additional properties) of a Ball Mapper graph representation of the input data. Please be aware that the program will not perform any normalization on the data. As with cluster analysis we recommend that you consider whether to normalize the data prior to running the function.
find_dominant_difference_using_averages_normalized_by_sd

This procedure take two subset of points (that come from the vertices of Ball Mapper) and return the coordinates on which the averages of those two collections differs most. To ballance the effect of potentially different orders of magnitude of data in column, we divide the difference in means by the standard deviation of the whole column.
normalize_to_average_0_stdev_1

This function normalize each column (variable) of the input dataset so that the the average of the normalized column is 0 and its standard deviation is 1.
readBallMapperGraphFromFile

This procedure read the BallMapper object from file. The parameter of the file is filename. We assume that files: filename_vertices filename_edges filename_edges_strength filename_points_covered_by_landmarks filename_landmarks filename_coloring
storeBallMapperGraphInFile

This procedure store the Ball Mapper graph in a file in the following format:
simpleDynamicNetwork

This is a simple example of dynamic visualization using networkD3 library. This version do not implement coloring of vertices, just give a general overview of the edges.
find_dominant_difference_using_averages

This procedure take two subset of points (that come from the vertices of Ball Mapper) and return the coordinates on which the averages of those two collections differs most. To ballance the effect of potentially different orders of magnitude of data in column, we divide the difference in means by the mean of the whole column.
normalize_to_min_0_max_1

This function normalize each column (variable) of the input dataset so that the maximum is mapped to one, minimum to zero, and the intermediate values linearly to the appropriate points in the interval (0,1).
color_by_distance_to_reference_points

This function will provide a new coloring which is the minimal and average distance of points in the point cloud to the referece points. The output from this procedure can be used as an alternative coloring in BallMapper.
pointToBallList

Produce a two column list. The first column contain the number of point (possibly with repetitions), the second one contains the number of landmark points that cover it. For example, let us assume that point 1 is covered by landmark 1 and 2, and point 2 is covered by the landmark 2. In this case the obtained list is of a form: 1 1 1 2 2 2 This list can be used for a further analysis of various parts of Ball Mapper graph.
coloredDynamicNetwork

This procedure produces a dynamic graph with colors. It allows zoom-in operation and displays information about vertices when they are clicked upon.
GrayscaleIgraphPlot

Produce a static grayscale visualization of the Ball Mapper graph. It is based on the output from the BallMapper function.
colorByAllVariables

Produce a collection of png files with mapper graphs colored by following coordinates (so that the number of files is the same as the number of coordinates).
coordinates_of_points_in_subcollection

This is an auxiliery function. It take the coordinates of points, ids of subset of points, and number of coordinate, and return a sorted vector of the given coodrinate in the considered points. For instance, given the collection of points: 1 2 3 4 5 6 7 8 9 and which_subset = 2,3 and number_of_coordinate = 2 the procedure below will return the vector [2,5,8].
colorByAverageValueOfOtherVariable

Produce a new coloring vector being an average of values of given function at points covererd by each vertex of Ball Mapper graph.
colorByStDevValueOfOtherVariable

Produce a new coloring vector being a standard deviation of values of given function at points covererd by each vertex of Ball Mapper graph.
ColorIgraphPlot

Produce a static color visualization of the Ball Mapper graph. It is based on the output from BallMapper function.
points_covered_by_landmarks

This function returns a list of points covered by the given collection of landmarks.