geometric_kernels 0.2.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. geometric_kernels-0.2.3/.flake8 +11 -0
  2. geometric_kernels-0.2.3/.gitattributes +1 -0
  3. geometric_kernels-0.2.3/.github/ISSUE_TEMPLATE/bugs-performance-issues.md +41 -0
  4. geometric_kernels-0.2.3/.github/ISSUE_TEMPLATE/doc-issue.md +19 -0
  5. geometric_kernels-0.2.3/.github/ISSUE_TEMPLATE/feature-request.md +32 -0
  6. geometric_kernels-0.2.3/.github/ISSUE_TEMPLATE/other-issue.md +4 -0
  7. geometric_kernels-0.2.3/.github/workflows/docs.yaml +45 -0
  8. geometric_kernels-0.2.3/.github/workflows/publish-pypi.yaml +27 -0
  9. geometric_kernels-0.2.3/.github/workflows/quality-checks.yaml +37 -0
  10. geometric_kernels-0.2.3/.gitignore +144 -0
  11. geometric_kernels-0.2.3/CHANGELOG.md +65 -0
  12. geometric_kernels-0.2.3/CITATION.bib +6 -0
  13. geometric_kernels-0.2.3/CITATION.cff +29 -0
  14. geometric_kernels-0.2.3/CODE_OF_CONDUCT.md +127 -0
  15. geometric_kernels-0.2.3/CONTRIBUTING.md +79 -0
  16. geometric_kernels-0.2.3/LICENSE +201 -0
  17. geometric_kernels-0.2.3/Makefile +38 -0
  18. geometric_kernels-0.2.3/PKG-INFO +199 -0
  19. geometric_kernels-0.2.3/README.md +169 -0
  20. geometric_kernels-0.2.3/docs/Makefile +20 -0
  21. geometric_kernels-0.2.3/docs/README.md +13 -0
  22. geometric_kernels-0.2.3/docs/_static/css/bootstrap.css +11266 -0
  23. geometric_kernels-0.2.3/docs/_static/css/bootstrap_namespaced.css +9827 -0
  24. geometric_kernels-0.2.3/docs/_static/css/bootstrap_namespaced.less +3 -0
  25. geometric_kernels-0.2.3/docs/_static/scripts/bootstrap.min.js +7 -0
  26. geometric_kernels-0.2.3/docs/bibliography.rst +6 -0
  27. geometric_kernels-0.2.3/docs/conf.py +185 -0
  28. geometric_kernels-0.2.3/docs/examples/Graph.nblink +1 -0
  29. geometric_kernels-0.2.3/docs/examples/Hyperbolic.nblink +1 -0
  30. geometric_kernels-0.2.3/docs/examples/HypercubeGraph.nblink +1 -0
  31. geometric_kernels-0.2.3/docs/examples/Hypersphere.nblink +1 -0
  32. geometric_kernels-0.2.3/docs/examples/Mesh.nblink +1 -0
  33. geometric_kernels-0.2.3/docs/examples/SPD.nblink +1 -0
  34. geometric_kernels-0.2.3/docs/examples/SpecialOrthogonal.nblink +1 -0
  35. geometric_kernels-0.2.3/docs/examples/SpecialUnitary.nblink +1 -0
  36. geometric_kernels-0.2.3/docs/examples/Torus.nblink +1 -0
  37. geometric_kernels-0.2.3/docs/examples/backends/JAX_Graph.nblink +1 -0
  38. geometric_kernels-0.2.3/docs/examples/backends/PyTorch_Graph.nblink +1 -0
  39. geometric_kernels-0.2.3/docs/examples/backends/TensorFlow_Graph.nblink +1 -0
  40. geometric_kernels-0.2.3/docs/examples/examples.rst +47 -0
  41. geometric_kernels-0.2.3/docs/examples/frontends/GPJax.nblink +1 -0
  42. geometric_kernels-0.2.3/docs/examples/frontends/GPflow.nblink +1 -0
  43. geometric_kernels-0.2.3/docs/examples/frontends/GPyTorch.nblink +1 -0
  44. geometric_kernels-0.2.3/docs/examples/index.rst +10 -0
  45. geometric_kernels-0.2.3/docs/examples/introduction.rst +7 -0
  46. geometric_kernels-0.2.3/docs/examples/other/Bayesian Optimization.nblink +1 -0
  47. geometric_kernels-0.2.3/docs/examples/other/Hyperbolic Approximations.nblink +1 -0
  48. geometric_kernels-0.2.3/docs/examples/other/SPD Approximations.nblink +1 -0
  49. geometric_kernels-0.2.3/docs/index.rst +424 -0
  50. geometric_kernels-0.2.3/docs/make.bat +35 -0
  51. geometric_kernels-0.2.3/docs/references.bib +155 -0
  52. geometric_kernels-0.2.3/docs/requirements.txt +10 -0
  53. geometric_kernels-0.2.3/docs/theory/addition_theorem.rst +79 -0
  54. geometric_kernels-0.2.3/docs/theory/compact.rst +58 -0
  55. geometric_kernels-0.2.3/docs/theory/feature_maps.rst +43 -0
  56. geometric_kernels-0.2.3/docs/theory/graphs.rst +91 -0
  57. geometric_kernels-0.2.3/docs/theory/hypercube_graph.rst +108 -0
  58. geometric_kernels-0.2.3/docs/theory/index.rst +16 -0
  59. geometric_kernels-0.2.3/docs/theory/meshes.rst +61 -0
  60. geometric_kernels-0.2.3/docs/theory/product_kernels.rst +41 -0
  61. geometric_kernels-0.2.3/docs/theory/product_spaces.rst +55 -0
  62. geometric_kernels-0.2.3/docs/theory/symmetric.rst +99 -0
  63. geometric_kernels-0.2.3/geometric_kernels/__init__.py +43 -0
  64. geometric_kernels-0.2.3/geometric_kernels/_logging.py +61 -0
  65. geometric_kernels-0.2.3/geometric_kernels/feature_maps/__init__.py +18 -0
  66. geometric_kernels-0.2.3/geometric_kernels/feature_maps/base.py +19 -0
  67. geometric_kernels-0.2.3/geometric_kernels/feature_maps/deterministic.py +81 -0
  68. geometric_kernels-0.2.3/geometric_kernels/feature_maps/probability_densities.py +526 -0
  69. geometric_kernels-0.2.3/geometric_kernels/feature_maps/random_phase.py +235 -0
  70. geometric_kernels-0.2.3/geometric_kernels/feature_maps/rejection_sampling.py +219 -0
  71. geometric_kernels-0.2.3/geometric_kernels/frontends/__init__.py +8 -0
  72. geometric_kernels-0.2.3/geometric_kernels/frontends/gpflow.py +147 -0
  73. geometric_kernels-0.2.3/geometric_kernels/frontends/gpjax.py +156 -0
  74. geometric_kernels-0.2.3/geometric_kernels/frontends/gpytorch.py +162 -0
  75. geometric_kernels-0.2.3/geometric_kernels/jax.py +16 -0
  76. geometric_kernels-0.2.3/geometric_kernels/kernels/__init__.py +17 -0
  77. geometric_kernels-0.2.3/geometric_kernels/kernels/base.py +138 -0
  78. geometric_kernels-0.2.3/geometric_kernels/kernels/feature_map.py +138 -0
  79. geometric_kernels-0.2.3/geometric_kernels/kernels/karhunen_loeve.py +219 -0
  80. geometric_kernels-0.2.3/geometric_kernels/kernels/matern_kernel.py +354 -0
  81. geometric_kernels-0.2.3/geometric_kernels/kernels/product.py +152 -0
  82. geometric_kernels-0.2.3/geometric_kernels/lab_extras/__init__.py +10 -0
  83. geometric_kernels-0.2.3/geometric_kernels/lab_extras/extras.py +379 -0
  84. geometric_kernels-0.2.3/geometric_kernels/lab_extras/jax/__init__.py +1 -0
  85. geometric_kernels-0.2.3/geometric_kernels/lab_extras/jax/extras.py +263 -0
  86. geometric_kernels-0.2.3/geometric_kernels/lab_extras/numpy/__init__.py +2 -0
  87. geometric_kernels-0.2.3/geometric_kernels/lab_extras/numpy/extras.py +252 -0
  88. geometric_kernels-0.2.3/geometric_kernels/lab_extras/numpy/sparse_extras.py +94 -0
  89. geometric_kernels-0.2.3/geometric_kernels/lab_extras/tensorflow/__init__.py +1 -0
  90. geometric_kernels-0.2.3/geometric_kernels/lab_extras/tensorflow/extras.py +269 -0
  91. geometric_kernels-0.2.3/geometric_kernels/lab_extras/torch/__init__.py +1 -0
  92. geometric_kernels-0.2.3/geometric_kernels/lab_extras/torch/extras.py +270 -0
  93. geometric_kernels-0.2.3/geometric_kernels/resources/__init__.py +0 -0
  94. geometric_kernels-0.2.3/geometric_kernels/resources/precomputed_characters.json +367 -0
  95. geometric_kernels-0.2.3/geometric_kernels/sampling/__init__.py +7 -0
  96. geometric_kernels-0.2.3/geometric_kernels/sampling/samplers.py +126 -0
  97. geometric_kernels-0.2.3/geometric_kernels/spaces/__init__.py +21 -0
  98. geometric_kernels-0.2.3/geometric_kernels/spaces/base.py +317 -0
  99. geometric_kernels-0.2.3/geometric_kernels/spaces/circle.py +198 -0
  100. geometric_kernels-0.2.3/geometric_kernels/spaces/eigenfunctions.py +349 -0
  101. geometric_kernels-0.2.3/geometric_kernels/spaces/graph.py +200 -0
  102. geometric_kernels-0.2.3/geometric_kernels/spaces/hyperbolic.py +183 -0
  103. geometric_kernels-0.2.3/geometric_kernels/spaces/hypercube_graph.py +282 -0
  104. geometric_kernels-0.2.3/geometric_kernels/spaces/hypersphere.py +267 -0
  105. geometric_kernels-0.2.3/geometric_kernels/spaces/lie_groups.py +312 -0
  106. geometric_kernels-0.2.3/geometric_kernels/spaces/mesh.py +227 -0
  107. geometric_kernels-0.2.3/geometric_kernels/spaces/product.py +561 -0
  108. geometric_kernels-0.2.3/geometric_kernels/spaces/so.py +370 -0
  109. geometric_kernels-0.2.3/geometric_kernels/spaces/spd.py +157 -0
  110. geometric_kernels-0.2.3/geometric_kernels/spaces/su.py +280 -0
  111. geometric_kernels-0.2.3/geometric_kernels/tensorflow.py +17 -0
  112. geometric_kernels-0.2.3/geometric_kernels/torch.py +17 -0
  113. geometric_kernels-0.2.3/geometric_kernels/utils/__init__.py +3 -0
  114. geometric_kernels-0.2.3/geometric_kernels/utils/kernel_formulas/__init__.py +14 -0
  115. geometric_kernels-0.2.3/geometric_kernels/utils/kernel_formulas/euclidean.py +103 -0
  116. geometric_kernels-0.2.3/geometric_kernels/utils/kernel_formulas/hyperbolic.py +198 -0
  117. geometric_kernels-0.2.3/geometric_kernels/utils/kernel_formulas/hypercube_graph.py +52 -0
  118. geometric_kernels-0.2.3/geometric_kernels/utils/kernel_formulas/spd.py +127 -0
  119. geometric_kernels-0.2.3/geometric_kernels/utils/manifold_utils.py +166 -0
  120. geometric_kernels-0.2.3/geometric_kernels/utils/product.py +97 -0
  121. geometric_kernels-0.2.3/geometric_kernels/utils/special_functions.py +111 -0
  122. geometric_kernels-0.2.3/geometric_kernels/utils/utils.py +358 -0
  123. geometric_kernels-0.2.3/geometric_kernels/version.py +5 -0
  124. geometric_kernels-0.2.3/notebooks/Graph.ipynb +882 -0
  125. geometric_kernels-0.2.3/notebooks/Hyperbolic.ipynb +817 -0
  126. geometric_kernels-0.2.3/notebooks/HypercubeGraph.ipynb +771 -0
  127. geometric_kernels-0.2.3/notebooks/Hypersphere.ipynb +783 -0
  128. geometric_kernels-0.2.3/notebooks/Mesh.ipynb +870 -0
  129. geometric_kernels-0.2.3/notebooks/SPD.ipynb +649 -0
  130. geometric_kernels-0.2.3/notebooks/SpecialOrthogonal.ipynb +869 -0
  131. geometric_kernels-0.2.3/notebooks/SpecialUnitary.ipynb +927 -0
  132. geometric_kernels-0.2.3/notebooks/Torus.ipynb +1206 -0
  133. geometric_kernels-0.2.3/notebooks/backends/JAX_Graph.ipynb +918 -0
  134. geometric_kernels-0.2.3/notebooks/backends/PyTorch_Graph.ipynb +918 -0
  135. geometric_kernels-0.2.3/notebooks/backends/TensorFlow_Graph.ipynb +920 -0
  136. geometric_kernels-0.2.3/notebooks/data/bunny.obj +13351 -0
  137. geometric_kernels-0.2.3/notebooks/data/icosphere.obj +15544 -0
  138. geometric_kernels-0.2.3/notebooks/data/teddy.obj +4790 -0
  139. geometric_kernels-0.2.3/notebooks/frontends/GPJax.ipynb +667 -0
  140. geometric_kernels-0.2.3/notebooks/frontends/GPflow.ipynb +594 -0
  141. geometric_kernels-0.2.3/notebooks/frontends/GPyTorch.ipynb +677 -0
  142. geometric_kernels-0.2.3/notebooks/other/Bayesian Optimization.ipynb +768 -0
  143. geometric_kernels-0.2.3/notebooks/other/Hyperbolic Approximations.ipynb +705 -0
  144. geometric_kernels-0.2.3/notebooks/other/SPD Approximations.ipynb +576 -0
  145. geometric_kernels-0.2.3/pyproject.toml +61 -0
  146. geometric_kernels-0.2.3/scripts/add_toc.py +87 -0
  147. geometric_kernels-0.2.3/scripts/compute_characters.py +336 -0
  148. geometric_kernels-0.2.3/scripts/increment_header_levels.py +48 -0
  149. geometric_kernels-0.2.3/scripts/nblinks_for_ipynbs.py +60 -0
  150. geometric_kernels-0.2.3/test_requirements-3.10.txt +26 -0
  151. geometric_kernels-0.2.3/test_requirements-3.11.txt +26 -0
  152. geometric_kernels-0.2.3/test_requirements-3.8.txt +25 -0
  153. geometric_kernels-0.2.3/test_requirements-3.9.txt +25 -0
  154. geometric_kernels-0.2.3/test_requirements.txt +20 -0
  155. geometric_kernels-0.2.3/tests/__init__.py +4 -0
  156. geometric_kernels-0.2.3/tests/data.py +47 -0
  157. geometric_kernels-0.2.3/tests/feature_maps/__init__.py +0 -0
  158. geometric_kernels-0.2.3/tests/feature_maps/test_feature_maps.py +76 -0
  159. geometric_kernels-0.2.3/tests/feature_maps/test_student_t_sample.py +32 -0
  160. geometric_kernels-0.2.3/tests/helper.py +235 -0
  161. geometric_kernels-0.2.3/tests/kernels/__init__.py +0 -0
  162. geometric_kernels-0.2.3/tests/kernels/test_feature_map_kernel.py +123 -0
  163. geometric_kernels-0.2.3/tests/kernels/test_matern_karhunenloeve_kernel.py +192 -0
  164. geometric_kernels-0.2.3/tests/kernels/test_product_kernel.py +46 -0
  165. geometric_kernels-0.2.3/tests/sampling/__init__.py +0 -0
  166. geometric_kernels-0.2.3/tests/sampling/test_samplers.py +34 -0
  167. geometric_kernels-0.2.3/tests/spaces/__init__.py +0 -0
  168. geometric_kernels-0.2.3/tests/spaces/test_basics.py +52 -0
  169. geometric_kernels-0.2.3/tests/spaces/test_circle.py +54 -0
  170. geometric_kernels-0.2.3/tests/spaces/test_eigenfunctions.py +202 -0
  171. geometric_kernels-0.2.3/tests/spaces/test_eigenvalues.py +54 -0
  172. geometric_kernels-0.2.3/tests/spaces/test_graph.py +122 -0
  173. geometric_kernels-0.2.3/tests/spaces/test_hyperbolic.py +53 -0
  174. geometric_kernels-0.2.3/tests/spaces/test_hypercube_graph.py +69 -0
  175. geometric_kernels-0.2.3/tests/spaces/test_hypersphere.py +61 -0
  176. geometric_kernels-0.2.3/tests/spaces/test_lie_groups.py +131 -0
  177. geometric_kernels-0.2.3/tests/spaces/test_mesh.py +40 -0
  178. geometric_kernels-0.2.3/tests/spaces/test_product_discrete_spectrum_space.py +56 -0
  179. geometric_kernels-0.2.3/tests/spaces/test_spd.py +45 -0
  180. geometric_kernels-0.2.3/tests/teddy.obj +4790 -0
  181. geometric_kernels-0.2.3/tests/utils/__init__.py +0 -0
  182. geometric_kernels-0.2.3/tests/utils/test_kernel_formulas.py +68 -0
  183. geometric_kernels-0.2.3/tests/utils/test_manifold_utils.py +32 -0
  184. geometric_kernels-0.2.3/tests/utils/test_special_functions.py +112 -0
  185. geometric_kernels-0.2.3/tests/utils/test_utils.py +122 -0
@@ -0,0 +1,11 @@
1
+ [flake8]
2
+ max-line-length = 88
3
+ select = C,E,F,W,B,B9
4
+ # ignore:
5
+ # E226 missing whitespace around arithmetic operator
6
+ # W503 Line break occurred before a binary operator
7
+ # W504 line break after binary operator
8
+ # F811 redefinition because of multiple dispatch
9
+ ignore = E203, E501, W503, E226, W503, W504, F811, F722
10
+ max-complexity = 10
11
+ exclude = __init__.py,.git,__pycache__,.mypy_cache,.pytest_cache
@@ -0,0 +1 @@
1
+ *.ipynb linguist-vendored
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: Bug report (including performance and build issues)
3
+ about: Help us find mistakes in the GeometricKernels code base
4
+ labels: bug
5
+ ---
6
+
7
+ <!-- Lines like this are comments and will be invisible -->
8
+
9
+ # Bug / performance issue / build issue
10
+
11
+ <!-- A clear and concise description of what the bug is. -->
12
+
13
+ ## To reproduce
14
+
15
+ **Minimal, reproducible example**
16
+ <!-- We need to be able to reproduce the bug by simply copy and pasting your code -->
17
+ ```python
18
+ # This is the place for your code that reproduces the bug.
19
+ # Please make sure it does not depend on external libraries (beyond GeometricKernels's own requirements) or specific datasets, and the smaller, the better :)
20
+ # For help on how to write a good bug report, see https://stackoverflow.com/help/minimal-reproducible-example
21
+ ```
22
+
23
+ **Stack trace, or error message**
24
+ ```
25
+ // Paste the full stack trace/error message here
26
+ ```
27
+
28
+ ## Expected behavior
29
+
30
+ <!-- A clear and concise description of what you expected to happen. -->
31
+
32
+ ## System information
33
+
34
+ * GeometricKernels version
35
+ * TensorFlow/PyTorch/Jax version
36
+ * Python version
37
+ * Operating system
38
+
39
+ ## Additional context
40
+
41
+ <!-- Add any other context about the problem here. -->
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: Documentation or notebooks
3
+ about: Let us know what would make the GeometricKernels documentation better
4
+ ---
5
+
6
+ # Documentation/tutorial notebooks
7
+
8
+ *Is there anything missing in the docs?*
9
+
10
+ *Are there any mistakes in the docs?*
11
+
12
+ *Is there a feature that needs some example code in a notebook?*
13
+
14
+ *Do you know how to fix the docs?* If so, it'd be amazing if you'd be willing to directly contribute a pull request :)
15
+
16
+
17
+ Links:
18
+ * [latest GeometricKernels documentation](https://geometric-kernels.github.io/GeometricKernels/index.html)
19
+ * [Landing page](https://geometric-kernels.github.io/)
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for GeometricKernels
4
+ labels: enhancement
5
+ ---
6
+
7
+ <!-- Lines like this are comments and will be invisible -->
8
+
9
+ # Feature request
10
+
11
+ <!-- Please give a clear and concise description of your feature proposal! -->
12
+
13
+ ## Motivation
14
+
15
+ **Is your feature request related to a problem?**
16
+ <!-- A clear and concise description of the problem. For example: I'm always frustrated when [...] -->
17
+ <!-- Are there relevant issues or other PRs? Please add links -->
18
+ <!-- Who will benefit from this feature? -->
19
+
20
+ ## Proposal
21
+
22
+ **Describe the solution you would like**
23
+ <!-- A clear and concise description of what you want to happen. -->
24
+
25
+ **What alternatives have you considered?**
26
+ <!-- A clear and concise description of any alternative solutions or features you've considered. -->
27
+
28
+ **Are you willing to open a pull request?** (We really appreciate contributions!)
29
+
30
+ ## Additional context
31
+
32
+ <!-- Add any other context / information about your feature request here. -->
@@ -0,0 +1,4 @@
1
+ ---
2
+ name: '"How do I do ..." and other issues'
3
+ about: How-To Questions
4
+ ---
@@ -0,0 +1,45 @@
1
+ name: Docs
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ docs:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ #----------------------------------------------
13
+ # check-out repo and set-up python
14
+ #----------------------------------------------
15
+ - uses: actions/checkout@v4
16
+ - uses: actions/setup-python@v4
17
+ with:
18
+ python-version: "3.10"
19
+ #----------------------------------------------
20
+ # install
21
+ #----------------------------------------------
22
+ - name: Install dependencies
23
+ run: |
24
+ make install
25
+ pip install -r docs/requirements.txt
26
+ - name: Build documentation
27
+ run: |
28
+ make docs
29
+ ls -all docs/_build/html
30
+ - name: Clean
31
+ run: |
32
+ TMP_DIR=$(mktemp -d -p $(pwd))
33
+ mv docs/_build/html/* $TMP_DIR
34
+ rm -rf docs
35
+ mv $TMP_DIR docs
36
+ ls -all docs
37
+ touch docs/.nojekyll
38
+ - name: Push to GitHub
39
+ run: |
40
+ git add .
41
+ git add -f docs/autoapi/*
42
+ git config --global user.email "none"
43
+ git config --global user.name "github-actions-bot"
44
+ git commit -m "build documentation [ci skip]"
45
+ git push -f origin HEAD:gh-pages
@@ -0,0 +1,27 @@
1
+ name: Publish-PyPI
2
+
3
+ on:
4
+ push:
5
+ tags: v[0-9]+.[0-9]+.[0-9]+*
6
+
7
+ jobs:
8
+ upload-pypi:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ - uses: actions/setup-python@v4
13
+ with:
14
+ python-version: "3.10"
15
+ - name: Install flit
16
+ run: |
17
+ pip install flit
18
+ - name: Create pip package
19
+ run: |
20
+ flit build
21
+ - name: Publish to PyPI
22
+ run: |
23
+ flit publish
24
+ env:
25
+ FLIT_INDEX_URL: ${{ secrets.PYPI_INDEX_URL }}
26
+ FLIT_PASSWORD: ${{ secrets.PYPI_TOKEN }}
27
+ FLIT_USERNAME: __token__
@@ -0,0 +1,37 @@
1
+ name: QualityChecks
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+ branches:
7
+ - main
8
+
9
+ jobs:
10
+ check-and-test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.8", "3.9", "3.10", "3.11"]
15
+ fail-fast: false
16
+
17
+ name: Python-${{ matrix.python-version }}
18
+ steps:
19
+ #----------------------------------------------
20
+ # check-out repo and set-up python
21
+ #----------------------------------------------
22
+ - uses: actions/checkout@v4
23
+ - uses: actions/setup-python@v4
24
+ with:
25
+ python-version: ${{ matrix.python-version }}
26
+ #----------------------------------------------
27
+ # install
28
+ #----------------------------------------------
29
+ - name: Install dependencies
30
+ run: GK_REQUIREMENTS=test_requirements-${{ matrix.python-version }}.txt make install
31
+ #----------------------------------------------
32
+ # Lint and test
33
+ #----------------------------------------------
34
+ - name: Run lint
35
+ run: make lint
36
+ - name: Run tests
37
+ run: make test
@@ -0,0 +1,144 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+ docs/generated/
74
+ docs/autoapi/
75
+ docs/bin
76
+
77
+ # PyBuilder
78
+ target/
79
+
80
+ # Jupyter Notebook
81
+ .ipynb_checkpoints
82
+
83
+ # IPython
84
+ profile_default/
85
+ ipython_config.py
86
+
87
+ # pyenv
88
+ .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
98
+ __pypackages__/
99
+
100
+ # Celery stuff
101
+ celerybeat-schedule
102
+ celerybeat.pid
103
+
104
+ # SageMath parsed files
105
+ *.sage.py
106
+
107
+ # Environments
108
+ .env
109
+ .venv
110
+ env/
111
+ venv/
112
+ ENV/
113
+ env.bak/
114
+ venv.bak/
115
+
116
+ # Spyder project settings
117
+ .spyderproject
118
+ .spyproject
119
+
120
+ # Rope project settings
121
+ .ropeproject
122
+
123
+ # mkdocs documentation
124
+ /site
125
+
126
+ # mypy
127
+ .mypy_cache/
128
+ .dmypy.json
129
+ dmypy.json
130
+
131
+ # Pyre type checker
132
+ .pyre/
133
+
134
+ # Emacs backup files
135
+ *~
136
+
137
+ # Vim swp files
138
+ *.swp
139
+
140
+ # Mac OS
141
+ .DS_Store
142
+
143
+ # Idea
144
+ /.idea/
@@ -0,0 +1,65 @@
1
+ # CHANGELOG
2
+
3
+ ## v0.2.3 - 16.01.2025
4
+ * Constraint version of plum-dispatch because of wesselb/lab#23
5
+
6
+ ## v0.2.2 - 29.11.2024
7
+ * Replace opt_einsum's contract with lab's einsum for better backend-independence by @vabor112 in https://github.com/geometric-kernels/GeometricKernels/pull/145
8
+ * Hypersphere space small improvements by @vabor112 in https://github.com/geometric-kernels/GeometricKernels/pull/142
9
+ * The Hypercube space for binary vectors and labeled unweighted graphs by @vabor112 in https://github.com/geometric-kernels/GeometricKernels/pull/141
10
+ * Fix algorithm selecting signatures and add precomputed characters for SO(9), SU(7), SU(8), SU(9) by @imbirik in https://github.com/geometric-kernels/GeometricKernels/pull/151
11
+ * Revise tests and numerous fixes by @vabor112 in https://github.com/geometric-kernels/GeometricKernels/pull/149
12
+
13
+ ## v0.2.1 - 08.08.2024
14
+ Minor release with mostly cosmetic changes:
15
+ * Add "If you have a question" section to README.md by @vabor112 in https://github.com/geometric-kernels/GeometricKernels/pull/131
16
+ * Github cosmetics by @stoprightthere in https://github.com/geometric-kernels/GeometricKernels/pull/133
17
+ * Replace all references to "gpflow" organization with "geometric-kernels" organization by @vabor112 in https://github.com/geometric-kernels/GeometricKernels/pull/134
18
+ * Use fit_gpytorch_model or fit.fit_gpytorch_mll depening on the botorсh version by @vabor112 in https://github.com/geometric-kernels/GeometricKernels/pull/137
19
+ * Add a missing type cast and fix a typo in kernels/karhunen_loeve.py by @vabor112 in https://github.com/geometric-kernels/GeometricKernels/pull/136
20
+ * Minor documentation improvements by @vabor112 in https://github.com/geometric-kernels/GeometricKernels/pull/135
21
+ * Add citation to the preprint of the GeometricKernels paper by @vabor112 in https://github.com/geometric-kernels/GeometricKernels/pull/138
22
+ * Add citation file by @aterenin in https://github.com/geometric-kernels/GeometricKernels/pull/140
23
+ * Fix dependencies (Version 0.2.1) by @stoprightthere in https://github.com/geometric-kernels/GeometricKernels/pull/143
24
+
25
+ ## v0.2 - 21.04.2024
26
+ New geometric kernel that *just works*, `kernels.MaternGeometricKernel`. Relies on *(hopefully)* sensible defaults we defined. Mostly by @stoprightthere.
27
+
28
+ New spaces, based on Azangulov et al. ([2022](https://arxiv.org/abs/2208.14960), [2023](https://arxiv.org/abs/2301.13088)), mostly by @imbirik and @stoprightthere:
29
+ - hyperbolic spaces $\mathbb{H}_n$ in `spaces.Hyperbolic`,
30
+ - manifolds of symmetric positive definite matrices $\mathrm{SPD}(n)$ endowed with the affine-invariant Riemannian metric in `spaces.SymmetricPositiveDefiniteMatrices`,
31
+ - special orthogonal groups $\mathrm{SO}(n)$ in `spaces.SpecialOrthogonal`.
32
+ - special unitary groups $\mathrm{SU}(n)$ in `spaces.SpecialUnitary`.
33
+
34
+ New package `geometric_kernels.feature_maps` for (approximate) finite-dimensional feature maps. Mostly by @stoprightthere.
35
+
36
+ New small package `geometric_kernels.sampling` for efficient sampling from geometric Gaussian process priors. Based on the (approximate) finite-dimensional feature maps. Mostly by @stoprightthere.
37
+
38
+ Examples/Tutorials improvements, mostly by @vabor112:
39
+ - new Jupyter notebooks `Graph.ipynb`, `Hyperbolic.ipynb`, `Hypersphere.ipynb`, `Mesh.ipynb`, `SPD.ipynb`, `SpecialOrthogonal.ipynb`, `SpecialUnitary.ipynb`, `Torus.ipynb` featuring tutorials on all the spaces in the library,
40
+ - new Jupyter notebooks `backends/JAX_Graph.ipynb`, `backends/PyTorch_Graph.ipynb`, `backends/TensorFlow_Graph.ipynb` showcasing how to use all the backends supported by the library,
41
+ - new Jupyter notebooks `frontends/GPflow.ipynb`, `frontends/GPJax.ipynb`, `frontends/GPyTorch.ipynb` showcasing how to use all the frontends supported by the library,
42
+ - other notebooks updated and grouped together in `other/` folder.
43
+
44
+
45
+ Documentation improvements, mostly by @vabor112:
46
+ - all docstrings throughout the library revised,
47
+ - added new documentation pages describing the basic theoretical concepts, in `docs/theory`,
48
+ - notebooks are now rendered as part of the documentation, you can refer to them from the docstrings and other documentation pages,
49
+ - introduced a more or less unified style for docstrings.
50
+
51
+ Other:
52
+ - refactoring and bug fixes,
53
+ - added type hints throughout the library and enabled `mypy`,
54
+ - updated frontends (with limited suppot for GPJax due to conflicting dependencies),
55
+ - improved `spaces.ProductDiscreteSpectrumSpace` and `kernels.ProductGeometricKernel`,
56
+ - filtered out or fixed some annoying external warnings,
57
+ - added a new banner for `README.md` and for our [landing page](https://geometric-kernels.github.io/), courtesy of @aterenin,
58
+ - example notebooks are now run as tests,
59
+ - we now support Python 3.8, 3.9, 3.10, 3.11 and have test workflows for all the supported Python versions,
60
+ - we now provide a PyPI package,
61
+ - [LAB](https://github.com/wesselb/lab) is now a lightweight dependency, thanks to @wesselb,
62
+ - kernels are now normalized to have unit outputscale by default.
63
+
64
+ ## v0.1-alpha - 20.10.2022
65
+ Alpha release.
@@ -0,0 +1,6 @@
1
+ @article{mostowsky2024,
2
+ title = {The GeometricKernels Package: Heat and Matérn Kernels for Geometric Learning on Manifolds, Meshes, and Graphs},
3
+ author = {Peter Mostowsky and Vincent Dutordoir and Iskander Azangulov and Noémie Jaquier and Michael John Hutchinson and Aditya Ravuri and Leonel Rozo and Alexander Terenin and Viacheslav Borovitskiy},
4
+ year = {2024},
5
+ journal = {arXiv:2407.08086},
6
+ }
@@ -0,0 +1,29 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use this software, please cite it as below."
3
+ title: "GeometricKernels"
4
+ authors:
5
+ - name: "GeometricKernels Contributors"
6
+ preferred-citation:
7
+ type: "article"
8
+ title: "The GeometricKernels Package: Heat and Matérn Kernels for Geometric Learning on Manifolds, Meshes, and Graphs"
9
+ authors:
10
+ - family-names: "Mostowsky"
11
+ given-names: "Peter"
12
+ - family-names: "Dutordoir"
13
+ given-names: "Vincent"
14
+ - family-names: "Azangulov"
15
+ given-names: "Iskander"
16
+ - family-names: "Jaquier"
17
+ given-names: "Noémie"
18
+ - family-names: "Hutchinson"
19
+ given-names: "Michael John"
20
+ - family-names: "Ravuri"
21
+ given-names: "Aditya"
22
+ - family-names: "Rozo"
23
+ given-names: "Leonel"
24
+ - family-names: "Terenin"
25
+ given-names: "Alexander"
26
+ - family-names: "Borovitskiy"
27
+ given-names: "Viacheslav"
28
+ year: "2024"
29
+ journal: "arXiv:2407.08086"
@@ -0,0 +1,127 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement (the [project maintainers](CONTRIBUTING.md#who-are-we?)).
63
+ All complaints will be reviewed and investigated promptly and fairly.
64
+
65
+ All community leaders are obligated to respect the privacy and security of the
66
+ reporter of any incident.
67
+
68
+ ## Enforcement Guidelines
69
+
70
+ Community leaders will follow these Community Impact Guidelines in determining
71
+ the consequences for any action they deem in violation of this Code of Conduct:
72
+
73
+ ### 1. Correction
74
+
75
+ **Community Impact**: Use of inappropriate language or other behavior deemed
76
+ unprofessional or unwelcome in the community.
77
+
78
+ **Consequence**: A private, written warning from community leaders, providing
79
+ clarity around the nature of the violation and an explanation of why the
80
+ behavior was inappropriate. A public apology may be requested.
81
+
82
+ ### 2. Warning
83
+
84
+ **Community Impact**: A violation through a single incident or series
85
+ of actions.
86
+
87
+ **Consequence**: A warning with consequences for continued behavior. No
88
+ interaction with the people involved, including unsolicited interaction with
89
+ those enforcing the Code of Conduct, for a specified period of time. This
90
+ includes avoiding interactions in community spaces as well as external channels
91
+ like social media. Violating these terms may lead to a temporary or
92
+ permanent ban.
93
+
94
+ ### 3. Temporary Ban
95
+
96
+ **Community Impact**: A serious violation of community standards, including
97
+ sustained inappropriate behavior.
98
+
99
+ **Consequence**: A temporary ban from any sort of interaction or public
100
+ communication with the community for a specified period of time. No public or
101
+ private interaction with the people involved, including unsolicited interaction
102
+ with those enforcing the Code of Conduct, is allowed during this period.
103
+ Violating these terms may lead to a permanent ban.
104
+
105
+ ### 4. Permanent Ban
106
+
107
+ **Community Impact**: Demonstrating a pattern of violation of community
108
+ standards, including sustained inappropriate behavior, harassment of an
109
+ individual, or aggression toward or disparagement of classes of individuals.
110
+
111
+ **Consequence**: A permanent ban from any sort of public interaction within
112
+ the community.
113
+
114
+ ## Attribution
115
+
116
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
117
+ version 2.0, available at
118
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
119
+
120
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
121
+ enforcement ladder](https://github.com/mozilla/diversity).
122
+
123
+ [homepage]: https://www.contributor-covenant.org
124
+
125
+ For answers to common questions about this code of conduct, see the FAQ at
126
+ https://www.contributor-covenant.org/faq. Translations are available at
127
+ https://www.contributor-covenant.org/translations.