Sinkhorn-Knopp algorithm for matrix normalisation

版本 1.1.0.0 (1.9 KB) 作者: David Young
Normalises a matrix so that the row and column sums are all unity
403.0 次下载
更新时间 2015/9/10

查看许可证

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

引用格式

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. 检索时间: .

MATLAB 版本兼容性
创建方式 R2015a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Weather and Atmospheric Science 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
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.