Skip to main content
QUICK REVIEW

[Paper Review] Selective inference for k-means clustering

Yiqun T. Chen, Daniela Witten|PubMed|Mar 29, 2022
Single-cell and spatial transcriptomicsBiochemistry, Genetics and Molecular Biology30 references23 citations
TL;DR

The paper develops a finite-sample selective inference p-value for testing the difference in means between two clusters identified by k-means, ensuring selective Type I error control without data-splitting.

ABSTRACT

We consider the problem of testing for a difference in means between clusters of observations identified via <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>k</mml:mi></mml:math>-means clustering. In this setting, classical hypothesis tests lead to an inflated Type I error rate. In recent work, Gao et al. (2022) considered a related problem in the context of hierarchical clustering. Unfortunately, their solution is highly-tailored to the context of hierarchical clustering, and thus cannot be applied in the setting of <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>k</mml:mi></mml:math>-means clustering. In this paper, we propose a p-value that conditions on all of the intermediate clustering assignments in the <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>k</mml:mi></mml:math>-means algorithm. We show that the p-value controls the selective Type I error for a test of the difference in means between a pair of clusters obtained using <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>k</mml:mi></mml:math>-means clustering in finite samples, and can be efficiently computed. We apply our proposal on hand-written digits data and on single-cell RNA-sequencing data.

Motivation & Objective

  • Motivate testing for mean differences between clusters defined by data-driven clustering.
  • Address inflation of Type I error when cluster-based hypotheses are tested.
  • Develop a finite-sample selective inference framework for k-means clustering.
  • Provide an exact p-value computation that conditions on the clustering outcome.

Proposed method

  • Formulate the null hypothesis H0: μ^T ν = 0 for the difference between two estimated clusters from k-means.
  • Develop a selective p-value p_selective that conditions on the entire clustering path generated by the k-means algorithm.
  • Show that p_selective equals the survival function of a scaled χ_q variable truncated to a set S_T.
  • Provide an extension to non-spherical covariance via whitening or a known Σ, with adjusted p-values p_{Σ,selective}.
  • Discuss handling unknown variance σ by using a consistent estimator and corresponding adjusted p-values.
  • Implement the approach in the R package KmeansInference and provide reproducible code.

Experimental results

Research questions

  • RQ1Can a finite-sample, selective-inference-based p-value be constructed for testing mean differences between clusters obtained via k-means?
  • RQ2Does conditioning on the entire k-means clustering path control selective Type I error under H0?
  • RQ3How can the selective p-value be computed efficiently, and does it extend to non-spherical covariance structures and unknown variance?
  • RQ4Is the method practically applicable to real data sets (e.g., hand-written digits, single-cell RNA-seq) for valid inference after clustering?

Key findings

  • The naive test ignoring clustering leads to inflated Type I error.
  • The proposed p_selective controls the selective Type I error at level α.
  • The p-value can be computed as a truncated survival function of a scaled χ_q variable, requiring characterization of the set S_T.
  • Extensions allow non-spherical covariance via whitening or known Σ, with adjusted p-values p_{Σ,selective}.
  • Unknown σ can be accommodated with a consistent estimator, yielding asymptotic selective Type I error control.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.