Sinkhorn-Knopp algorithm for matrix normalisation

Normalises a matrix so that the row and column sums are all unity
385 téléchargements
Mise à jour 10 sept. 2015

Afficher la licence

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

Citation pour cette source

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. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2015a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Weather and Atmospheric Science dans Help Center et MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
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.