A python package that knows how to do various tricky computations related to Lie groups and manifolds (mainly the sphere S2 and rotation group SO3).
Project description
lie_learn is a python package that knows how to do various tricky computations related to Lie groups and manifolds (mainly the sphere S2 and rotation group SO3). This package was written to support various machine learning projects, such as Harmonic Exponential Families [2], (continuous) Group Equivariant Networks [3], Steerable CNNs [4] and Spherical CNNs [5].
This code was developed using an extremely agile, move-fast-and-break-things, extreme-programming software development workflow, and was extensively tested using the print command. Most of the code was written in the 72 hours preceding conference deadlines. In other words, this code is a bit of a mess, but we're releasing it anyway because it could be useful to others.
What this code can do
- Reparamterize rotations, e.g. matrix to Euler angles to quaternions, etc. (see groups & spaces modules)
- Compute the Wigner-d and Wigner-D matrices (the irreducible representations of SO(3)), and spherical harmonics, using the method developed by Pinchon & Hoggan [1] (see pinchon_hoggan_dense.py). This is a very fast and stable method, but requires a fairly large "J matrix", which we have precomputed up to order 278 using a Maple script. The code will automatically download it from Google Drive during installation. Note: There are many normalization and phase conventions for both the real and complex versions of the D-matrices and spherical harmonics, and the code can convert between a lot of them (irrep_bases.pyx).
- Compute generalized / non-commutative FFTs for the sphere S2, rotation group SO3, and special Euclidean group SE2 (see spectral module).
- Fit Harmonic Exponential Families on the sphere (probability module; not sure code is still working)
Installation
lie_learn can be installed from pypi using:
pip install lie_learn
Although cython is not a necessary dependency, if you have cython installed, cython will write new versions of the *.c
files before compiling them into *.so
during installation. To use lie_learn, you will need a c compiler which is
available to python setuptools.
Feedback
For questions and comments, feel free to contact Taco Cohen (http://ta.co.nl).
References
[1] Pinchon, D., & Hoggan, P. E. (2007). Rotation matrices for real spherical harmonics: general rotations of atomic orbitals in space-fixed axes. Journal of Physics A: Mathematical and Theoretical, 40(7), 1597–1610.
[2] Cohen, T. S., & Welling, M. (2015). Harmonic Exponential Families on Manifolds. In Proceedings of the 32nd International Conference on Machine Learning (ICML) (pp. 1757–1765).
[3] Cohen, T. S., & Welling, M. (2016). Group equivariant convolutional networks. In Proceedings of The 33rd International Conference on Machine Learning (ICML) (Vol. 48, pp. 2990–2999).
[4] Cohen, T. S., & Welling, M. (2017). Steerable CNNs. In ICLR.
[5] T.S. Cohen, M. Geiger, J. Koehler, M. Welling (2017). Convolutional Networks for Spherical Signals. In ICML Workshop on Principled Approaches to Deep Learning.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file lie_learn-0.0.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: lie_learn-0.0.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 16.6 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5ca0bacfbbf7ede6003da6555eaaa61a8baaf1c78b352e8f7cc3ea2e0f6c7b4 |
|
MD5 | 4d6b1b9e8d7621505e87fcec66ada35c |
|
BLAKE2b-256 | 0c6d41731ef3be63c7653e7e4fa4448e8d5cc2d70a36f863a48aa9b2e6138070 |
File details
Details for the file lie_learn-0.0.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: lie_learn-0.0.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 16.6 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 985cfa99ac344abba11b9381a0b7c60766db1accf23462640fb35ba35c1a789b |
|
MD5 | fb2c1adc3546a571905f878d92d18278 |
|
BLAKE2b-256 | 9286d236d87458fecdca8dc57e7473a4db14b7e138ab86184fdc39e133b2c873 |
File details
Details for the file lie_learn-0.0.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: lie_learn-0.0.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 16.5 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9bcaa0cc5ca6b9ca6b8fb551468214b52e728f58a8f63c2555b84474279ea63 |
|
MD5 | 1252cb011e1d8d65456c8df9bae58bcf |
|
BLAKE2b-256 | e8379d4aba90407b499997518e1a0dffb5575c583062be8d57a793fd1dfaf7ec |
File details
Details for the file lie_learn-0.0.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: lie_learn-0.0.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 16.5 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d838de6c5815a5fb921b71afaf8567a81647f01710c916e8fbb41d95a0f80ca3 |
|
MD5 | efe671b0b3fe91e15defb6047d2f60b7 |
|
BLAKE2b-256 | 748be87229d104e5d4c69d0c9bf33b9524b4c405a60ee5a3262cdd43e0fb2376 |