Sinkhorn-Knopp algorithm for matrix normalisation

Normalises a matrix so that the row and column sums are all unity
385 download
Aggiornato 10 set 2015

Visualizza la licenza

The Sinkhorn-Knopp algorithm takes a matrix A and finds diagonal matrices D and E such that if M = DAE the sum of each column and each row of M is unity. The method is, in effect, to alternately normalise the rows and the columns of the matrix. This function is an efficient implementation which does not actually carry out normalisation until the iteration is complete and which does not use the transpose of A.

A must be non-negative. If there are zeros in A the algorithm may not converge, depending on their distribution. A maximum number of iterations and/or an error tolerance may be set if required.

A matrix whose rows and columns all sum to unity is termed "doubly stochastic". Such matrices have various applications, including web page ranking.

Reference:

Philip A. Knight (2008) The Sinkhorn–Knopp Algorithm: Convergence and Applications. SIAM Journal on Matrix Analysis and Applications 30(1), 261-275. doi: 10.1137/060659624

Cita come

David Young (2024). Sinkhorn-Knopp algorithm for matrix normalisation (https://www.mathworks.com/matlabcentral/fileexchange/52930-sinkhorn-knopp-algorithm-for-matrix-normalisation), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2015a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Weather and Atmospheric Science in Help Center e MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.1.0.0

Transposed R and C in output to give more natural orientation (R is column vector of row sums); simplified code.

1.0.0.0

Added checkattributes.m to zip file.