{'fraction_non_alphanumeric': 0.042523114541147704, 'fraction_numerical': 0.020975013372048597, 'mean_word_length': 4.220382927802154, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Taxicab Correspondence Analysis of Sparse Contingency Tables

Visualization and interpretation of contingency tables by correspondence analysis (CA), as developed by Benzecri, has a rich structure based on Euclidean geometry. However, it is a well established fact that, often CA is very sensitive to sparse contingency tables, where we caracterize sparsity as the existence of relatively high-valued counts, rare observations discussed by Rao (1995), and zero-block structure emphasized by Novak and Bar-Hen (2005) and Greenacre (2013). In this paper, we aim to emphasize the important roles played by L1 and L2 geometries. This will be done by comparing the maps obtained by CA with the maps obtained by taxicab correspondence analysis (TCA), where TCA is a robust L1 variant of correspondence analysis. If the projections of view of both maps are quite different, we refer to this phenomenon as parallax. In astronomy, parallax means the apparent change in the position of an object as seen from two different points. In our case the two different points correspond to the two different geometries, Euclidean and Taxicab. The existence of a parallax highlights the important, but hidden, role of the underlying geometry in the interpretation of the maps obtained in multivariate data analysis. We emphasize the following fact: Only by comparing CA and TCA graphical displays, we are able to reveal the phenomenon of parallax. Examples are provided.


Introduction
Correspondence analysis (CA), developed by Benzécri (1973) since 1960s, as a statistical method for different kinds of data sets, in particular for contingency tables, is embedded both in theory and in practice. The theory is based on the chi-square distance between the profiles; parallel to this beautiful theory, the practice is entrenched in the joint interpretation of the graphical displays based on the Euclidean geometry. Seeing this extreme fondness of the use and interpretation of the maps by the users of CA, Nishisato (1998) suggested the replacement of the adage "seeing is believing" with "graphing is believing" and stressed the importance of interpretable graphs. Additionally, we recall the often cited quip "a picture is worth a thousand words", and via geometric interpretation of maps CA offers much to the analysis of complex multivariate data sets. So the philosophical question asked by Schlick (2000, part 5) "Theory and Observation: Is seeing believing ?" is quite relevant here in the context of data analysis by CA.
It is well known that, CA is very sensitive to some particularities of a data set; further, how to identify and handle these is an open unresolved problem. Here, we enumerate three under the umbrella of sparse contingency tables: rare observations, zero-block structure and relatively high-valued cells. Rao (1995), among others, stressed the influence of rare observations (rows or columns that have relatively small marginal weights compared to others) and proposed an alternative to CA based on Hellinger distance ( a square-root transformation of counts). Greenacre (2013) refuted Rao's assertion and argued that rare observations do not have an exaggerated influence in CA. Earlier Nowak and Bar-Hen (2005) developed a criterion based on the influence function to identify influential rare observations; and they arrived at the same conclusion as Greenacre in their analysis of a 207 × 15 abundance data in ecology; however they observed that "influential species are rare species that are concentrated in few plots". A similar observation is found in Greenacre (2013) "there is one exceptional situation where rare species would have a strong role in the solution, namely when a species is observed in a single sampling site and no or very few other species are observed there". We describe this particular situation as the existence of a large zero-block structure. Often few relatively high-valued cells, including outlier counts, have detrimental effect on the CA outputs by emphasizing some aspects of the data, even though apparently the interpretation of the CA maps seems meaningful to the researchers. Our main aim in this paper is to highlight the above mentioned three points by comparing the maps obtained by CA with the maps obtained by taxicab correspondence analysis (TCA), where TCA is a L 1 variant of CA; and to explore under what conditions the CA and TCA maps produce similar, somewhat similar or dissimilar maps. Our main conclusion is that: First, CA and TCA maps enrich each other; second, for sparse contingency tables, there is a positive probability that CA and TCA maps are partially similar or dissimalar. To do this we organize the paper in six sections.
In section 2, we attempt to quantify the notion of sparsity in contingency tables by a 7-number summary based on the minimal size of an equivalent contingency table, where the invariance property of CA and TCA is used to construct the equivalence class of contingency tables. In section 3, we present a brief mathematical comparison of CA and TCA; in section 4 we present an empirical comparison using ten data sets; in section 5 we consider sparsest contingency tables; and we conclude in section 6.

7-number summary of sparsity in contingency tables
Let N = (n ij ) be a contingency table cross-classifying two nominal variables with I rows and J columns, where for i = 1, ..., I and j = 1, ..., J, n ij represents the frequency of statistical units having the ith category of the row variable and the jth category of the column variable. Thus, n = I i=1 J j=1 n ij represents the sample size. In the statistical literature, generally we see that the degree of sparsity of N are based on the following two quantities the average value of counts; and the percentage value of zero counts, where 1 nij =0 is the indicator function: 1 nij =0 = 1 for n ij = 0 and 1 nij =0 = 0 for n ij ≥ 1. According to Agresti and Yang (1987), N is sparse if ave(N) is small such that the chi-squared approximations of the goodness-of-fit statistics are inaccurate. Radavicius and Samusenko (2012) characterize N as very sparse if the sample size (n) is less than the number of cells (IJ), that is, ave(N) < 1. Greenacre (2013) uses %(0 ∈ N) as an index of sparsity.
Another qualitative definition of sparsity is used in the Ph.D thesis of Kraus (2012), based on Agresti (2002, p.391) "contingency tables having small cell counts are said to be sparse". A quantification of this definition will be given in subsection 2.3.
As we stated in the introduction, our concept of sparseness is broader, it also includes relatively large valued counts; to quantify this aspect of sparseness we consider the batch of nonzero counts of N, and following Tukey (1977, ch.2 or p.80), we summarize them by the 5-number summary, M H1 = (min, Q1, M edian, Q3, max); where, min represents the lowest value in the batch of the positive counts, max the highest value, and, Q1, M edian and Q3 are the three quartiles (Q1 and Q3 are the two hinges in Tukey's terminology). Thus, from the 7-number summary (ave(X), %(0 ∈ X), M H1), one gets an idea on the degree of sparsity concerning its different, but complementary, aspects in a contingency table X.

Equivalence class of an observed contingency table
An important property of CA and TCA is that columns or rows with identical profiles (conditional probabilities) receive identical factor scores. The factor scores are used in the graphical displays. Moreover, merging of identical profiles does not change the results of the data analysis: This is named the principle of equivalent partitioning by Nishisato (1984); it includes the famous invariance property named principle of distributional equivalence, on which Benzécri (1973) developed CA. Formally, Nishisato's principle of equivalent partitioning is based on the following Definition 1: Let N be a contingency table of size I × J, x = (x k ) and y = (y k ) are two rows or two columns of N such that they are proportional We construct a new contingency table, N reduced , by replacing the two elements x and y in N by one element x + y, and keeping all the other columns and rows of N the same in N reduced . Then we say that the contingency tables N and N reduced are equivalent, and we write N ∼ N reduced . Thus the equivalence class of contingency tables of N is given by Given that, Ω(N) contains infinite number of contingency tables equivalent to a given N, we define its representative element by the unique contingency table M of minimal size; that is, among all elements of Ω(N), M has minimum number of rows and columns. We can easily deduce the following inequalities: ave(N) ≤ ave(M) and max(N) ≤ max(M).

Artificial example and extreme sparsity
The following contrived example illustrates the idea. Let We note that the first, second and fourth rows of N are proportional to each other, so they can be lumped together into one row, and we obtain the equivalent contingency table N 1 = 6 12 0 0 0 0 1 2 of size 2×4; its 7-number summary of sparsity is (2.6250, 50, (1, 1.5, 4, 9, 12)). Similarly, we see that the third and fourth columns of N 1 are proportional, so they can be added together, and we obtain equivalent contingency table N 2 = 6 12 0 0 0 3 of size 2 × 3. Similarly, we see that the first and second columns of N 2 are proportional, so they can be added together, and we obtain the unique representative equivalent contingency table M = 18 0 0 3 of minimal size 2 × 2. The four contingency tables N, N 1 , N 2 and M are equivalent, because they belong to Ω(N) : CA and TCA of N, N 1 , N 2 and M produce identical maps, because they have identical geometries within the mathematical framework of CA and TCA. However, we have four different 7number summaries of the sparsity: we consider the one obtained from M the most representative. We note that M is a diagonal contingency table and sparsest (most sparse), based on the following lemma, whose proof is given in the appendix.

Examples of sparse contingency data sets
Table 1 enumerates ten contingency tables and their 7-number summaries calculated on N and on M. Sections 4 and 5 provide further references to these data sets. The first data set is not sparse. For the last nine of them, which are considered to be sparse, we note that: which is another quantification of sparsity describing "contingency tables having small cell counts are said to be sparse". Furthermore, comparison of Q3 and max values highlights very long tails for sparse contingency tables, which represents the existence of relatively high-valued counts. Concerning the equivalent tables N and M, we see noticeable changes in the 7-number summaries for the two data sets 6 (Barents) and 10 (Synoptic Gospels): these two contingency tables N and M are extremely tall: the number of columns is much smaller than the number of rows; so the merging of rows essentially happened for rows having very small marginal counts of 1 or 2. For these two data sets, M can be put in the following form where D is a square diagonal matrix. We classify the data sets in Table 1 into three large groups according to our concept of sparsity: Non sparse tables: Data set 1 (TV programs) belongs to this group.
Sparse tables: the remaining eight data sets belong to this group. It is interesting to note that for Data set 10 (Synoptic Gospels): The upper bound in Lemma 1, 100(1 − 1/7) = 85.7143, is quite near to %(0 ∈ N) = 78.2%, but quite far from %(0 ∈ M) = 45%. For this reason, we characterized it as sparse and not extremely sparse. 3 Correspondence analysis and taxicab correspondence analysis: an overview Let P = N/n = (p ij ) be the associated correspondence matrix of N. We define as usual p i * = J j=1 p ij , p * j = I i=1 p ij , the vector r = (p i * ) ∈ R I , the vector c = (p * j ) ∈ R J , and D r = Diag(r) the diagonal matrix having diagonal elements p i * , and similarly D c = Diag(c). We suppose that D r and D c are positive definite metric matrices of size I × I and J × J, respectively; this means that the diagonal elements of D r and D c are strictly positive.
is the residual matrix with respect to the independence model. CA and TCA can be considered as principal components analysis for categorical data, where P or R 0 is decomposed into a sum of bilinear terms shown in equation (1).
Equation (1) is named the data reconstruction formula, and it is obtained by generalized singular value decomposition and its taxicab version with respect to the metric matrices D r and D c , see in particular Choulakian, Simonetti and Gia (2014): where f α and g α represent the principal coordinate scores of rows and columns, and σ α is the associated dispersion measure for α = 1, ..., k. Note that in both methods f α and g α are D r and D c centered respectively; that is where 1 I is a column vector of ones of size I.
In CA, f α and g α satisfy Equation (3) says that the D r weighted L 2 norm of f α is σ α ; likewise, equation (4) says that f α is D r orthogonal to f β for α = β. In CA the standard coordinate scores are f α /σ α for column profiles and g α /σ α for row profiles.

2.1: Remarks
• a) CA of P is equivalent to CA of R 0 , with diagonal weight matrices D r and D c . Analogously, TCA of P is equivalent to TCA of R 0 , with diagonal weight matrices D r and D c .
• b) In CA, the principal coordinate scores f α and g α are functions of the eigenvectors of a similarity measure between the rows or columns and more importantly the similarity measure depends on the chosen metric D r and D c . We describe the computation of f α and g α in four steps: Step 1: we calculate the matrix of Pearson residuals, Step 2: we calculate the eigenvectors x α via the eigen-equation, where the (i, j)th element of S S represents a similarity measure between the two column categories i and j.
• c) Compared to CA, TCA stays as close as possible to the original data: It directly acts on the correspondence matrix P or R 0 in the largest sense that the basic taxicab decomposition is independent of the metrics D r and D c : it is simply constructed from a sum of the signed columns or rows of the residual correspondence matrix, for further details see Choulakian (2006Choulakian ( , 2016; only the relative direction of the rows or columns is taken into account without calculating a similarity (or dissimilarity) measure between the rows or columns.
The optimization criterion is based on the famous Grothendieck problem, see Pisier (2012). The steps for the computation of the principal coordinate scores f α and g α are done iteratively for α = 1, ..., k : Step 1: we compute the principal axis where R 0 = P−rc and R α = P−rc − α β=1 D r f β g β D c /σ β for α = 1, ..., k.
• d) An interesting and useful property of the taxicab dispersion measures, σ α for α ≥ 1, is the following result well known in theoretical computer science, see Khot and Naor (2013): Lemma 2: where the cut norm of the matrix R α−1 is defined as and T ⊆ {1, ..., J} .
We know that taxicab principal axes have values ±1, that is, u α ∈ {−1, 1} J and v α ∈ {−1, 1} I for α ≥ 1. So we can represent u α = u α+ + u α− , and similarly, v α = v α+ + v α− , where Lemma 2 can be named 4-quadrants balancing property, because the taxicab dispersion measure σ α for α ≥ 1 is divided into 4 equal parts having the common value of the cut norm of R α−1 : As a corollary to this fact, we have: In TCA of P both principal coordinate scores f α and g α for α = 1, ..., k satisfy the equivariability property, see Choulakian (2008b). This means that f α and g α are equally balanced in the sense that where . This easily follows from the fact that the principal coordinate scores f α and g α are D r and D c centered, they satisfy equation (2). An informal illustrative interpretation of the equivariability property is that TCA pulls inside potential influential observations and pushes outside points around the origin, thus providing a more balanced and robust view of data.
We note that in CA the principal coordinate scores f α and g α do not satisfy the equivariability property, because they are unequally balanced in the sense that

and in general,
furthermore, A and B are not related to the dispersion measure σ α , because CA maximizes the variance of the principal coordinate scores.
• e) Given that the approach in CA and TCA is geometric, influence measure of a point (a column or a row) to the αth factor is provided by the contribution of that point to the dispersion measure of the αth factor in per 1000 units.
It is important to note that, in CA, while in TCA, from (9) we get, • f) In both methods the maps or joint displays are obtained by plotting (f α , f β ) and (g α , g β ) for α = β. Both CA and TCA have common residual transition formulas, see Choulakian (2006), and where R α is the residual correspondence matrix, and u α and v α for α = 1, ..., k are the normed principal axes and related to the principal coordinate scores g α and f α for α = 1, ..., k in the following way. In both methods In TCA u α = sgn(g α ) and v α = sgn(f α ) for α = 1, ..., k, so equations (14) and (15) become and Equations (18) and (19) help us to interpret the joint TCA maps in the following way: f α (i), the coordinate of point i on the αth axis is the signed centroid of the residual correspondence matrix within the p −1 i * constant. Analogous interpretation applies to g α (j), the coordinate of point j on the αth axis.
The joint interpretation of column and row categories in the CA map is based on the well known transition formulas Pr(j|i)g α (j)/σ α for α = 1, ..., k, and where Pr(j|i) = p ij /p i * , the conditional probability of observing j given i. Note that (21, 22) can be obtained from (14, 15) via (3,4,20). In (21), the principal coordinate score f α (i) is the weighted average (centroid) of the principal coordinate scores g α (j) within the λ −1 α constant. Analogous interpretation applies to g α (j), the coordinate of point j on the αth axis.

Data analysis
Here we carry out CA and TCA on three data sets mentioned in Table 1, and comment on the remaining. The visual comparison of CA and TCA maps shows that we can have three distinct cases: similar maps, dissimilar maps, and partially similar maps.  Benzécri (1976), where a sample of 400 individuals evaluate 13 TV programs on a likert scale from 1(excellent) to 5 (bad); also two other categories of response are included noopinion on the program and dontknow the program. The data set is not sparse. Figure 1 displays CA and TCA maps, where we see that both maps are similar and produce the same interpretation. The % of explained variation for CA (resp. for TCA) of the first two dimensions are 70.7 (resp. 78%) and 21.6 (resp (16.7); with almost equivalent cumulative value of 92.4% for CA and 94.7 for TCA. The interpretation of the first two dimensions in Figure 1 will be based on two principles: principle of dichotomy and principle of gradation.

4.1.1: Interpretation of the 1st axis
We note that C 1 (dontknow) = 700 and SC 1 (dontknow) = −500 as given at the bottom of Table 2; so the first axis represents the dichotomy between ignorance and knowledge: where the response category dontknow opposes to the 5 likert response scales; noopinion is near the origin.

4.1.2: Interpretation of the 2nd axis
The 5 Likert response categories are ordered from excellent to bad.

4.1.3: Interpretation of the TV programs
Programs 2 and 12 are considered excellent and verygood; programs 10, 11 and 9 are mostly unknown, and so on.
It is important to note that, the response category dontknow is very influential in both methods CA and TCA, and it reveals a central important feature of the data: in TCA, the category dontknow contributes only to the first axis, because it attains the maximum value of its contribution, |SC| = 500, see equation (9); but this is not the case in CA. Table 2 displays abundance data (N) of size 28 × 9 (equivalent to M of size 21 × 9), where 9 species of rodents have been counted at each of 28 sites in California. For the interested reader, we identify the 9 rodents by their scientific names: rod1=Rt.rattus, rod2=Mus.musculus, rod3=Pm.californicus, rod4=Pm.eremicus, rod5=Rs.megalotis, rod6=N.fuscipes, rod7 =N.lepida, rod8=Pg.fallax, and rod9=M.californicus. Genus abbreviations are: Rt (Rattus), Rs (Reithrodontomys), Mus (Mus), Pm (Peromyscus), Pg (Perognathus), N (Neotoma) and M (Microtus). Rattus and Mus, rodents 1 and 2, are invasive species, whereas the others are native. This data set is very interesting, because we see that it has, in particular, three specificities which characterize our concept of sparsity: rare observations, a zero-block structure and relatively high-valued cells. It is sparse based on the 7-number summary calculated in Table 1. It was proposed in 2014 as an exercise in a course on an ecology workshop in UBC in Canada; the workshop site mentions that the data set is downloaded from the web site of Quinn and Keough (2002), and it can be found at https://www.zoology.ubc.ca/˜bio501/R/workshops/workshopsmultivariate-methods/

Rodent species abundance data set
The instructor of the course suggested the analysis of this data set by CA in two rounds: In round 1 the invasive species dominate, see the CA map in Figure 2. This fact is confirmed by looking at the contibutions in Table 2, where we find C 1 (rod2) = 750, so the first axis in the CA map is dominated by rodent 2; C 2 (rod1) = 854, so the second axis is dominated by rodent 1. The highlighted subset of sites, 7-11, 14-17, 21-22, 24-25, which are completely associated only with the invasive rodents 1 and 2, characterizes the CA solution; their total weight is 84/1002 = 8.38%. The minimal matrix M has a zero-block structure and it can be reexpressed as , and the submatrix ( M 3 0 ) represents the 13 highlighted sites. We conclude that the combination of the high count cell 59 (representing 7 rare sites), the last five rows in M 3 (representing 6 rare sites), and the large zero-block in M, created this particular CA solution.
In round 2 the instructor suggested eliminating rodents 1 and 2 and their associated sites, and carrying out a second application of CA on the reduced data set representing only the native species (the CA map is not shown). Figure 2 displays the principal maps produced by CA and TCA, where the two invasive species and their associated sites are fenced by linear segments: they are completely different. It is evident that for this data the TCA map is much more informative than the corresponding CA map; further, one TCA map is as informative as two CA maps obtained from the two rounds.

Interpretation of the TCA map
Let us interpret the TCA biplot, the lower diagram in Figure 2. We note that the two invasive species are grouped and found in the first quadrant of the TCA map; further, they are associated with the 13 highlighted subset of sites that we enumerated above. The contibutions to dimensions 1 and 2 of the rodents, SC 1 and SC 2 displayed in Table 2, show that the TCA map is dominated by the four most frequent species: rodents 2, 6, 3 and 4; and each of them occupy a quadrant in the TCA map.
We conclude that in Figure 2, the CA map emphasized some particular aspects of the data set; while the TCA map revealed the central abundances in Table 2.

Macro abundance data set
This macroinvertebrate sparse abundance data set of size 197 × 40 was also considered by Greenacre (2013). Figures 3 and 4 display the CA and TCA maps: The first dimension has almost the same separation of the 40 sites, so the same interpretation; while the second dimension seems somewhat different. For this reason we labeled the map similarity partial in Table 1.

Remaining data sets
Here, we just give references for the remaining data sets listed in Table 1.
The five ecology abundance data sets numbered 3 to 7 are available in Greenacre (2013) and he discussed them in his essay. (2015) analyse Punta Milazesse and Iverjsford abundance data in archeolgy; they reproduce the data sets, provide CA and TCA maps and their interpretations. Choulakian et al. (2006) is the reference for the Synoptic Gospels textual count data; they provide CA and TCA maps and discuss their stability.

Sparsest contingency tables
Sparsest contingency tables are diagonal contingency tables, as we defined in section 2. Here, we show that CA and TCA results are completely different.

CA of sparsest contingency tables
Let N be a diagonal contingency table of size I , then it is well known, see for instance Benzécri (1973, p. 188) that CA of N produces (I − 1) dispersion measures of 1; that is, σ CA α = 1 for α = 1, ..., I − 1. So, CA shows that N is composed of I diagonal blocks. A similar result is known in spectral clustering as Fiedler's theorem, see Choulakian and de Tibeiro (2013).

TCA of sparsest contingency tables
Let P N = diag(p 1 , ..., p I ) be the correspondence matrix of a diagonal contingency table N. Then we have the following easily proven result: Corollary to Lemma 2: σ T CA 1 = 1 if and only if there is a subset S ⊂ {1, ..., I} such that i∈S p i = 0.5.

Examples
We present three exemples, two contrived and one real.

Conclusion
The fundamental aim of CA and TCA is to produce interpretable maps that reflect central contents in a data set. In this paper, first we provided a 7-number quantification of sparsity; then we showed that for sparse contingency tables CA and TCA maps can differ with positive probability, because a map produced by CA or TCA is dependent on the underlying geometry, Euclidean or Taxicab. Based on our experience, we suggest the analysis of a data set by both methods CA and TCA: Like a cubist painting where an object is painted from different angles, sometimes the views are similar, and at other times dissimilar or partially similar.
which is the upper bound. If M is a square contingency table but not diagonal, by permuting some rows and columns, it can be rearranged into a square contingency table with all diagonal cells nonzero plus some, say, α number of nondiagonal nonzero cells. Then it is evident that %(0 ∈ M) = 100(I 2 − I − α)/I 2 ≤ 100(1 − 1/I).