pith. sign in

arxiv: 2511.08223 · v2 · pith:V2RJOR65new · submitted 2025-11-11 · 📊 stat.CO · cs.LG· cs.NA· math.NA

High-Performance Variance-Covariance Matrix Construction Using an Uncentered Gram Formulation

classification 📊 stat.CO cs.LGcs.NAmath.NA
keywords matrixgrampairwise-differenceuncenteredabsentalgebraicallyavoidingbariance
0
0 comments X
read the original abstract

Reichel (2025) defined the bariance as a pairwise-difference measure that can be rewritten in linear time using only scalar sums. We extend this idea to the covariance matrix by showing that the standard matrix expression involving the uncentered Gram matrix and a correction term is algebraically identical to the pairwise-difference definition while avoiding explicit centering. The computation then reduces to one outer product of dimension p-by-p and a single subtraction. Benchmarks in Python show clear runtime gains, especially when BLAS optimizations are absent. Optionally faster Gram-matrix routines such as RXTX (Rybin et al., 2025) further reduce overall cost.

This paper has not been read by Pith yet.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.