Skip to main content

matrixor

GitHub release PyPI release Build MIT License

Matrix transformations in Python. Implements algorithm 2.4 (AO+Scaling) of the paper:

@article{devetal2018,
    title={{Absolute Orientation for Word Embedding Alignment}},
    author={Sunipa Dev and Safia Hassan and Jeff M. Phillips},
    journal={CoRR},
    year={2018},
    volume={abs/1806.01330}
}

Install

pip install matrixor

or, after a git clone:

python3 setup.py install

Run

Align two models with Absolute Orientation + Scaling and return RMSE

To align two embeddings, run:

matrixor align \
  --matrix-1 /abs/path/to/xxx.vec.npy  \
  --matrix-2 /abs/path/to/yyy.vec.npy \

pass in the --average to return the averaged RMSE by aligning A and B then B and A (alignment may not be symmetric due to floating point average)

Metadata

Release files for matrixor 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for matrixor 1.0.7
File Size Uploaded Provenance Actions
matrixor-1.0.7.tar.gz 3.4 kB Without provenance Details for matrixor-1.0.7.tar.gz

Release files / matrixor-1.0.7.tar.gz

Download URL matrixor-1.0.7.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
df27d663acbfba9ff50ba77511e67d2f8d09fb3bdbdb6ad922be3b645d9915f4
BLAKE2b-256 checksum
How to use checksums
dc6c3524b519bd06e609e1c1b985422d4e9c61a8de26d19bf843f7a4499f6e3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.5

Security for matrixor 1.0.7

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page