Goodness-of-Fit and Clustering of Spherical Data: the QuadratiK package in R and Python
Giovanni Saraceno, Marianthi Markatou, Raktim Mukhopadhyay, Mojgan Golzy
TL;DR
QuadratiK addresses GoF testing and clustering for high-dimensional and spherical data by unifying kernel-based quadratic distances with diffusion and Poisson kernels. The main approach centers on centered diffusion kernels to build $d_K(F,G)$ test statistics for one-, two-, and k-sample problems, complemented by a Poisson-kernel-based cylinder for uniformity on the sphere and an EM-style PKBD clustering algorithm. Key contributions include efficient, parallelized GoF procedures with bandwidth selection via mid-power analysis, real-data demonstrations on public datasets, and a spherical clustering framework with comprehensive visualization and validation tools. The work facilitates robust inference across disciplines by providing accessible R and Python implementations and detailed guidance on kernel selection, critical-value computation, and cluster-number determination.
Abstract
We introduce the QuadratiK package that incorporates innovative data analysis methodologies. The presented software, implemented in both R and Python, offers a comprehensive set of goodness-of-fit tests and clustering techniques using kernel-based quadratic distances, thereby bridging the gap between the statistical and machine learning literatures. Our software implements one, two and k-sample tests for goodness of fit, providing an efficient and mathematically sound way to assess the fit of probability distributions. Expanded capabilities of our software include supporting tests for uniformity on the d-dimensional Sphere based on Poisson kernel densities. Particularly noteworthy is the incorporation of a unique clustering algorithm specifically tailored for spherical data that leverages a mixture of Poisson kernel-based densities on the sphere. Alongside this, our software includes additional graphical functions, aiding the users in validating, as well as visualizing and representing clustering results. This enhances interpretability and usability of the analysis. In summary, our R and Python packages serve as a powerful suite of tools, offering researchers and practitioners the means to delve deeper into their data, draw robust inference, and conduct potentially impactful analyses and inference across a wide array of disciplines.
