DREiMac

DREiMac: Dimensionality Reduction with Eilenberg-MacLane Coordinates - Published in JOSS (2023)

https://github.com/scikit-tda/dreimac

Science Score: 93.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 8 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

dimensionality-reduction manifold-learning topological-data-analysis

Keywords from Contributors

homology persistent-homology ripser tda topology

Scientific Fields

Mathematics Computer Science - 84% confidence
Last synced: 6 months ago · JSON representation

Repository

Dimensionality Reduction with Eilenberg-MacLane Coordinates

Basic Info
  • Host: GitHub
  • Owner: scikit-tda
  • License: apache-2.0
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 29.8 MB
Statistics
  • Stars: 42
  • Watchers: 6
  • Forks: 14
  • Open Issues: 3
  • Releases: 6
Topics
dimensionality-reduction manifold-learning topological-data-analysis
Created almost 9 years ago · Last pushed 8 months ago
Metadata Files
Readme Changelog License Code of conduct

README.md

PyPI version Downloads codecov License docs DOI

DREiMac: Dimensionality Reduction with Eilenberg-MacLane Coordinates

DREiMac is a library for topological data coordinatization, visualization, and dimensionality reduction. Currently, DREiMac is able to find topology-preserving representations of point clouds taking values in the circle, in higher dimensional tori, in the real and complex projective space, and in lens spaces.

In a few words, DREiMac takes as input a point cloud together with a topological feature of the point cloud (in the form of a persistent cohomology class), and returns a map from the point cloud to a well-understood topological space (a circle, a product of circles, a projective space, or a lens space), which preserves the given topological feature in a precise sense. For more information, please check the theory and examples in the documentation.

Basic usage

Here is a simple example; please check the Jupyter notebooks in the notebooks directory for further examples.

```python

basic imports

from dreimac import CircularCoords from persim import plot_diagrams import matplotlib.pyplot as plt import numpy as np

prepare plot with 4 subplots

f, (a0, a1, a2, a3) = plt.subplots(1, 4, width_ratios=[1, 1, 1, 0.2], figsize=(14,3))

200 samples from a noisy circle

nsamples = 200 np.random.seed(0) Z = np.random.random((nsamples, 2)) - 0.5 X = Z / np.linalg.norm(Z, axis=1).reshape((nsamples, 1)) + (np.random.random((nsamples, 2)) - 0.5) * 0.2

plot point cloud

a0.scatter(X[:,0], X[:,1], s=10) a0.settitle("Input point cloud") ; a0.axis("off") ; a0.setaspect("equal")

plot the persistence diagram, showing a single prominent class

cc = CircularCoords(X, nlandmarks=200) plotdiagrams(cc._dgms, title="Persistence diagram", ax=a1)

plot the data colored by the circle-valued map constructed by DREiMac

circularcoordinates = cc.getcoordinates() a2.scatter(X[:,0], X[:,1], c=circularcoordinates, s=10, cmap="viridis") a2.settitle("Input colored by circular coordinate") ; a2.axis("off") ; a2.set_aspect("equal")

plot colorbar

img = a3.imshow([[0,1]], cmap="viridis"); a3.setvisible(False) cb = plt.colorbar(mappable=img,ticks=[0,0.5,1]) ; _ = cb.ax.setyticklabels(["0","$\pi$","2$\pi$"]) ```

output

More examples

For Jupyter notebooks with more examples, please check the documentation or this repository's docs/notebooks directory.

Installing

Make sure your Python version is >=3.8 and <3.12. DREiMac depends on the following python packages, which will be installed automatically when you install with pip: matplotlib, numba, numpy, persim, ripser, and scipy.

To install the latest release:

~~~~~ bash pip install dreimac ~~~~~

To install directly from GitHub:

~~~~~ bash pip install git+https://github.com/scikit-tda/DREiMac.git ~~~~~

Documentation and support

You can find the documentation here, including the API reference. If you have further questions, please open an issue and we will do our best to help you. Please include as much information as possible, including your system's information, warnings, logs, screenshots, and anything else you think may be of use.

Running the tests

If you want to check that your machine is running DREiMac properly, you may run the tests by running the following commands from the root directory of a clone of this repository.

bash pip install pytest pip install -r requirements.txt pytest .

Contributing

To contribute, you can fork the project, make your changes, and submit a pull request. If you're looking for a way to contribute, you could consider: * adding documentation to existing functionality; * adding missing tests to improve coverage; * adding a Jupyter notebook with a tutorial or demo; * adding functionality and the corresponding documentation and tests; * responding to a bug or feature request in the Github issues.

Citing

If you use this package, please cite the JOSS paper found here, using the following bibtex entry.

@article{Perea2023, doi = {10.21105/joss.05791}, url = {https://doi.org/10.21105/joss.05791}, year = {2023}, publisher = {The Open Journal}, volume = {8}, number = {91}, pages = {5791}, author = {Jose A. Perea and Luis Scoccola and Christopher J. Tralie}, title = {DREiMac: Dimensionality Reduction with Eilenberg-MacLane Coordinates}, journal = {Journal of Open Source Software} }

Acknowledgements

We thank Tom Mease for contributions and discussions. J.A.P. and L.S. were partially supported by the National Science Foundation through grants CCF-2006661 and CAREER award DMS-1943758.

License

This software is published under Apache License Version 2.0.

Owner

  • Name: Scikit-TDA
  • Login: scikit-tda
  • Kind: organization

Topological Data Analysis for the Python ecosystem.

JOSS Publication

DREiMac: Dimensionality Reduction with Eilenberg-MacLane Coordinates
Published
November 17, 2023
Volume 8, Issue 91, Page 5791
Authors
Jose A. Perea ORCID
Northeastern University
Luis Scoccola ORCID
University of Oxford
Christopher J. Tralie ORCID
Ursinus College
Editor
Fabian Scheipl ORCID
Tags
topological data analysis unsupervised learning dimensionality reduction

GitHub Events

Total
  • Watch event: 4
  • Issue comment event: 3
  • Push event: 4
  • Pull request review event: 1
  • Pull request review comment event: 1
  • Pull request event: 5
  • Fork event: 1
Last Year
  • Watch event: 4
  • Issue comment event: 3
  • Push event: 4
  • Pull request review event: 1
  • Pull request review comment event: 1
  • Pull request event: 5
  • Fork event: 1

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 246
  • Total Committers: 7
  • Avg Commits per committer: 35.143
  • Development Distribution Score (DDS): 0.467
Past Year
  • Commits: 12
  • Committers: 4
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.5
Top Committers
Name Email Commits
Chris Tralie c****e@g****m 131
Luis Scoccola l****a@g****m 92
tmease5580 t****0@g****m 12
Tanishqbh t****h@g****m 4
Jose Perea j****a@g****m 4
Michael Catanzaro c****j@p****e 2
Vincent Grande 1****e 1
Committer Domains (Top 20 + Academic)
pm.me: 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 3
  • Total pull requests: 20
  • Average time to close issues: over 2 years
  • Average time to close pull requests: 14 days
  • Total issue authors: 3
  • Total pull request authors: 9
  • Average comments per issue: 2.0
  • Average comments per pull request: 1.15
  • Merged pull requests: 17
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 0
  • Pull requests: 7
  • Average time to close issues: N/A
  • Average time to close pull requests: 2 days
  • Issue authors: 0
  • Pull request authors: 3
  • Average comments per issue: 0
  • Average comments per pull request: 1.86
  • Merged pull requests: 6
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ctralie (1)
  • wreise (1)
  • mtsch (1)
Pull Request Authors
  • Tanishqbh (9)
  • ctralie (6)
  • catanzaromj (4)
  • vincent-grande (2)
  • wreise (1)
  • dependabot[bot] (1)
  • mtsch (1)
  • danielskatz (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 47 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 6
  • Total maintainers: 4
pypi.org: dreimac

DREiMac: Dimensionality reduction with Eilenberg-MacLane coordinates

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 47 Last month
Rankings
Dependent packages count: 6.6%
Average: 18.6%
Dependent repos count: 30.6%
Last synced: 6 months ago

Dependencies

requirements.txt pypi
  • jupyter ==1.0.0
  • matplotlib ==3.2.2
  • numba ==0.50.1
  • numpy ==1.18.5
  • persim ==0.1.3
  • ripser ==0.5.3
  • scikit-tda ==0.0.3
  • scipy ==1.5.0
  • screeninfo ==0.6.5
setup.py pypi
  • cython *
  • jupyter *
  • matplotlib *
  • numba *
  • numpy *
  • persim *
  • ripser *
  • scipy *
  • screeninfo *