4.1. Classical Biplot
The biplot was originally introduced by Gabriel [
38] and later extended by Gower and Hand [
39] to visualize relationships between variables and observations in multivariate datasets. It has since been widely adopted across diverse fields such as ecology, chemometrics, and the social sciences, owing to its ability to provide a comprehensive graphical representation of both observations and variables simultaneously in a low-dimensional space. A more recent and comprehensive overview of biplot methods can be found in [
40].
A fundamental aspect of matrix decomposition is that any matrix with rank R can be decomposed into two matrices, () and (), such that . This decomposition enables the assignment of vectors (row markers) to each of the I rows of and vectors (column markers) to each of its J columns, thereby providing a representation of using vectors in an R-dimensional space. In the case of matrices with rank two, this representation occurs in a two-dimensional space (plane), but for higher-rank matrices, an approximation in a reduced-dimensional space (either 2 or 3 dimensions) is obtained such that .
This factorization, usually achieved by singular value decomposition (SVD), facilitates the representation of the matrix in a space of reduced dimension such that . Geometrically, this means that the projection of a row marker onto the vector representing a variable approximates the individual’s value on that variable and allows individuals to be ordered by it. Interpretation also extends to the angles formed by two variables or the distances between individuals. The angles between variables in a biplot represent their correlations or associations. If two variables form a small angle, this indicates a strong positive correlation between them, while a large angle indicates a weaker or negative correlation. The distances between individuals (observations) in a biplot reflect their similarities or dissimilarities based on the values of the variables. Closer distances indicate greater similarity, while further distances indicate greater dissimilarity.
4.2. Logistic Biplot
While classical linear biplots approximate the data matrix by factorizing its expected values into the product of two low-rank matrices, logistic biplots extend this framework to model binary data by linking the expected probabilities to a low-dimensional representation through the logit function.
This extension was initially proposed by Vicente-Villardón et al. [
29] as an adaptation of classical biplots for binary data matrices. Further methodological developments have been introduced in subsequent years, including enhancements for logistic biplots by Demey et al. [
30] and Babativa-Márquez and Vicente-Villardón [
41]. In addition, related biplot techniques have been formulated for other types of categorical data, such as ordinal data [
42] and nominal data [
43]. A detailed description and further applications of logistic biplots can also be found in Vicente-Gonzalez and Vicente-Villardon [
25], Vicente-Gonzalez et al. [
26].
Given a binary matrix
and its expected value
, we have that
Aside from the constant vector
, which is necessary because binary matrices cannot be centered, this equation yields a biplot on a logit scale
and these logit values can then be converted into estimated probabilities using the inverse logit (logistic) function, allowing for a probabilistic interpretation of the biplot.
By projecting the row coordinate onto the column vector , one obtains—up to an additive constant—the expected value on the logit scale for the entry in the matrix . This constant, , shifts the logit function to determine the threshold at which the logit equals zero or any specified value, and thus adjusts the corresponding probability accordingly.
The geometry of the logistic biplot is similar to that of the continuous biplot, with the distinction that it predicts probabilities. Projecting the row markers onto column markers yields the expected probability for each entry. In this case, it is necessary that the column vectors be accompanied by scales indicating the probabilities. Sometimes, reduced prediction scales are employed to simplify the presentation, where a dot represents a probability of and an arrow represents a probability of . This approach not only reveals the direction in which the probability increases but also offers insights into discriminant power, with shorter arrows typically signifying lower discriminant power of the associated variable.
To illustrate the interpretability of the logistic biplot, we use a subset of the Mushroom dataset from the UCI Machine Learning Repository [
44]. This dataset contains categorical information about physical characteristics of mushroom species, including shape, color, surface, and odor. For this example, we select only the variables related to the cap and gill features of the mushrooms, such as cap shape, cap surface, cap color, bruises, odor, gill attachment, gill spacing, gill size, and gill color. All variables are transformed into binary indicators.
Using this subset of data, we construct a logistic biplot, which provides a joint representation of the rows and columns of the data matrix in a two-dimensional space. This visualization summarizes the structure of the data, allowing for simultaneous interpretation of both individuals and variables. Mushrooms that appear close to each other in the plot share similar profiles based on the selected characteristics.
The angles between variable vectors can be interpreted as indicative of the correlation between them. Acute angles suggest a strong positive association, whereas right or near-right angles indicate little to no correlation. Conversely, obtuse angles imply a strong negative relationship between the corresponding variables.
To provide an initial visualization of the data structure and its relationship with the selected characteristics, we construct a reduced logistic biplot (
Figure 1). The Mushroom dataset contains 8124 samples (individual mushrooms), each represented as a point in the plot. The arrows correspond to the binary variables related to cap and gill features, and indicate the direction in which the probability of the corresponding characteristic increases. The arrows are drawn from a baseline probability of 0.5 up to 0.75.
Although the overall cloud of points does not reveal clearly separated clusters, valuable insights can still be drawn from the relationships between individuals and variables. In particular, several characteristics appear to be unlikely for the majority of mushrooms, as indicated by the direction and length of the corresponding vectors. Among these, the following traits stand out as particularly improbable:
gill_color: green, red, orange, and yellow
cap_shape: sunken and bell
cap_color: pink, white, and cinnamon
odor: creosote and musty
gill_spacing: crowded
In a logistic biplot, the expected probability of presence for each characteristic can be approximated by projecting each individual (point) orthogonally onto the corresponding arrow. The point marked on each arrow indicates the location where the predicted probability is 0.5, which typically serves as a threshold for classification. Individuals projected beyond this point, in the direction of the arrow, are expected to exhibit the characteristic, while those projected before it are expected not to.
These types of visual representations can be generated using the MultibiplotR package [
45], which provides flexible tools for constructing logistic biplots. In addition to plotting individuals and variables jointly, the package allows for the projection of observations onto variable directions to estimate predicted probabilities. It also supports the visualization of cluster structures overlaid on the biplot, enhancing the interpretability of complex patterns in multivariate data.
To facilitate the interpretation of relationships between variables, we present a second biplot focused exclusively on the variables, omitting the representation of individual observations. This version includes reference scales along the arrows to support a more precise understanding of the underlying geometry. Only variables with a representation quality above 85% on the first two dimensions are included in the plot.
It is important to note that the underlying computations are performed using the full dataset and the complete set of variables. However, restricting the graphical representation to a subset of well-represented variables results in a cleaner, more interpretable plot that highlights the most informative patterns.
The scaled logistic biplot focusing on variable relationships (
Figure 2) reveals several distinct association patterns. A strong and direct relationship is observed between the variables odor_fishy and odor_pungent, indicating that these two odor types tend to co-occur. Both are also strongly and inversely associated with cap_color_purple, suggesting that mushrooms with either a fishy or pungent odor are unlikely to exhibit a purple cap color.
Additionally, odor_fishy and odor_pungent show moderate direct associations with gill_color_purple, gill_color_pink, and cap_shape_bell. At the same time, they exhibit moderate inverse associations with gill_spacing_crowded, gill_color_yellow, and cap_color_cinnamon, reinforcing a coherent pattern of mutual relationships across multiple morphological features.
Another interesting pattern emerges between cap_color_white and gill_color_purple, which show a very strong inverse association. This suggests that mushrooms with a white cap are highly unlikely to have purple gills, reflecting a mutually exclusive relationship between these two traits.
A separate and distinct group of variables emerges, centered around gill_color_red, which is strongly and directly associated with gill_color_green and cap_shape_sunken, and inversely associated with gill_color_gray. This second cluster of variables appears to be largely independent from the first group described above, as indicated by the approximate orthogonality of the corresponding vectors in the biplot.
In summary, the variable-focused logistic biplot provides a clear and interpretable geometric representation of the main relationships among morphological traits in the dataset. By focusing on variables with high representation quality and excluding individual observations, the visualization emphasizes the most relevant patterns and potential biological constraints. This exploratory insight lays the foundation for more targeted analyses or for guiding future model refinement using real-world data.