Skip to main content
QUICK REVIEW

[Paper Review] An Online Algorithm for Nonparametric Correlations

Xiao Wei|arXiv (Cornell University)|Dec 5, 2017
Advanced Statistical Methods and ModelsMathematics8 references7 citations
TL;DR

This paper proposes the first online algorithm for computing Spearman’s rank and Kendall’s tau correlations with O(1) time and memory complexity, enabling real-time analysis on streaming data. By coarsening the bivariate distribution using a fixed-size matrix of cutpoints, the method achieves 10–1,000× speedup over batch methods while maintaining high accuracy, especially with sufficient cutpoints.

ABSTRACT

Nonparametric correlations such as Spearman's rank correlation and Kendall's tau correlation are widely applied in scientific and engineering fields. This paper investigates the problem of computing nonparametric correlations on the fly for streaming data. Standard batch algorithms are generally too slow to handle real-world big data applications. They also require too much memory because all the data need to be stored in the memory before processing. This paper proposes a novel online algorithm for computing nonparametric correlations. The algorithm has O(1) time complexity and O(1) memory cost and is quite suitable for edge devices, where only limited memory and processing power are available. You can seek a balance between speed and accuracy by changing the number of cutpoints specified in the algorithm. The online algorithm can compute the nonparametric correlations 10 to 1,000 times faster than the corresponding batch algorithm, and it can compute them based either on all past observations or on fixed-size sliding windows.

Motivation & Objective

  • To address the lack of efficient online algorithms for nonparametric correlations in streaming data environments.
  • To overcome the high computational and memory costs of batch methods, which require sorting and store all historical data.
  • To enable real-time, robust correlation computation on edge devices with limited processing and memory.
  • To provide a tunable trade-off between speed and accuracy through adjustable cutpoint selection.
  • To support both cumulative and sliding window correlation computation in dynamic, real-world applications.

Proposed method

  • The algorithm coarsens the bivariate distribution of streaming data (X, Y) into a small matrix M using user-defined cutpoints for X and Y.
  • It maintains sufficient statistics—counts of concordant/discordant pairs and tied values—within the matrix M to compute correlations incrementally.
  • For Spearman’s rank, it uses rank-based transformation of input values via cutpoints to approximate ranks.
  • For Kendall’s tau, it tracks the number of concordant (P), discordant (Q), and tied pairs (T, U) in the binned matrix M.
  • The algorithm updates correlation estimates in O(1) time per new data point by incrementally adjusting the matrix M and summary statistics.
  • Cutpoints are chosen adaptively—either as quantiles of observed data or to preserve unique values—depending on desired accuracy and data structure.

Experimental results

Research questions

  • RQ1Can nonparametric correlations be computed efficiently in real-time on data streams with bounded memory and constant time per update?
  • RQ2How accurately can online nonparametric correlation estimates approximate batch results when using binned data representations?
  • RQ3What is the impact of the number of cutpoints on the trade-off between speed and accuracy in online correlation estimation?
  • RQ4Can the proposed algorithm handle both cumulative and fixed-size sliding window correlation computation effectively?
  • RQ5How does the algorithm perform on real-world sensor data with potential outliers and non-normal distributions?

Key findings

  • The online algorithm achieves O(1) time and memory complexity, enabling deployment on resource-constrained edge devices.
  • The algorithm computes correlations 10 to 1,000 times faster than batch methods, depending on data size and configuration.
  • With 30 cutpoints, the online Spearman’s rank correlation estimate is highly accurate, even for small cutpoint counts.
  • For Kendall’s tau, accuracy improves significantly with more cutpoints—bias increases when correlations are high and data are concentrated along the diagonal.
  • Using 19 cutpoints for S1 in industrial sensor data, the algorithm achieves a 20–50× speedup for Spearman’s correlation and 5–20× for Kendall’s tau.
  • When cutpoints are set to preserve unique values (e.g., 120 for S1), the online algorithm matches batch results exactly, with substantial speedups.

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.