Skip to contents

Computes the Procrustes disparity between two matrices. This measures how different two point configurations are after optimal translation, rotation, and scaling alignment.

Usage

procrustes_disparity(X, Y)

Arguments

X

First matrix (n x p)

Y

Second matrix (n x p)

Value

Procrustes disparity value in [0, 2]

Details

The algorithm follows scipy.spatial.procrustes: 1. Center both matrices (subtract mean) 2. Normalize both matrices (divide by Frobenius norm) 3. Find optimal rotation R via SVD of X'Y 4. Return sum of squared differences after alignment

Reference: Gower, J.C. (1975). Generalized Procrustes analysis. Psychometrika, 40, 33-51.