raso 0.2.0__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 (85) hide show
  1. raso-0.2.0/Cargo.toml +31 -0
  2. raso-0.2.0/PKG-INFO +51 -0
  3. raso-0.2.0/README.md +27 -0
  4. raso-0.2.0/bindings/python/Cargo.lock +526 -0
  5. raso-0.2.0/bindings/python/Cargo.toml +18 -0
  6. raso-0.2.0/bindings/python/README.md +27 -0
  7. raso-0.2.0/bindings/python/src/dr_suite.rs +241 -0
  8. raso-0.2.0/bindings/python/src/lib.rs +402 -0
  9. raso-0.2.0/bindings/python/tests/test_dr_suite.py +101 -0
  10. raso-0.2.0/bindings/python/tests/test_raso.py +99 -0
  11. raso-0.2.0/crates/raso/Cargo.toml +44 -0
  12. raso-0.2.0/crates/raso/README.md +168 -0
  13. raso-0.2.0/crates/raso/src/lib.rs +44 -0
  14. raso-0.2.0/crates/raso-hdbscan/Cargo.toml +28 -0
  15. raso-0.2.0/crates/raso-hdbscan/LICENSE +21 -0
  16. raso-0.2.0/crates/raso-hdbscan/README.md +168 -0
  17. raso-0.2.0/crates/raso-hdbscan/src/condensed_tree.rs +216 -0
  18. raso-0.2.0/crates/raso-hdbscan/src/core_distance.rs +47 -0
  19. raso-0.2.0/crates/raso-hdbscan/src/distance.rs +133 -0
  20. raso-0.2.0/crates/raso-hdbscan/src/error.rs +19 -0
  21. raso-0.2.0/crates/raso-hdbscan/src/extraction.rs +325 -0
  22. raso-0.2.0/crates/raso-hdbscan/src/hdbscan.rs +142 -0
  23. raso-0.2.0/crates/raso-hdbscan/src/lib.rs +13 -0
  24. raso-0.2.0/crates/raso-hdbscan/src/membership.rs +41 -0
  25. raso-0.2.0/crates/raso-hdbscan/src/mst.rs +74 -0
  26. raso-0.2.0/crates/raso-hdbscan/tests/helpers/mod.rs +91 -0
  27. raso-0.2.0/crates/raso-hdbscan/tests/integration.rs +676 -0
  28. raso-0.2.0/crates/raso-hdbscan/tests/proptest_invariants.rs +145 -0
  29. raso-0.2.0/crates/raso-manifold/Cargo.toml +26 -0
  30. raso-0.2.0/crates/raso-manifold/LICENSE +21 -0
  31. raso-0.2.0/crates/raso-manifold/README.md +168 -0
  32. raso-0.2.0/crates/raso-manifold/src/eigen.rs +67 -0
  33. raso-0.2.0/crates/raso-manifold/src/graph.rs +98 -0
  34. raso-0.2.0/crates/raso-manifold/src/isomap.rs +171 -0
  35. raso-0.2.0/crates/raso-manifold/src/lib.rs +54 -0
  36. raso-0.2.0/crates/raso-manifold/src/spectral.rs +124 -0
  37. raso-0.2.0/crates/raso-manifold/tests/manifold.rs +403 -0
  38. raso-0.2.0/crates/raso-mds/Cargo.toml +25 -0
  39. raso-0.2.0/crates/raso-mds/README.md +168 -0
  40. raso-0.2.0/crates/raso-mds/src/eigen.rs +65 -0
  41. raso-0.2.0/crates/raso-mds/src/lib.rs +200 -0
  42. raso-0.2.0/crates/raso-mds/tests/mds.rs +347 -0
  43. raso-0.2.0/crates/raso-pacmap/Cargo.toml +26 -0
  44. raso-0.2.0/crates/raso-pacmap/LICENSE +21 -0
  45. raso-0.2.0/crates/raso-pacmap/README.md +168 -0
  46. raso-0.2.0/crates/raso-pacmap/src/lib.rs +409 -0
  47. raso-0.2.0/crates/raso-pacmap/tests/pacmap.rs +308 -0
  48. raso-0.2.0/crates/raso-pca/Cargo.toml +27 -0
  49. raso-0.2.0/crates/raso-pca/README.md +168 -0
  50. raso-0.2.0/crates/raso-pca/src/kernel_pca.rs +325 -0
  51. raso-0.2.0/crates/raso-pca/src/lib.rs +15 -0
  52. raso-0.2.0/crates/raso-pca/src/pca.rs +283 -0
  53. raso-0.2.0/crates/raso-pca/src/ppca.rs +362 -0
  54. raso-0.2.0/crates/raso-pca/src/truncated_svd.rs +203 -0
  55. raso-0.2.0/crates/raso-pca/tests/kernel_pca.rs +244 -0
  56. raso-0.2.0/crates/raso-pca/tests/pca.rs +411 -0
  57. raso-0.2.0/crates/raso-pca/tests/ppca.rs +351 -0
  58. raso-0.2.0/crates/raso-pca/tests/truncated_svd.rs +178 -0
  59. raso-0.2.0/crates/raso-tsne/Cargo.toml +28 -0
  60. raso-0.2.0/crates/raso-tsne/LICENSE +21 -0
  61. raso-0.2.0/crates/raso-tsne/README.md +168 -0
  62. raso-0.2.0/crates/raso-tsne/src/affinity.rs +140 -0
  63. raso-0.2.0/crates/raso-tsne/src/distance.rs +86 -0
  64. raso-0.2.0/crates/raso-tsne/src/error.rs +31 -0
  65. raso-0.2.0/crates/raso-tsne/src/lib.rs +9 -0
  66. raso-0.2.0/crates/raso-tsne/src/tsne.rs +258 -0
  67. raso-0.2.0/crates/raso-tsne/tests/integration.rs +320 -0
  68. raso-0.2.0/crates/raso-tsne/tests/proptest_invariants.rs +66 -0
  69. raso-0.2.0/crates/raso-umap/Cargo.toml +29 -0
  70. raso-0.2.0/crates/raso-umap/LICENSE +21 -0
  71. raso-0.2.0/crates/raso-umap/README.md +168 -0
  72. raso-0.2.0/crates/raso-umap/src/distance.rs +122 -0
  73. raso-0.2.0/crates/raso-umap/src/error.rs +37 -0
  74. raso-0.2.0/crates/raso-umap/src/graph.rs +107 -0
  75. raso-0.2.0/crates/raso-umap/src/layout.rs +165 -0
  76. raso-0.2.0/crates/raso-umap/src/lib.rs +10 -0
  77. raso-0.2.0/crates/raso-umap/src/nn.rs +44 -0
  78. raso-0.2.0/crates/raso-umap/src/umap.rs +293 -0
  79. raso-0.2.0/crates/raso-umap/tests/helpers/mod.rs +281 -0
  80. raso-0.2.0/crates/raso-umap/tests/integration.rs +498 -0
  81. raso-0.2.0/crates/raso-umap/tests/proptest_invariants.rs +107 -0
  82. raso-0.2.0/pyproject.toml +36 -0
  83. raso-0.2.0/python/raso/__init__.py +294 -0
  84. raso-0.2.0/python/raso/_dr.py +173 -0
  85. raso-0.2.0/python/raso/py.typed +0 -0
raso-0.2.0/Cargo.toml ADDED
@@ -0,0 +1,31 @@
1
+ [workspace]
2
+ members = ["crates/*"]
3
+ exclude = ["bindings/wasm", "bindings/python"]
4
+ resolver = "2"
5
+
6
+ [workspace.package]
7
+ authors = ["Mike Macpherson"]
8
+ edition = "2024"
9
+ homepage = "https://github.com/mmacpherson/raso"
10
+ license = "MIT"
11
+ repository = "https://github.com/mmacpherson/raso"
12
+ rust-version = "1.85"
13
+ version = "0.2.0"
14
+
15
+ [workspace.dependencies]
16
+ approx = "0.5"
17
+ ndarray = "0.16"
18
+ num-traits = "0.2"
19
+ proptest = "1"
20
+ rand = { version = "0.9", default-features = false }
21
+ rand_chacha = "0.9"
22
+ rand_distr = "0.5"
23
+ rayon = "1.10"
24
+ thiserror = "2"
25
+ raso-hdbscan = { path = "crates/raso-hdbscan", version = "0.2.0", default-features = false }
26
+ raso-tsne = { path = "crates/raso-tsne", version = "0.2.0", default-features = false }
27
+ raso-umap = { path = "crates/raso-umap", version = "0.2.0", default-features = false }
28
+ raso-pca = { path = "crates/raso-pca", version = "0.2.0", default-features = false }
29
+ raso-mds = { path = "crates/raso-mds", version = "0.2.0", default-features = false }
30
+ raso-manifold = { path = "crates/raso-manifold", version = "0.2.0", default-features = false }
31
+ raso-pacmap = { path = "crates/raso-pacmap", version = "0.2.0", default-features = false }
raso-0.2.0/PKG-INFO ADDED
@@ -0,0 +1,51 @@
1
+ Metadata-Version: 2.4
2
+ Name: raso
3
+ Version: 0.2.0
4
+ Classifier: Development Status :: 3 - Alpha
5
+ Classifier: Intended Audience :: Developers
6
+ Classifier: Intended Audience :: Science/Research
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Classifier: Programming Language :: Rust
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: 3.14
14
+ Classifier: Programming Language :: Python :: 3.15
15
+ Requires-Dist: numpy>=1.24
16
+ Summary: Pure-Rust dimensionality reduction and density clustering for Python (abi3 wheels)
17
+ Author: Mike Macpherson
18
+ License: MIT
19
+ Requires-Python: >=3.11
20
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
21
+ Project-URL: Homepage, https://github.com/mmacpherson/raso
22
+ Project-URL: Repository, https://github.com/mmacpherson/raso
23
+
24
+ # raso
25
+
26
+ Pure-Rust dimensionality reduction and density clustering for Python, shipped as
27
+ a single `cp311-abi3` wheel (Python 3.11+) without Numba, LLVM, or native
28
+ BLAS/LAPACK dependencies.
29
+
30
+ Available estimators: `PCA`, `PPCA`, `TruncatedSVD`, `KernelPCA`, `MDS`,
31
+ `SpectralEmbedding`, `Isomap`, `PaCMAP`, `UMAP`, `TSNE`, and `HDBSCAN`.
32
+
33
+ ```python
34
+ import numpy as np
35
+ from raso import HDBSCAN, KernelPCA, PaCMAP, UMAP
36
+
37
+ X = np.random.default_rng(42).normal(size=(200, 32))
38
+ coords = UMAP(n_components=2, n_neighbors=15, metric="cosine", random_state=42).fit_transform(X)
39
+ labels = HDBSCAN(min_cluster_size=5).fit_predict(coords)
40
+ kpca = KernelPCA(n_components=2, kernel="rbf", gamma=0.1).fit_transform(X)
41
+ pacmap = PaCMAP(n_neighbors=10, random_state=42).fit_transform(X)
42
+ ```
43
+
44
+ Inputs are dense array-like matrices; estimators follow a scikit-learn-compatible
45
+ API (`fit`, `fit_transform`, `transform`, `fit_predict`, `get_params`,
46
+ `set_params`). Disconnected Isomap/spectral graphs raise an explicit error
47
+ rather than inventing links.
48
+
49
+ See the [repository README](https://github.com/mmacpherson/raso#readme) for
50
+ method semantics, complexity, feature flags, and the interactive WebAssembly demo.
51
+
raso-0.2.0/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # raso
2
+
3
+ Pure-Rust dimensionality reduction and density clustering for Python, shipped as
4
+ a single `cp311-abi3` wheel (Python 3.11+) without Numba, LLVM, or native
5
+ BLAS/LAPACK dependencies.
6
+
7
+ Available estimators: `PCA`, `PPCA`, `TruncatedSVD`, `KernelPCA`, `MDS`,
8
+ `SpectralEmbedding`, `Isomap`, `PaCMAP`, `UMAP`, `TSNE`, and `HDBSCAN`.
9
+
10
+ ```python
11
+ import numpy as np
12
+ from raso import HDBSCAN, KernelPCA, PaCMAP, UMAP
13
+
14
+ X = np.random.default_rng(42).normal(size=(200, 32))
15
+ coords = UMAP(n_components=2, n_neighbors=15, metric="cosine", random_state=42).fit_transform(X)
16
+ labels = HDBSCAN(min_cluster_size=5).fit_predict(coords)
17
+ kpca = KernelPCA(n_components=2, kernel="rbf", gamma=0.1).fit_transform(X)
18
+ pacmap = PaCMAP(n_neighbors=10, random_state=42).fit_transform(X)
19
+ ```
20
+
21
+ Inputs are dense array-like matrices; estimators follow a scikit-learn-compatible
22
+ API (`fit`, `fit_transform`, `transform`, `fit_predict`, `get_params`,
23
+ `set_params`). Disconnected Isomap/spectral graphs raise an explicit error
24
+ rather than inventing links.
25
+
26
+ See the [repository README](https://github.com/mmacpherson/raso#readme) for
27
+ method semantics, complexity, feature flags, and the interactive WebAssembly demo.
@@ -0,0 +1,526 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "autocfg"
7
+ version = "1.5.1"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
10
+
11
+ [[package]]
12
+ name = "cfg-if"
13
+ version = "1.0.5"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
16
+
17
+ [[package]]
18
+ name = "crossbeam-deque"
19
+ version = "0.8.8"
20
+ source = "registry+https://github.com/rust-lang/crates.io-index"
21
+ checksum = "622f3fc73690be383c7214310406f28a90e6edeadc3cea882f9d71e495b9711a"
22
+ dependencies = [
23
+ "crossbeam-epoch",
24
+ "crossbeam-utils",
25
+ ]
26
+
27
+ [[package]]
28
+ name = "crossbeam-epoch"
29
+ version = "0.9.21"
30
+ source = "registry+https://github.com/rust-lang/crates.io-index"
31
+ checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d"
32
+ dependencies = [
33
+ "crossbeam-utils",
34
+ ]
35
+
36
+ [[package]]
37
+ name = "crossbeam-utils"
38
+ version = "0.8.23"
39
+ source = "registry+https://github.com/rust-lang/crates.io-index"
40
+ checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6"
41
+
42
+ [[package]]
43
+ name = "either"
44
+ version = "1.19.0"
45
+ source = "registry+https://github.com/rust-lang/crates.io-index"
46
+ checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be"
47
+
48
+ [[package]]
49
+ name = "getrandom"
50
+ version = "0.3.4"
51
+ source = "registry+https://github.com/rust-lang/crates.io-index"
52
+ checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
53
+ dependencies = [
54
+ "cfg-if",
55
+ "libc",
56
+ "r-efi",
57
+ "wasip2",
58
+ ]
59
+
60
+ [[package]]
61
+ name = "heck"
62
+ version = "0.5.0"
63
+ source = "registry+https://github.com/rust-lang/crates.io-index"
64
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
65
+
66
+ [[package]]
67
+ name = "indoc"
68
+ version = "2.0.8"
69
+ source = "registry+https://github.com/rust-lang/crates.io-index"
70
+ checksum = "a37b2691796cffeb8a8cd305ac66e65841559f147f4e63231d0eafa4db5384d1"
71
+ dependencies = [
72
+ "rustversion",
73
+ ]
74
+
75
+ [[package]]
76
+ name = "libc"
77
+ version = "0.2.191"
78
+ source = "registry+https://github.com/rust-lang/crates.io-index"
79
+ checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
80
+
81
+ [[package]]
82
+ name = "matrixmultiply"
83
+ version = "0.3.11"
84
+ source = "registry+https://github.com/rust-lang/crates.io-index"
85
+ checksum = "3f607c237553f086e7043417a51df26b2eb899d3caff94e6a67592ff992fedc7"
86
+ dependencies = [
87
+ "autocfg",
88
+ "rawpointer",
89
+ ]
90
+
91
+ [[package]]
92
+ name = "memoffset"
93
+ version = "0.9.1"
94
+ source = "registry+https://github.com/rust-lang/crates.io-index"
95
+ checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
96
+ dependencies = [
97
+ "autocfg",
98
+ ]
99
+
100
+ [[package]]
101
+ name = "ndarray"
102
+ version = "0.16.1"
103
+ source = "registry+https://github.com/rust-lang/crates.io-index"
104
+ checksum = "882ed72dce9365842bf196bdeedf5055305f11fc8c03dee7bb0194a6cad34841"
105
+ dependencies = [
106
+ "matrixmultiply",
107
+ "num-complex",
108
+ "num-integer",
109
+ "num-traits",
110
+ "portable-atomic",
111
+ "portable-atomic-util",
112
+ "rawpointer",
113
+ ]
114
+
115
+ [[package]]
116
+ name = "num-complex"
117
+ version = "0.4.6"
118
+ source = "registry+https://github.com/rust-lang/crates.io-index"
119
+ checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
120
+ dependencies = [
121
+ "num-traits",
122
+ ]
123
+
124
+ [[package]]
125
+ name = "num-integer"
126
+ version = "0.1.47"
127
+ source = "registry+https://github.com/rust-lang/crates.io-index"
128
+ checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b"
129
+ dependencies = [
130
+ "num-traits",
131
+ ]
132
+
133
+ [[package]]
134
+ name = "num-traits"
135
+ version = "0.2.19"
136
+ source = "registry+https://github.com/rust-lang/crates.io-index"
137
+ checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
138
+ dependencies = [
139
+ "autocfg",
140
+ ]
141
+
142
+ [[package]]
143
+ name = "numpy"
144
+ version = "0.24.0"
145
+ source = "registry+https://github.com/rust-lang/crates.io-index"
146
+ checksum = "a7cfbf3f0feededcaa4d289fe3079b03659e85c5b5a177f4ba6fb01ab4fb3e39"
147
+ dependencies = [
148
+ "libc",
149
+ "ndarray",
150
+ "num-complex",
151
+ "num-integer",
152
+ "num-traits",
153
+ "pyo3",
154
+ "pyo3-build-config",
155
+ "rustc-hash",
156
+ ]
157
+
158
+ [[package]]
159
+ name = "once_cell"
160
+ version = "1.21.4"
161
+ source = "registry+https://github.com/rust-lang/crates.io-index"
162
+ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
163
+
164
+ [[package]]
165
+ name = "portable-atomic"
166
+ version = "1.15.0"
167
+ source = "registry+https://github.com/rust-lang/crates.io-index"
168
+ checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
169
+
170
+ [[package]]
171
+ name = "portable-atomic-util"
172
+ version = "0.2.8"
173
+ source = "registry+https://github.com/rust-lang/crates.io-index"
174
+ checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715"
175
+ dependencies = [
176
+ "portable-atomic",
177
+ ]
178
+
179
+ [[package]]
180
+ name = "ppv-lite86"
181
+ version = "0.2.21"
182
+ source = "registry+https://github.com/rust-lang/crates.io-index"
183
+ checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
184
+ dependencies = [
185
+ "zerocopy",
186
+ ]
187
+
188
+ [[package]]
189
+ name = "proc-macro2"
190
+ version = "1.0.107"
191
+ source = "registry+https://github.com/rust-lang/crates.io-index"
192
+ checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
193
+ dependencies = [
194
+ "unicode-ident",
195
+ ]
196
+
197
+ [[package]]
198
+ name = "pyo3"
199
+ version = "0.24.2"
200
+ source = "registry+https://github.com/rust-lang/crates.io-index"
201
+ checksum = "e5203598f366b11a02b13aa20cab591229ff0a89fd121a308a5df751d5fc9219"
202
+ dependencies = [
203
+ "cfg-if",
204
+ "indoc",
205
+ "libc",
206
+ "memoffset",
207
+ "once_cell",
208
+ "portable-atomic",
209
+ "pyo3-build-config",
210
+ "pyo3-ffi",
211
+ "pyo3-macros",
212
+ "unindent",
213
+ ]
214
+
215
+ [[package]]
216
+ name = "pyo3-build-config"
217
+ version = "0.24.2"
218
+ source = "registry+https://github.com/rust-lang/crates.io-index"
219
+ checksum = "99636d423fa2ca130fa5acde3059308006d46f98caac629418e53f7ebb1e9999"
220
+ dependencies = [
221
+ "once_cell",
222
+ "target-lexicon",
223
+ ]
224
+
225
+ [[package]]
226
+ name = "pyo3-ffi"
227
+ version = "0.24.2"
228
+ source = "registry+https://github.com/rust-lang/crates.io-index"
229
+ checksum = "78f9cf92ba9c409279bc3305b5409d90db2d2c22392d443a87df3a1adad59e33"
230
+ dependencies = [
231
+ "libc",
232
+ "pyo3-build-config",
233
+ ]
234
+
235
+ [[package]]
236
+ name = "pyo3-macros"
237
+ version = "0.24.2"
238
+ source = "registry+https://github.com/rust-lang/crates.io-index"
239
+ checksum = "0b999cb1a6ce21f9a6b147dcf1be9ffedf02e0043aec74dc390f3007047cecd9"
240
+ dependencies = [
241
+ "proc-macro2",
242
+ "pyo3-macros-backend",
243
+ "quote",
244
+ "syn 2.0.119",
245
+ ]
246
+
247
+ [[package]]
248
+ name = "pyo3-macros-backend"
249
+ version = "0.24.2"
250
+ source = "registry+https://github.com/rust-lang/crates.io-index"
251
+ checksum = "822ece1c7e1012745607d5cf0bcb2874769f0f7cb34c4cde03b9358eb9ef911a"
252
+ dependencies = [
253
+ "heck",
254
+ "proc-macro2",
255
+ "pyo3-build-config",
256
+ "quote",
257
+ "syn 2.0.119",
258
+ ]
259
+
260
+ [[package]]
261
+ name = "quote"
262
+ version = "1.0.47"
263
+ source = "registry+https://github.com/rust-lang/crates.io-index"
264
+ checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
265
+ dependencies = [
266
+ "proc-macro2",
267
+ ]
268
+
269
+ [[package]]
270
+ name = "r-efi"
271
+ version = "5.3.0"
272
+ source = "registry+https://github.com/rust-lang/crates.io-index"
273
+ checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
274
+
275
+ [[package]]
276
+ name = "rand"
277
+ version = "0.9.5"
278
+ source = "registry+https://github.com/rust-lang/crates.io-index"
279
+ checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41"
280
+ dependencies = [
281
+ "rand_core",
282
+ ]
283
+
284
+ [[package]]
285
+ name = "rand_chacha"
286
+ version = "0.9.0"
287
+ source = "registry+https://github.com/rust-lang/crates.io-index"
288
+ checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
289
+ dependencies = [
290
+ "ppv-lite86",
291
+ "rand_core",
292
+ ]
293
+
294
+ [[package]]
295
+ name = "rand_core"
296
+ version = "0.9.5"
297
+ source = "registry+https://github.com/rust-lang/crates.io-index"
298
+ checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c"
299
+ dependencies = [
300
+ "getrandom",
301
+ ]
302
+
303
+ [[package]]
304
+ name = "raso"
305
+ version = "0.2.0"
306
+ dependencies = [
307
+ "raso-hdbscan",
308
+ "raso-manifold",
309
+ "raso-mds",
310
+ "raso-pacmap",
311
+ "raso-pca",
312
+ "raso-tsne",
313
+ "raso-umap",
314
+ ]
315
+
316
+ [[package]]
317
+ name = "raso-hdbscan"
318
+ version = "0.2.0"
319
+ dependencies = [
320
+ "ndarray",
321
+ "rayon",
322
+ "thiserror",
323
+ ]
324
+
325
+ [[package]]
326
+ name = "raso-manifold"
327
+ version = "0.2.0"
328
+ dependencies = [
329
+ "ndarray",
330
+ "raso-mds",
331
+ "thiserror",
332
+ ]
333
+
334
+ [[package]]
335
+ name = "raso-mds"
336
+ version = "0.2.0"
337
+ dependencies = [
338
+ "ndarray",
339
+ "thiserror",
340
+ ]
341
+
342
+ [[package]]
343
+ name = "raso-pacmap"
344
+ version = "0.2.0"
345
+ dependencies = [
346
+ "ndarray",
347
+ "rand",
348
+ "rand_chacha",
349
+ "thiserror",
350
+ ]
351
+
352
+ [[package]]
353
+ name = "raso-pca"
354
+ version = "0.2.0"
355
+ dependencies = [
356
+ "ndarray",
357
+ "rand",
358
+ "rand_chacha",
359
+ "thiserror",
360
+ ]
361
+
362
+ [[package]]
363
+ name = "raso-python"
364
+ version = "0.2.0"
365
+ dependencies = [
366
+ "ndarray",
367
+ "numpy",
368
+ "pyo3",
369
+ "raso",
370
+ ]
371
+
372
+ [[package]]
373
+ name = "raso-tsne"
374
+ version = "0.2.0"
375
+ dependencies = [
376
+ "ndarray",
377
+ "rand",
378
+ "rand_chacha",
379
+ "rayon",
380
+ "thiserror",
381
+ ]
382
+
383
+ [[package]]
384
+ name = "raso-umap"
385
+ version = "0.2.0"
386
+ dependencies = [
387
+ "ndarray",
388
+ "num-traits",
389
+ "rand",
390
+ "rand_chacha",
391
+ "rayon",
392
+ "thiserror",
393
+ ]
394
+
395
+ [[package]]
396
+ name = "rawpointer"
397
+ version = "0.2.1"
398
+ source = "registry+https://github.com/rust-lang/crates.io-index"
399
+ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
400
+
401
+ [[package]]
402
+ name = "rayon"
403
+ version = "1.12.0"
404
+ source = "registry+https://github.com/rust-lang/crates.io-index"
405
+ checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d"
406
+ dependencies = [
407
+ "either",
408
+ "rayon-core",
409
+ ]
410
+
411
+ [[package]]
412
+ name = "rayon-core"
413
+ version = "1.13.0"
414
+ source = "registry+https://github.com/rust-lang/crates.io-index"
415
+ checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
416
+ dependencies = [
417
+ "crossbeam-deque",
418
+ "crossbeam-utils",
419
+ ]
420
+
421
+ [[package]]
422
+ name = "rustc-hash"
423
+ version = "2.1.3"
424
+ source = "registry+https://github.com/rust-lang/crates.io-index"
425
+ checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
426
+
427
+ [[package]]
428
+ name = "rustversion"
429
+ version = "1.0.23"
430
+ source = "registry+https://github.com/rust-lang/crates.io-index"
431
+ checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
432
+
433
+ [[package]]
434
+ name = "syn"
435
+ version = "2.0.119"
436
+ source = "registry+https://github.com/rust-lang/crates.io-index"
437
+ checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
438
+ dependencies = [
439
+ "proc-macro2",
440
+ "quote",
441
+ "unicode-ident",
442
+ ]
443
+
444
+ [[package]]
445
+ name = "syn"
446
+ version = "3.0.10"
447
+ source = "registry+https://github.com/rust-lang/crates.io-index"
448
+ checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79"
449
+ dependencies = [
450
+ "proc-macro2",
451
+ "quote",
452
+ "unicode-ident",
453
+ ]
454
+
455
+ [[package]]
456
+ name = "target-lexicon"
457
+ version = "0.13.6"
458
+ source = "registry+https://github.com/rust-lang/crates.io-index"
459
+ checksum = "8c447be3a2abfa84b2d91680c56600bd6b2873866de27b36ec911be705e291da"
460
+
461
+ [[package]]
462
+ name = "thiserror"
463
+ version = "2.0.21"
464
+ source = "registry+https://github.com/rust-lang/crates.io-index"
465
+ checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e"
466
+ dependencies = [
467
+ "thiserror-impl",
468
+ ]
469
+
470
+ [[package]]
471
+ name = "thiserror-impl"
472
+ version = "2.0.21"
473
+ source = "registry+https://github.com/rust-lang/crates.io-index"
474
+ checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
475
+ dependencies = [
476
+ "proc-macro2",
477
+ "quote",
478
+ "syn 3.0.10",
479
+ ]
480
+
481
+ [[package]]
482
+ name = "unicode-ident"
483
+ version = "1.0.27"
484
+ source = "registry+https://github.com/rust-lang/crates.io-index"
485
+ checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
486
+
487
+ [[package]]
488
+ name = "unindent"
489
+ version = "0.2.4"
490
+ source = "registry+https://github.com/rust-lang/crates.io-index"
491
+ checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
492
+
493
+ [[package]]
494
+ name = "wasip2"
495
+ version = "1.0.4+wasi-0.2.12"
496
+ source = "registry+https://github.com/rust-lang/crates.io-index"
497
+ checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487"
498
+ dependencies = [
499
+ "wit-bindgen",
500
+ ]
501
+
502
+ [[package]]
503
+ name = "wit-bindgen"
504
+ version = "0.57.1"
505
+ source = "registry+https://github.com/rust-lang/crates.io-index"
506
+ checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"
507
+
508
+ [[package]]
509
+ name = "zerocopy"
510
+ version = "0.8.66"
511
+ source = "registry+https://github.com/rust-lang/crates.io-index"
512
+ checksum = "cba8a86aee14fc8cc6c208af60854b3d4ab7185a9a369a12c648faa2716ff42a"
513
+ dependencies = [
514
+ "zerocopy-derive",
515
+ ]
516
+
517
+ [[package]]
518
+ name = "zerocopy-derive"
519
+ version = "0.8.66"
520
+ source = "registry+https://github.com/rust-lang/crates.io-index"
521
+ checksum = "f89bca3b96ceb3cfcb4572790402f977442270d252b9a8504ebc258760c55f94"
522
+ dependencies = [
523
+ "proc-macro2",
524
+ "quote",
525
+ "syn 2.0.119",
526
+ ]
@@ -0,0 +1,18 @@
1
+ [package]
2
+ name = "raso-python"
3
+ version = "0.2.0"
4
+ edition = "2024"
5
+ license = "MIT"
6
+ publish = false
7
+ description = "Python (PyO3 abi3) bindings for raso dimensionality reduction and clustering"
8
+ readme = "README.md"
9
+
10
+ [lib]
11
+ name = "_raso"
12
+ crate-type = ["cdylib"]
13
+
14
+ [dependencies]
15
+ ndarray = "0.16"
16
+ numpy = "0.24"
17
+ pyo3 = { version = "0.24", features = ["extension-module", "abi3-py311"] }
18
+ raso = { path = "../../crates/raso" }
@@ -0,0 +1,27 @@
1
+ # raso
2
+
3
+ Pure-Rust dimensionality reduction and density clustering for Python, shipped as
4
+ a single `cp311-abi3` wheel (Python 3.11+) without Numba, LLVM, or native
5
+ BLAS/LAPACK dependencies.
6
+
7
+ Available estimators: `PCA`, `PPCA`, `TruncatedSVD`, `KernelPCA`, `MDS`,
8
+ `SpectralEmbedding`, `Isomap`, `PaCMAP`, `UMAP`, `TSNE`, and `HDBSCAN`.
9
+
10
+ ```python
11
+ import numpy as np
12
+ from raso import HDBSCAN, KernelPCA, PaCMAP, UMAP
13
+
14
+ X = np.random.default_rng(42).normal(size=(200, 32))
15
+ coords = UMAP(n_components=2, n_neighbors=15, metric="cosine", random_state=42).fit_transform(X)
16
+ labels = HDBSCAN(min_cluster_size=5).fit_predict(coords)
17
+ kpca = KernelPCA(n_components=2, kernel="rbf", gamma=0.1).fit_transform(X)
18
+ pacmap = PaCMAP(n_neighbors=10, random_state=42).fit_transform(X)
19
+ ```
20
+
21
+ Inputs are dense array-like matrices; estimators follow a scikit-learn-compatible
22
+ API (`fit`, `fit_transform`, `transform`, `fit_predict`, `get_params`,
23
+ `set_params`). Disconnected Isomap/spectral graphs raise an explicit error
24
+ rather than inventing links.
25
+
26
+ See the [repository README](https://github.com/mmacpherson/raso#readme) for
27
+ method semantics, complexity, feature flags, and the interactive WebAssembly demo.