Metadata-Version: 2.4
Name: parampacmap
Version: 0.1.1rc0
Summary: Package for Parameterized PaCMAP (ParamRepulsor).
Author-email: Haiyang Huang <hyhuang@cs.duke.edu>
License-File: LICENSE
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: <3.12,>=3.9
Requires-Dist: annoy>=1.17
Requires-Dist: numba==0.60.0
Requires-Dist: numpy<2.1,>=1.20
Requires-Dist: scikit-learn>=0.20
Provides-Extra: cpu
Requires-Dist: torch>=2.1.0; extra == 'cpu'
Provides-Extra: cu118
Requires-Dist: torch>=2.1.0; extra == 'cu118'
Provides-Extra: cu121
Requires-Dist: torch>=2.3.0; extra == 'cu121'
Provides-Extra: cu124
Requires-Dist: torch>=2.5.1; extra == 'cu124'
Provides-Extra: extras
Requires-Dist: pyyaml>=6.0.2; extra == 'extras'
Provides-Extra: mps
Requires-Dist: torch>=2.5.1; extra == 'mps'
Provides-Extra: torch200
Requires-Dist: torch==2.0.0; extra == 'torch200'
Description-Content-Type: text/markdown

# ParamRepulsor

This is the code repository for the NeurIPS 2024 paper "Navigating the Effect of Parametrization for Dimensionality Reduction". Our paper can be found [here](https://openreview.net/pdf?id=eYNYnYle41).

## How to install
This repository can be installed locally via pip by the following command:

```bash
git clone https://github.com/hyhuang00/ParamRepulsor.git
cd ParamRepulsor
pip install .
```

Note: this will not install `torch`, as this is highly platform-dependent.
This project provides optionals:

```bash
pip install .[cpu]    # cpu-only pytorch
pip install .[cu118]  # cuda 118
pip install .[cu121]  # cuda 121
pip install .[cu124]  # cuda 124
pip install .[mps]    # arm64/aarch64 (Apple M-Series chips)
```

This project also supports `uv` (`pip install uv`):

```bash
echo "3.11" > .python-version  # supported: [3.9, 3.12)
uv sync (--extra cpu)  # as appropriate for your system
uv run pytest
TORCH_DEVICE=cpu uv run pytest  # disable accelerator
```

## How to use our algorithm
ParamPaCMAP/ParamRepulsor is fully scikit-learn compatible, meaning that it can be
used as any other scikit-learn based algorithm.
After the installation, you can use our algorithm by:

```python
import parampacmap

# Initialize the reducer. Notice that by default, the stronger paramrepulsor
# algorithm will be used.
reducer = parampacmap.ParamPaCMAP()
X_low = reducer.fit_transform(X)  # Substitute your data here.
```


## Citation
If you have referred to our research in your publication, or you used the ParamRepulsor/ParamPaCMAP algorithm in this repository, please cite our paper using the following bibtex:

```
@inproceedings{huang2024navigating,
  title={Navigating the Effect of Parametrization for Dimensionality Reduction},
  author={Huang, Haiyang and Wang, Yingfan and Rudin, Cynthia},
  booktitle={The Thirty-eighth Annual Conference on Neural Information Processing Systems},
  year={2024},
}
```

## Project Contributor
A full list of project contributors can be found [here](CONTRIBUTORS.md).
