Matrix transformator in Python
Project description
matrixor
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)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
matrixor-1.0.7.tar.gz
(3.4 kB
view details)
File details
Details for the file matrixor-1.0.7.tar.gz
.
File metadata
- Download URL: matrixor-1.0.7.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df27d663acbfba9ff50ba77511e67d2f8d09fb3bdbdb6ad922be3b645d9915f4 |
|
MD5 | 1d65d8babcdc82897fc13793c5861737 |
|
BLAKE2b-256 | dc6c3524b519bd06e609e1c1b985422d4e9c61a8de26d19bf843f7a4499f6e3a |