[Paper Review] ballmapper: Applying Topological Data Analysis Ball Mapper in Stata
The paper introduces a Stata package, ballmapper, to apply Topological Data Analysis Ball Mapper (TDABM) for visualizing high-dimensional data without dimensionality reduction, with data-linked coloring and interpretable ball-based graphs.
Topological Data Analysis Ball Mapper (TDABM) offers a model-free visualization of multivariate data which does not necessitate the information loss associated with dimensionality reduction. TDABM Dlotko (2019) produces a cover of a multidimensional point cloud using equal size balls, the radius of the ball is the only parameter. A TDABM visualization retains the full structure of the data. The graphs produced by TDABM can convey coloration according to further variables, model residuals, or variables within the multivariate data. An expanding literature makes use of the power of TDABM across Finance, Economics, Geography, Medicine and Chemistry amongst others. We provide an introduction to TDABM and the exttt{ballmapper} package for Stata.
Motivation & Objective
- Introduce the TDABM methodology and its benefits over traditional dimensionality reduction methods.
- Present the ballmapper package for Stata and its installation, usage, and output structures.
- Explain how TDABM visualizations can be colored by additional variables and linked back to original data for interpretation.
- Demonstrate practical implementation through examples and discuss the role of the ball radius in capturing data structure.
Proposed method
- TDABM covers a K-dimensional point cloud with equal-radius balls to form a 2D abstract representation.
- Centers (landmarks) are chosen sequentially from uncovered points until all points are covered, creating L balls.
- Each ball b stores the number of points nb and the average of a coloring variable Y within the ball, ȳb, for visualization.
- Edges are drawn between balls whose radius-ε neighborhoods overlap, producing a connected TDABM graph where ball sizes reflect density.
- Coloration can be applied using any Y variable (including residuals or model outputs) to reveal structure across X space.
- The ballmapper package constructs two Stata frames, BM_RESULTS and BM_MERGED, for graph data and merged underlying data, plus functions ballsummary() and variablesummary() for summarization.

Experimental results
Research questions
- RQ1How does TDABM represent structure in high-dimensional data without reducing dimensions?
- RQ2How does the choice of ball radius ε affect the captured local and global structure in TDABM visualizations?
- RQ3Can ballmapper link TDABM graph features back to original data to facilitate interpretation and model assessment?
- RQ4What practical outputs and summaries does ballmapper provide to support exploratory analysis?
Key findings
- TDABM provides a topologically faithful, model-free visualization of multivariate data without information loss from dimensionality reduction.
- Ball radii ε enable exploration of data structure at multiple scales, capturing both local density and global shape.
- Ball sizes reflect point density, and edges indicate overlap between balls, forming an interpretable graph structure.
- Ball coloration allows visualizing additional variables or residuals across the data space, enabling model assessment and interpretation.
- The ballmapper Stata package outputs BM_RESULTS and BM_MERGED frames that link TDABM balls to original observations and support summary analyses via ballsummary() and variablesummary().
- The approach demonstrates consistent graph construction across iterations and supports robustness checks by varying landmark order.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.