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

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autor principal: Reichel, Felix
Formato: Preprint
Publicado: 2025
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866918534766919680
author Reichel, Felix
author_facet Reichel, Felix
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2511_08223
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle High-Performance Variance-Covariance Matrix Construction Using an Uncentered Gram Formulation
Reichel, Felix
Computation
Machine Learning
Numerical Analysis
62H12, 62-08, 65F30, 65Y20, 15A09
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.
title High-Performance Variance-Covariance Matrix Construction Using an Uncentered Gram Formulation
topic Computation
Machine Learning
Numerical Analysis
62H12, 62-08, 65F30, 65Y20, 15A09
url https://arxiv.org/abs/2511.08223