# Fibers of Failure: Classifying Errors in Predictive Processes
## 2 Materials and Methods
### Mapper  
Mapper has had success in a wide range of application areas, from medical research studying cancer, diabetes, asthma, and many more topics [2; 3; 4; 5], and genetics and phenotype studies [6; 7; 8; 9; 10], to hyperspectral imaging, material science, sports, and politics [11; 12; 13; 14]. Of note for our approach are, in particular, the contributions to cancer, diabetes, and fragile X syndrome [2; 3; 6] where Mapper was used to extract new subgroups from a segmentation of the input space. Mapper[55] is an algorithm that constructs a graphical (more generally a simplicial complex) model for a point cloud dataset. The graph is constructed systematically from some well defined input data. It was defined by [55], and has been shown to have great utility in the study of various kinds  
Figure 1: Frameworks TDA inherits from topology. (**a**) _Coordinate invariance_. The dataset has been rotated approximately 100 degrees clockwise. (**b**) _Deformation invariance_. The dataset has been stretched along the \(y=x\) line. (**c**) _Compression_ of a dataset into 4 nodes and 3 edges. of datasets, as described previously. It can be viewed as a method of unsupervised analysis of data, in the same way as principal component analysis, multidimensional scaling, and projection pursuit can, but it is more flexible than any of these methods. Comparisons of the method with standard methods in the context of hyperspectral imaging have been documented in [11; 12]. An illustration of Mapper is shown in Figure 2.  
Let \(X\) be a finite metric space. The following steps construct the Mapper _complex_:  
1. Choose a collection of maps \(f_{1},\ldots,f_{k}:X\to\mathbb{R}\), or equivalently some \(f:X\to\mathbb{R}^{k}\). These are usually chosen to be statistically meaningful quantities such as variables in the dataset, density or centrality estimates, or outputs from a dimensionality reduction algorithm such as PCA or MDS. These are usually referred to as _lenses_ or _filters_. 2. Choose a covering \(\mathbb{U}=\{U_{1},\ldots\}\) of \(\mathbb{R}^{k}\): an overlapping partition of possible filter value combinations. 3. Pull the covering back to a covering \(\mathbb{V}\) of \(X\), where \(V_{i}\in\mathbb{V}=f^{-1}(U_{i})\). 4. Refine the covering \(\mathbb{V}\) to a covering \(\hat{\mathbb{V}}\) by clustering each \(V_{i}\). 5. Create the _nerve complex_ of the covering \(\hat{\mathbb{V}}\): as vertices of the complex we choose the indexing set of \(\hat{\mathbb{V}}\), and a simplex \([i_{0},\ldots,i_{j}]\) is included if \(\hat{V}_{i_{0}}\cap\cdots\cap\hat{V}_{i_{j}}\
eq\emptyset\). If we are only interested in the underlying Mapper graph, it suffices to add an edge connecting any two vertices whose corresponding sets of data points share some data point. One fundamental inspiration to the Mapper algorithm is the Nerve lemma. **Nerve Lemma:** If \(X\) is some arbitrary topological space and \(\mathbb{U}=\{U_{i}\}\) is a good cover with index \(i\) then \(X\simeq N(U_{i})\), where \(N(U_{i})\) has simplex \([i_{0},\ldots,i_{d}]\) if and only if \(\bigcap_{k=0}^{d}U_{i_{k}}\
eq 0\). Here, a _good cover_ is a cover such that \(\bigcap_{k=0}^{d}U_{i_{k}}\) is either contractible or empty for all \([i_{0},\ldots,i_{d}]\)  
If the function \(f\), and the covering \(\mathbb{U}\) are chosen well enough, the covering \(\hat{\mathbb{V}}\) may well be a good cover, in which case the topology of the Mapper complex reflects the topology of \(X\) itself. The filters act as measures of enforced separation: data points with sufficiently different values for the filter function are guaranteed to be separated to distinct vertices in the Mapper complex, while the nerve complex construction ensures that connectivity information is not lost in the process. In practice, one particular covering construction has gained widespread use. It creates axis-aligned overlapping hyperrectangles by the following process:  
1. For each \(i=1,\ldots,k\), select (1) a positive integer \(N_{i}\) and (2) a positive real number \(p_{i}\), with \(0<p_{i}<1\). 2.