# The Ball Mapper Algorithm ## Help Pages

 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. 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). 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. coloredDynamicNetwork This procedure produces a dynamic graph with colors. It allows zoom-in operation and displays information about vertices when they are clicked upon. ColorIgraphPlot Produce a static color visualization of the Ball Mapper graph. It is based on the output from BallMapper function. 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. 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]. 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. 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. GrayscaleIgraphPlot Produce a static grayscale visualization of the Ball Mapper graph. It is based on the output from the BallMapper function. 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. 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). points_covered_by_landmarks This function returns a list of points covered by the given collection of landmarks. 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. 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 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. storeBallMapperGraphInFile This procedure store the Ball Mapper graph in a file in the following format: