[Paper Review] Clustering transformed compositional data using K-means, with applications in gene expression and bicycle sharing system data
This paper proposes a K-means clustering strategy for compositional data using data transformations—specifically the Centered Log Ratio (CLR) and a novel Log Centered Log Ratio (logCLR)—to improve clustering performance in gene expression and bicycle sharing data. The method outperforms untransformed data by better handling zero or near-zero values and uses a nonasymptotic penalized criterion with slope heuristics to select the optimal number of clusters.
Although there is no shortage of clustering algorithms proposed in the literature, the question of the most relevant strategy for clustering compositional data (i.e., data made up of profiles, whose rows belong to the simplex) remains largely unexplored in cases where the observed value of an observation is equal or close to zero for one or more samples. This work is motivated by the analysis of two sets of compositional data, both focused on the categorization of profiles but arising from considerably different applications: (1) identifying groups of co-expressed genes from high-throughput RNA sequencing data, in which a given gene may be completely silent in one or more experimental conditions; and (2) finding patterns in the usage of stations over the course of one week in the Velib' bicycle sharing system in Paris, France. For both of these applications, we focus on the use of appropriately chosen data transformations, including the Centered Log Ratio and a novel extension we propose called the Log Centered Log Ratio, in conjunction with the K-means algorithm. We use a nonasymptotic penalized criterion, whose penalty is calibrated with the slope heuristics, to select the number of clusters present in the data. Finally, we illustrate the performance of this clustering strategy, which is implemented in the Bioconductor package coseq, on both the gene expression and bicycle sharing system data.
Motivation & Objective
- Address the lack of systematic strategies for clustering compositional data, especially when values are zero or near-zero.
- Investigate the impact of data transformations on K-means clustering performance in compositional data settings.
- Propose a novel transformation, the Log Centered Log Ratio (logCLR), to enhance separation of edge-case observations near the simplex vertices.
- Select the optimal number of clusters using a nonasymptotic penalized criterion calibrated via slope heuristics.
- Demonstrate the method’s effectiveness on real-world datasets: RNA-seq gene expression and Velib’ bicycle sharing system data.
Proposed method
- Apply K-means clustering with Euclidean distance on three data forms: untransformed compositional data, CLR-transformed data, and logCLR-transformed data.
- Introduce the logCLR transformation as a modification of CLR that improves separation of profiles with near-zero components.
- Use a nonasymptotic penalized criterion (e.g., BIC-like) with slope heuristics to select the number of clusters, avoiding overfitting.
- Implement the full pipeline in the Bioconductor package coseq for reproducible analysis of compositional data.
- Evaluate clustering results using profile visualization and spatial mapping (e.g., geographic station clusters in Paris).
- Compare results across transformations to determine which best captures biologically or behaviorally meaningful groupings.

Experimental results
Research questions
- RQ1How do different data transformations—untransformed, CLR, and logCLR—affect K-means clustering performance on compositional data with zero or near-zero values?
- RQ2Can the proposed logCLR transformation better capture highly specific or edge-case compositional profiles compared to standard CLR?
- RQ3What is the optimal number of clusters in compositional data when the true structure includes sparse or vertex-located profiles?
- RQ4How well does the slope heuristic-based penalized criterion select the number of clusters in real-world compositional datasets?
- RQ5To what extent can clustering results be interpreted in terms of real-world patterns, such as gene co-expression or urban mobility behavior?
Key findings
- The logCLR transformation yielded the most satisfactory clustering results across both the RNA-seq and Velib’ bicycle sharing datasets, particularly in identifying distinct, behaviorally coherent user or gene profiles.
- Cluster profiles from the Velib’ data showed strong spatial coherence with known urban districts: e.g., Cluster 3 in the city center, Cluster 7 in residential areas, and Cluster 11 in high-elevation V+ stations with overnight redistribution needs.
- The K-means algorithm with logCLR transformation successfully identified biologically meaningful co-expression groups in RNA-seq data, even when some genes were silent in certain conditions.
- The nonasymptotic penalized criterion with slope heuristics provided reliable cluster number selection, avoiding overfitting and supporting robust model choice.
- The method’s results were comparable to using χ² distance on raw counts, suggesting that CLR/logCLR transformations are effective alternatives for compositional data clustering.
- The logCLR transformation was especially effective in separating profiles with near-zero components, outperforming both untransformed and standard CLR approaches in edge-case detection.

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.