You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### <aname='InstallfromPyPIviapip'></a>Install from PyPI via pip
56
56
57
57
You can use [pip](https://pip.pypa.io/en/stable/) to install pacmap from PyPI.
58
-
It will automatically install the dependencies for you:
59
58
59
+
**Basic installation** (includes FAISS as the default KNN backend):
60
60
```bash
61
61
pip install pacmap
62
62
```
63
63
64
-
If you have any problems during the installation of dependencies, such as
65
-
`Failed building wheel for annoy`, you can try to install these dependencies
66
-
with `conda` or `mamba`. Users have also reported that in some cases, you may
67
-
wish to use `numba >= 0.57`.
64
+
**Optional KNN backends:**
65
+
66
+
PaCMAP supports multiple KNN backends. Install optional backends as needed:
68
67
69
68
```bash
70
-
conda install -c conda-forge python-annoy
71
-
pip install pacmap
69
+
# Install with Annoy backend
70
+
pip install pacmap[annoy]
71
+
72
+
# Install with Voyager backend
73
+
pip install pacmap[voyager]
74
+
75
+
# Install all optional backends
76
+
pip install pacmap[all]
72
77
```
73
78
79
+
> **Note:** The original PaCMAP paper used Annoy as the default KNN backend. Since the Annoy package is no longer actively maintained, we have switched to FAISS as the default backend for better long-term stability and performance. Annoy remains available as an optional backend for compatibility.
80
+
81
+
If you have any problems during the installation, you can try installing dependencies
82
+
with `conda` or `mamba`. Users have also reported that in some cases, you may
83
+
wish to use `numba >= 0.57`.
84
+
74
85
## <aname='Usage'></a>Usage
75
86
76
87
### <aname='UsingPaCMAPinPython'></a>Using PaCMAP in Python
@@ -146,6 +157,8 @@ Other parameters include:
146
157
-`lr`: learning rate of the AdaGrad optimizer. Default to 1.
147
158
-`apply_pca`: whether pacmap should apply PCA to the data before constructing the k-Nearest Neighbor graph. Using PCA to preprocess the data can largely accelerate the DR process without losing too much accuracy. Notice that this option does not affect the initialization of the optimization process.
148
159
-`intermediate`: whether pacmap should also output the intermediate stages of the optimization process of the lower dimension embedding. If `True`, then the output will be a numpy array of the size (n, `n_components`, 13), where each slice is a "screenshot" of the output embedding at a particular number of steps, from [0, 10, 30, 60, 100, 120, 140, 170, 200, 250, 300, 350, 450].
160
+
-`nn_backend`: the backend used to construct the k-Nearest Neighbor graph. One of `"annoy"`, `"faiss"`, or `"voyager"`. Default to `"faiss"`. **Note:** The original paper used Annoy, but FAISS is now the default since Annoy is no longer actively maintained.
161
+
-`low_dist_thres`[Only Used in `LocalMAP`]: The Proximal Cluster Distance Commons, the acceptance distance threshold for selecting local FP with distance no larger than the average low-dimension distance among all nearest clusters pair. Default to 10.
149
162
150
163
## <aname='Methods'></a>Methods
151
164
@@ -173,7 +186,27 @@ We test against several version of Python. (See [`.github/workflows/test.yml`][w
173
186
174
187
If you are contributing code, please confirm our tests pass, and consider adding your own for any new functionality.
175
188
176
-
You may run the test suite like so:
189
+
### Development with UV (Recommended)
190
+
191
+
We use [UV](https://docs.astral.sh/uv/) for fast, reproducible dependency management. To set up your development environment:
Copy file name to clipboardExpand all lines: release_notes.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,13 @@
1
1
# Release Notes
2
2
3
+
- 0.9.0
4
+
5
+
Add `Voyager` and `FAISS` backend within the package ([136](https://github.com/YingfanWang/PaCMAP/issues/136) and [94](https://github.com/YingfanWang/PaCMAP/issues/94)) based on the pull request from @Tyrannas in https://github.com/YingfanWang/PaCMAP/pull/137.
6
+
7
+
Fixed https://github.com/YingfanWang/PaCMAP/issues/127, https://github.com/YingfanWang/PaCMAP/issues/128 for PaCMAP hangs
0 commit comments