DADApy is a Python package for the characterisation of manifolds in high dimensional spaces.
For more details and tutorials, visit the homepage at: https://dadapy.readthedocs.io/
import numpy as np
from dadapy.data import Data
# Generate a simple 3D gaussian dataset
X = np.random.normal(0, 1, (1000, 3))
# initialise the "Data" class with the set of coordinates
data = Data(X)
# compute distances up to the 100th nearest neighbour
data.compute_distances(maxk=100)
# compute the intrinsic dimension using 2nn estimator
data.compute_id_2NN()
# compute the density using PAk, a point adaptive kNN estimator
data.compute_density_PAk()
# find the peaks of the density profile through the ADP algorithm
data.compute_clustering_ADP()
-
Two-NN estimator
Facco et al., Scientific Reports (2017)
-
Gride estimator
Denti et al., arXiv (2021)
-
kNN estimator
-
k*NN estimator (kNN with adaptive choice of k)
-
PAk estimator
Rodriguez et al., JCTC (2018)
-
Density peaks clustering
Rodriguez and Laio, Science (2014)
-
Advanced density peaks clustering
d’Errico et al., Information Sciences (2021)
-
k-peak clustering
Sormani, Rodriguez and Laio, JCTC (2020)
-
Neighbourhood overlap
Doimo et al., NeurIPS (2020)
-
Information imbalance
Glielmo et al., PNAS Nexus (2022)
The package is compatible with Python >= 3.7 (tested on 3.7, 3.8 and 3.9). We currently only support Unix-based systems, including Linux and macOS. For Windows-machines we suggest using the Windows Subsystem for Linux (WSL).
The package requires numpy
, scipy
and scikit-learn
, and matplotlib
for the visualisations.
The package contains Cython-generated C extensions that are automatically compiled during install.
The latest release is available through pip
pip install dadapy
To install the latest development version, clone the source code from github and install it with pip as follows
git clone https://github.com/sissa-data-science/DADApy.git
cd DADApy
pip install .
A description of the package is available here.
Please consider citing it if you found this package useful for your research
@article{dadapy,
author = {Glielmo, Aldo and Macocco, Iuri and Doimo, Diego and Carli, Matteo and Zeni, Claudio and Wild, Romina and d'Errico, Maria and Rodriguez, Alex and Laio Alessandro},
title = {{DADApy: Distance-based Analysis of DAta-manifolds in Python}},
journal = {arXiv preprint arXiv:2205.03373},
year = {2022},
doi = {https://doi.org/10.48550/arXiv.2205.03373},
url = {https://arxiv.org/abs/2205.03373},
}