Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Sinkhorn-Knopp Algorithm

Project Description

To convert non-negative square matrices with total support into doubly stochastic matrices.

>> import numpy as np
>> from sinkhorn_knopp import sinkhorn_knopp as skp
>> sk = skp.SinkhornKnopp()
>> P = [[.011, .15], [1.71, .1]]
>> P_ds =
>> print P_ds
[[ 0.06102561 0.93897439]
[ 0.93809928 0.06190072]]
>> print np.sum(P_ds, axis=0)
[ 0.99912489 1.00087511]
>> print np.sum(P_ds, axis=1)
[ 1., 1.]

See for reference.
Release History

Release History

This version
History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
sinkhorn_knopp-0.1.tar.gz (3.9 kB) Copy SHA256 Checksum SHA256 Source Apr 3, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting