sinkhorn_knopp
--------
[](https://travis-ci.org/btaba/sinkhorn_knopp)
To convert non-negative square matrices with total support into doubly stochastic matrices.
```python
>> import numpy as np
>> from sinkhorn_knopp import sinkhorn_knopp as skp
>> sk = skp.SinkhornKnopp()
>> P = [[.011, .15], [1.71, .1]]
>> P_ds = sk.fit(P)
>> 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 http://msp.org/pjm/1967/21-2/pjm-v21-n2-p14-s.pdf for reference.
## Install
Either:
```sh
pip install sinkhorn_knopp
```
or
```sh
git clone https://github.com/btaba/sinkhorn_knopp
cd sinkhorn_knopp
python setup.py install
```
## Uninstall
Depending on the above, either:
```sh
pip uninstall sinkhorn_knopp
```
or
```sh
cd sinkhorn_knopp
python setup.py install --record files.txt
cat files.txt | xargs rm -rf
```
--------
[](https://travis-ci.org/btaba/sinkhorn_knopp)
To convert non-negative square matrices with total support into doubly stochastic matrices.
```python
>> import numpy as np
>> from sinkhorn_knopp import sinkhorn_knopp as skp
>> sk = skp.SinkhornKnopp()
>> P = [[.011, .15], [1.71, .1]]
>> P_ds = sk.fit(P)
>> 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 http://msp.org/pjm/1967/21-2/pjm-v21-n2-p14-s.pdf for reference.
## Install
Either:
```sh
pip install sinkhorn_knopp
```
or
```sh
git clone https://github.com/btaba/sinkhorn_knopp
cd sinkhorn_knopp
python setup.py install
```
## Uninstall
Depending on the above, either:
```sh
pip uninstall sinkhorn_knopp
```
or
```sh
cd sinkhorn_knopp
python setup.py install --record files.txt
cat files.txt | xargs rm -rf
```
Metadata
Release files for sinkhorn_knopp 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sinkhorn_knopp-0.2.tar.gz | 4.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sinkhorn_knopp-0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.4 kB
Release files / sinkhorn_knopp-0.2.tar.gz
| Download URL | sinkhorn_knopp-0.2.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6fbfb658c1d85320071f2f893b25eef853cf5d2dd9bd8d2c9af880c52c356040
|
|
BLAKE2b-256 checksum How to use checksums |
a7fbf1654100121230fb127bad6063ded3031c44b242293553f5c89d8154365e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / sinkhorn_knopp-0.2-py3-none-any.whl
| Download URL | sinkhorn_knopp-0.2-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d40b3ad2848aecdf60b021ca0179ae64ce5fad87d39eab1b6e679a0a8f8eb96b
|
|
BLAKE2b-256 checksum How to use checksums |
4a10e53ddd706975d98b25c84e721e6a506297992a51f75bffca4b6f159aefa8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for sinkhorn_knopp 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.