edmkit 0.0.2__tar.gz → 0.0.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 (135) hide show
  1. {edmkit-0.0.2 → edmkit-0.0.3}/PKG-INFO +4 -4
  2. {edmkit-0.0.2 → edmkit-0.0.3}/pyproject.toml +7 -3
  3. edmkit-0.0.2/.claude/settings.json +0 -13
  4. edmkit-0.0.2/.github/workflows/ci.yaml +0 -41
  5. edmkit-0.0.2/.github/workflows/release.yaml +0 -61
  6. edmkit-0.0.2/.gitignore +0 -12
  7. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/044133a480a9cd85 +0 -0
  8. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/0964f3bb4f032c8c +0 -0
  9. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/1bc81e7a8e7e7bbe +0 -0
  10. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/1cbd358389aea977 +0 -0
  11. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/1e008e88bbcea111 +0 -0
  12. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/1f0548fe4535f985 +0 -0
  13. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/35f88e1faa9f3328 +0 -0
  14. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/367807520711c3cd +0 -0
  15. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/38aa3a747435d725 +0 -0
  16. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/3de528b2ce4dd84a +0 -0
  17. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/3e64f59b937bba6d +0 -0
  18. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/525617db9c75da96 +0 -0
  19. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/57c8909d795f8e62 +0 -0
  20. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/58ea159e481aa3a1 +0 -0
  21. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/5f0509166c83dbdf +0 -0
  22. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/6774887ab59a4432 +0 -0
  23. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/6d32e618ade67baa +0 -0
  24. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/6f38038305c6ed41 +0 -0
  25. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/72b3f55262965df9 +0 -0
  26. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/73c6b6d562d33066 +0 -0
  27. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/75770e80b05e56a7 +0 -0
  28. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/75c0c6ccdb6758f4 +0 -0
  29. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/785b5770443201b7 +0 -0
  30. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/7ce3e424a8ab507e +0 -0
  31. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/7f3f06658346da88 +0 -0
  32. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/9620165cc778cf84 +0 -0
  33. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/a1d22a9e4ce41ee7 +0 -0
  34. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/a468f5bab0a85a25 +0 -0
  35. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/b0462995281909d3 +0 -0
  36. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/b142be48077c179f +0 -0
  37. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/b890364f429a50e6 +0 -0
  38. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/c3c447bf254bcfec +0 -0
  39. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/c507e529c9af7c8b +0 -0
  40. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/ce0c476ef9af71a4 +0 -0
  41. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/ce59c4976acf7ac2 +0 -0
  42. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/d500112e75351aff +0 -0
  43. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/e921351ea8387e26 +0 -0
  44. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/eb0a9649e021b5f3 +0 -0
  45. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/f2bbfb72ee564d9a +0 -0
  46. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/f865d6d4cdf5b640 +0 -0
  47. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/fad02e7ba9c6246b +0 -0
  48. edmkit-0.0.2/.hypothesis/examples/0034576a834117e0/fc2136602d452f28 +0 -0
  49. edmkit-0.0.2/.hypothesis/examples/015eed87cd1f8935/57c2b394f6a75b5d +0 -0
  50. edmkit-0.0.2/.hypothesis/examples/04e6b3400353b141/0034576a834117e0 +0 -0
  51. edmkit-0.0.2/.hypothesis/examples/04e6b3400353b141/015eed87cd1f8935 +0 -0
  52. edmkit-0.0.2/.hypothesis/examples/04e6b3400353b141/1626189b6bf56f80 +0 -3
  53. edmkit-0.0.2/.hypothesis/examples/04e6b3400353b141/73816d5f0ce8d88e +0 -1
  54. edmkit-0.0.2/.hypothesis/examples/04e6b3400353b141/d6ffe0a2e4161c9f +0 -3
  55. edmkit-0.0.2/.hypothesis/examples/1626189b6bf56f80/80ccd8a8c4824374 +0 -0
  56. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/099e780a6c88642f +0 -0
  57. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/0ed73d6c43d6048d +0 -0
  58. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/197d64fc6ca23b99 +0 -0
  59. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/1cba69f11fa9ef9b +0 -0
  60. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/1f5739e9000d6194 +0 -0
  61. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/2216be8637a712fa +0 -0
  62. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/246f5ed31a1911e4 +0 -0
  63. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/255bb2b0ac558de9 +0 -0
  64. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/2b410752cd9b49dc +0 -0
  65. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/2d38f541a7555c12 +0 -0
  66. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/32a53646812e8486 +0 -0
  67. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/39ab84e3b6f676cb +0 -0
  68. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/3a90b03848daab4b +0 -0
  69. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/71dd5752987d4683 +0 -0
  70. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/7975526f9e9ceddc +0 -0
  71. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/7a23e74be4c06e46 +0 -0
  72. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/7bee48d2cebcc717 +0 -0
  73. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/7da28ac1ce5efa32 +0 -0
  74. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/96c30b1c055febc6 +0 -0
  75. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/992e8749c431330d +0 -0
  76. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/b71b2fbcc3b08159 +0 -0
  77. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/ca5d86f85e97e817 +0 -0
  78. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/d32caf23089518a7 +0 -0
  79. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/e2f2507b592f242b +0 -0
  80. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/ea8ded2d81d0a4d0 +0 -0
  81. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/f22f7422beddec17 +0 -0
  82. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/f7ef19309a39fc83 +0 -0
  83. edmkit-0.0.2/.hypothesis/examples/73816d5f0ce8d88e/fb79b1fc35c3580c +0 -0
  84. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/0578a46e1797298f +0 -0
  85. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/0800fe9f2ab8a679 +0 -0
  86. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/10ea481f27e2e260 +0 -0
  87. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/11034e37d0310d06 +0 -0
  88. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/221dca373a8cef08 +0 -0
  89. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/25c0858c2b8b235a +0 -0
  90. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/417c8597e89210ff +0 -0
  91. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/4443c03f163d115d +0 -0
  92. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/45251b86a5ed87ee +0 -0
  93. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/46004ef293257244 +0 -0
  94. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/4de3f834d4ce14d5 +0 -0
  95. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/5ed0d87b39eeb509 +0 -0
  96. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/6898223221bd2ee8 +0 -0
  97. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/6f29d6906fbc3439 +0 -0
  98. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/a26adfee48d8cb11 +0 -0
  99. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/a8b0c244f138d7ae +0 -0
  100. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/b97e0c0aed942d42 +0 -0
  101. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/bec8b632b57a1753 +0 -0
  102. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/da311781dcf9e316 +0 -0
  103. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/e98a40e2b515c6a9 +0 -0
  104. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/f326016f8c06cb07 +0 -0
  105. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/f9a2590959fe979e +0 -0
  106. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/fab6941330241f35 +0 -0
  107. edmkit-0.0.2/.hypothesis/examples/d6ffe0a2e4161c9f/fe901ed8cec27b6a +0 -0
  108. edmkit-0.0.2/.python-version +0 -1
  109. edmkit-0.0.2/CLAUDE.md +0 -1
  110. edmkit-0.0.2/LICENSE +0 -21
  111. edmkit-0.0.2/benchmarks/ccm.py +0 -124
  112. edmkit-0.0.2/ruff.toml +0 -1
  113. edmkit-0.0.2/src/edmkit/__init__.py +0 -5
  114. edmkit-0.0.2/tests/__init__.py +0 -0
  115. edmkit-0.0.2/tests/conftest.py +0 -115
  116. edmkit-0.0.2/tests/helpers.py +0 -11
  117. edmkit-0.0.2/tests/smoke_test.py +0 -76
  118. edmkit-0.0.2/tests/test_ccm.py +0 -399
  119. edmkit-0.0.2/tests/test_e2e.py +0 -69
  120. edmkit-0.0.2/tests/test_embedding.py +0 -113
  121. edmkit-0.0.2/tests/test_generate.py +0 -229
  122. edmkit-0.0.2/tests/test_simplex_projection.py +0 -326
  123. edmkit-0.0.2/tests/test_smap.py +0 -433
  124. edmkit-0.0.2/tests/test_util.py +0 -270
  125. edmkit-0.0.2/uv.lock +0 -396
  126. {edmkit-0.0.2 → edmkit-0.0.3}/README.md +0 -0
  127. {edmkit-0.0.2 → edmkit-0.0.3}/src/edmkit/ccm.py +0 -0
  128. {edmkit-0.0.2 → edmkit-0.0.3}/src/edmkit/embedding.py +0 -0
  129. {edmkit-0.0.2 → edmkit-0.0.3}/src/edmkit/generate/__init__.py +0 -0
  130. {edmkit-0.0.2 → edmkit-0.0.3}/src/edmkit/generate/double_pendulum.py +0 -0
  131. {edmkit-0.0.2 → edmkit-0.0.3}/src/edmkit/generate/lorenz.py +0 -0
  132. {edmkit-0.0.2 → edmkit-0.0.3}/src/edmkit/generate/mackey_glass.py +0 -0
  133. {edmkit-0.0.2 → edmkit-0.0.3}/src/edmkit/simplex_projection.py +0 -0
  134. {edmkit-0.0.2 → edmkit-0.0.3}/src/edmkit/smap.py +0 -0
  135. {edmkit-0.0.2 → edmkit-0.0.3}/src/edmkit/util.py +0 -0
@@ -1,14 +1,14 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.3
2
2
  Name: edmkit
3
- Version: 0.0.2
3
+ Version: 0.0.3
4
4
  Summary: Simple EDM (Empirical Dynamic Modeling) library
5
+ Author: FUJISHIGE TEMMA
5
6
  Author-email: FUJISHIGE TEMMA <tenma.x0@gmail.com>
6
- License-File: LICENSE
7
- Requires-Python: >=3.13
8
7
  Requires-Dist: numpy>=2.4.3
9
8
  Requires-Dist: scipy>=1.17.1
10
9
  Requires-Dist: tinygrad>=0.11.0
11
10
  Requires-Dist: usearch>=2.23.0
11
+ Requires-Python: >=3.13
12
12
  Description-Content-Type: text/markdown
13
13
 
14
14
  # edmkit
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "edmkit"
3
- version = "0.0.2"
3
+ version = "0.0.3"
4
4
  description = "Simple EDM (Empirical Dynamic Modeling) library"
5
5
  authors = [{ name = "FUJISHIGE TEMMA", email = "tenma.x0@gmail.com" }]
6
6
  readme = "README.md"
@@ -30,5 +30,9 @@ markers = [
30
30
 
31
31
 
32
32
  [build-system]
33
- requires = ["hatchling"]
34
- build-backend = "hatchling.build"
33
+ requires = ["uv_build>=0.10.9,<0.11.0"]
34
+ build-backend = "uv_build"
35
+
36
+ [tool.uv.build-backend]
37
+ module-name = "edmkit"
38
+ namespace = true
@@ -1,13 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(grep:*)",
5
- "Bash(uv run ruff:*)",
6
- "Bash(uv run ty:*)",
7
- "Bash(uv run pytest:*)",
8
- "Bash(uv run python:*)"
9
- ],
10
- "deny": [],
11
- "ask": []
12
- }
13
- }
@@ -1,41 +0,0 @@
1
- name: Test
2
-
3
- on:
4
- pull_request:
5
- push:
6
- branches:
7
- - main
8
-
9
- jobs:
10
- lint:
11
- name: Lint
12
- runs-on: ubuntu-latest
13
- steps:
14
- - uses: actions/checkout@v6
15
- - uses: astral-sh/setup-uv@v7
16
- - name: Ruff lint
17
- run: uv run ruff check .
18
- - name: Ruff format
19
- run: uv run ruff format --diff .
20
-
21
- type-check:
22
- name: Type check
23
- runs-on: ubuntu-latest
24
- steps:
25
- - uses: actions/checkout@v6
26
- - uses: astral-sh/setup-uv@v7
27
- - name: Ty type check
28
- run: uv run ty check
29
-
30
- test:
31
- name: Test (${{ matrix.os }})
32
- strategy:
33
- matrix:
34
- os: [ubuntu-latest, macos-latest, windows-latest]
35
- runs-on: ${{ matrix.os }}
36
- env:
37
- HYPOTHESIS_PROFILE: ci
38
- steps:
39
- - uses: actions/checkout@v6
40
- - uses: astral-sh/setup-uv@v7
41
- - run: uv run pytest
@@ -1,61 +0,0 @@
1
- name: Release
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
-
8
- jobs:
9
- check-version:
10
- name: Check if version is new
11
- runs-on: ubuntu-latest
12
- outputs:
13
- should-release: ${{ steps.check.outputs.should-release }}
14
- version: ${{ steps.check.outputs.version }}
15
- steps:
16
- - name: Checkout
17
- uses: actions/checkout@v6
18
- - name: Install uv
19
- uses: astral-sh/setup-uv@v7
20
- - name: Check PyPI for existing version
21
- id: check
22
- run: |
23
- VERSION=$(uv run python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
24
- echo "version=$VERSION" >> "$GITHUB_OUTPUT"
25
- STATUS=$(curl -s -o /dev/null -w '%{http_code}' "https://pypi.org/pypi/edmkit/$VERSION/json")
26
- if [ "$STATUS" = "404" ]; then
27
- echo "should-release=true" >> "$GITHUB_OUTPUT"
28
- else
29
- echo "should-release=false" >> "$GITHUB_OUTPUT"
30
- fi
31
-
32
- pypi:
33
- name: Publish to PyPI
34
- needs: check-version
35
- if: needs.check-version.outputs.should-release == 'true'
36
- runs-on: ubuntu-latest
37
- environment:
38
- name: pypi
39
- permissions:
40
- id-token: write
41
- contents: read
42
- attestations: write
43
- steps:
44
- - name: Checkout
45
- uses: actions/checkout@v6
46
- - name: Install uv
47
- uses: astral-sh/setup-uv@v7
48
- - name: Install Python 3.13
49
- run: uv python install 3.13
50
- - name: Build
51
- run: uv build
52
- - name: Smoke test (wheel)
53
- run: uv run --isolated --no-project --with dist/*.whl tests/smoke_test.py
54
- - name: Smoke test (source distribution)
55
- run: uv run --isolated --no-project --with dist/*.tar.gz tests/smoke_test.py
56
- - name: Generate attestations
57
- uses: actions/attest@v4
58
- with:
59
- subject-path: "dist/*"
60
- - name: Publish
61
- run: uv publish --check-url https://pypi.org/simple/
edmkit-0.0.2/.gitignore DELETED
@@ -1,12 +0,0 @@
1
- # python generated files
2
- __pycache__/
3
- *.py[oc]
4
- build/
5
- dist/
6
- wheels/
7
- *.egg-info
8
-
9
- # venv
10
- .venv
11
- .hypothesis/*
12
- !.hypothesis/examples/
@@ -1,3 +0,0 @@
1
- ���U������
2
- Ẽh���,z�#So�
3
- P$�p��lj�S
@@ -1 +0,0 @@
1
- Hm�q�G,0I��*��G�9��;����c���Ǒ/��t<�ђ��.secondary
@@ -1,3 +0,0 @@
1
- ���U������
2
- Ẽh���,z�#So�
3
- P$�p��lj�S.secondary
@@ -1 +0,0 @@
1
- 3.13.0
edmkit-0.0.2/CLAUDE.md DELETED
@@ -1 +0,0 @@
1
- @AGENTS.md
edmkit-0.0.2/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 temma
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,124 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import time
4
- from dataclasses import dataclass
5
- from functools import partial
6
- from itertools import product
7
-
8
- import numpy as np
9
- from tabulate import tabulate
10
-
11
- from edmkit.ccm import ccm
12
- from edmkit.simplex_projection import simplex_projection
13
-
14
- rng = np.random.default_rng(42)
15
-
16
- N_POINTS = (100, 1000, 10000)
17
- X_DIMS = (1, 10, 100)
18
- Y_DIMS = (1, 10, 100)
19
- N_SAMPLES = (10, 20, 30)
20
- LIBRARY_RATIO = 0.7
21
- LIB_SIZE_STEPS = 4
22
- BATCH_LIMIT = 8
23
-
24
-
25
- @dataclass(frozen=True)
26
- class BenchmarkCase:
27
- n_points: int
28
- x_dim: int
29
- y_dim: int
30
- n_samples: int
31
-
32
- @property
33
- def name(self) -> str:
34
- return f"n{self.n_points}_x{self.x_dim}_y{self.y_dim}_s{self.n_samples}"
35
-
36
- @property
37
- def batch_size(self) -> int:
38
- return min(BATCH_LIMIT, self.n_samples)
39
-
40
-
41
- def iter_cases() -> list[BenchmarkCase]:
42
- return [BenchmarkCase(n, xd, yd, ns) for n, xd, yd, ns in product(N_POINTS, X_DIMS, Y_DIMS, N_SAMPLES)]
43
-
44
-
45
- def synthesize_series(n_points: int, x_dim: int, y_dim: int) -> tuple[np.ndarray, np.ndarray]:
46
- """Generate coupled synthetic data with controllable dimensionality."""
47
-
48
- drivers = rng.standard_normal((n_points, x_dim))
49
- weights = rng.standard_normal((x_dim, max(y_dim, 1)))
50
- responses = drivers @ weights + 0.1 * rng.standard_normal((n_points, max(y_dim, 1)))
51
-
52
- X = drivers if x_dim > 1 else drivers.reshape(n_points, 1)
53
- Y = responses[:, :y_dim] if y_dim > 1 else responses[:, 0]
54
-
55
- return X, Y
56
-
57
-
58
- def compute_lib_sizes(min_size: int, pool_length: int, steps: int) -> np.ndarray:
59
- base = max(min_size, 2)
60
- max_candidate = max(pool_length, base)
61
- if max_candidate == base:
62
- max_candidate = base + max(2, base // 2)
63
-
64
- values = np.linspace(base, max_candidate, num=steps)
65
- lib_sizes = np.unique(np.maximum(values.astype(int), base))
66
- if lib_sizes.size == 0:
67
- lib_sizes = np.array([base])
68
- return lib_sizes
69
-
70
-
71
- def main() -> None:
72
- predict_func = partial(simplex_projection, use_tensor=False)
73
- rows: list[list[str | int]] = []
74
-
75
- for case in iter_cases():
76
- X, Y = synthesize_series(case.n_points, case.x_dim, case.y_dim)
77
- split = max(2, min(case.n_points - 1, int(case.n_points * LIBRARY_RATIO)))
78
- library_pool = np.arange(split)
79
- prediction_pool = np.arange(split, case.n_points)
80
- lib_sizes = compute_lib_sizes(case.x_dim + 1, library_pool.size, LIB_SIZE_STEPS)
81
-
82
- start = time.perf_counter()
83
- ccm(
84
- X=X,
85
- Y=Y,
86
- lib_sizes=lib_sizes,
87
- predict_func=predict_func,
88
- n_samples=case.n_samples,
89
- library_pool=library_pool,
90
- prediction_pool=prediction_pool,
91
- batch_size=case.batch_size,
92
- )
93
- elapsed = time.perf_counter() - start
94
-
95
- rows.append(
96
- [
97
- case.name,
98
- case.n_points,
99
- case.x_dim,
100
- case.y_dim,
101
- case.n_samples,
102
- library_pool.size,
103
- f"{lib_sizes.tolist()}",
104
- case.batch_size,
105
- f"{elapsed:.3f}",
106
- ]
107
- )
108
-
109
- headers = [
110
- "scenario",
111
- "n_points",
112
- "x_dim",
113
- "y_dim",
114
- "n_samples",
115
- "pool",
116
- "lib sizes",
117
- "batch",
118
- "time (s)",
119
- ]
120
- print(tabulate(rows, headers=headers, tablefmt="github"))
121
-
122
-
123
- if __name__ == "__main__":
124
- main()
edmkit-0.0.2/ruff.toml DELETED
@@ -1 +0,0 @@
1
- line-length = 150
@@ -1,5 +0,0 @@
1
- # ruff: noqa: F401
2
- from .ccm import bootstrap
3
- from .embedding import lagged_embed
4
- from .simplex_projection import simplex_projection
5
- from .smap import smap
File without changes