hatvis.seriation.correspondence_order#

hatvis.seriation.correspondence_order(X)[source]#

Row and column orders from the first axis of correspondence analysis.

The scores are the first non-trivial singular vectors of \(\mathbf{D}_r^{-1/2}(\mathbf{P}-\mathbf{r}\mathbf{c}^\mathsf{T})\mathbf{D}_c^{-1/2}\), \(\mathbf{P}=\mathbf{X}/\sum X\), rescaled by \(\mathbf{D}^{-1/2}\). This is the spectral relaxation of the seriation problem and the limit of reciprocal averaging. Empty rows and columns go to the end.