TopoEmbedX


NameTopoEmbedX JSON
Version 0.0.2.dev131 PyPI version JSON
download
home_pageNone
SummaryRepresentation Learning on Topological Domains
upload_time2024-10-20 21:56:18
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseCopyright (c) 2022 pyt-team authors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h2 align="center">
  <img src="https://raw.githubusercontent.com/pyt-team/TopoEmbedX/main/resources/logo.png" height="250">
</h2>

<h3 align="center">
    Representation Learning on Topological Domains
</h3>

<p align="center">
  <a href="#%EF%B8%8F-main-features">Main Features</a> •
  <a href="#-installing-topoembedx">Installing TopoEmbedX</a> •
  <a href="#-getting-started">Getting Started</a> •
  <a href="#-references">References</a>
</p>

<div align="center">

[![Test](https://github.com/pyt-team/TopoEmbedX/actions/workflows/test.yml/badge.svg)](https://github.com/pyt-team/TopoEmbedX/actions/workflows/test.yml)
[![Lint](https://github.com/pyt-team/TopoEmbedX/actions/workflows/lint.yml/badge.svg)](https://github.com/pyt-team/TopoEmbedX/actions/workflows/lint.yml)
[![Codecov](https://codecov.io/gh/pyt-team/TopoEmbedX/branch/main/graph/badge.svg)](https://app.codecov.io/gh/pyt-team/TopoEmbedX)
[![Docs](https://img.shields.io/badge/docs-website-brightgreen)](https://pyt-team.github.io/topoembedx/index.html)
[![Python](https://img.shields.io/badge/python-3.10+-blue?logo=python)](https://www.python.org/)
[![license](https://badgen.net/github/license/pyt-team/TopoNetX?color=green)](https://github.com/pyt-team/TopoNetX/blob/main/LICENSE)
[![slack](https://img.shields.io/badge/chat-on%20slack-purple?logo=slack)](https://join.slack.com/t/pyt-teamworkspace/shared_invite/zt-2k63sv99s-jbFMLtwzUCc8nt3sIRWjEw)

[![DOI](https://zenodo.org/badge/609414708.svg)](https://zenodo.org/badge/latestdoi/609414708)

</div>

![topoembedx](https://user-images.githubusercontent.com/8267869/234074436-402ac931-2dc9-43da-a056-6c927f613242.png)

Many natural systems as diverse as social networks and proteins are characterized by _relational structure_. This is the structure of interactions between components in the system, such as social interactions between individuals or electrostatic interactions between atoms.

How can we conveniently represent data defined on such relational systems?

`TopoEmbedX` (TEX) is a package for representation learning on topological domains, the mathematical structures of relational systems.

## 🛠️ Main Features

Support of higher order representation learning algorithms such as:

- DeepCell,
- Cell2Vec,
- Higher Order Laplacian Eigenmaps, and
- Higher Order Geometric Laplacian Eigenmaps

for the topological domains supported in [TopoNetX](https://github.com/pyt-team/TopoNetX).

## 🤖 Installing TopoEmbedX

`TopoEmbedX` is available on PyPI and can be installed using `pip`.

```bash
pip install "pygsp @ git+https://github.com/epfl-lts2/pygsp@a3412ce7696c02c8a55439e89d0c9ab8ae863269"
pip install "karateclub @ git+https://github.com/benedekrozemberczki/karateclub@cb46a91df8dcbeb2570debcf6a9d0c518107a2de"
pip install topoembedx
```

The library depends on `pygsp` and `karateclub`, which did not receive updates
on PyPI for a long time. You have to manually install the latest versions from
GitHub for up-to-date Python and NetworkX compatibility.

## 🦾 Getting Started

```ruby
import topoembedx as tex
import toponetx as tnx

# create a cell complex object with a few cells
cc = tnx.CellComplex([[1, 2, 3, 4], [3, 4, 5, 6, 7, 8]], ranks=2)

# create a model
model = tex.Cell2Vec()

# fit the model
model.fit(cc, neighborhood_type="adj", neighborhood_dim={"rank": 1, "via_rank": -1})
# here neighborhood_dim={"rank": 1, "via_rank": -1} specifies the dimension for
# which the cell embeddings are going to be computed.
# rank=1 means that the embeddings will be computed for the first dimension.
# The integer 'via_rank' is ignored and only considered
# when the input complex is a combinatorial complex or colored hypergraph.


# get the embeddings:
embeddings = model.get_embedding()
```

## 🧑‍💻 Install from source

To install the latest version from source, follow these steps:

1. Clone a copy of `TopoEmbedX` from source:

```bash
git clone https://github.com/pyt-team/TopoEmbedX
cd TopoEmbedX
```

2. If you have already cloned `TopoEmbedX` from source, update it:

```bash
git pull
```

3. Install a recent version of `pygsp` and `karateclub`:

```bash
pip install "pygsp @ git+https://github.com/epfl-lts2/pygsp@a3412ce7696c02c8a55439e89d0c9ab8ae863269"
pip install "karateclub @ git+https://github.com/benedekrozemberczki/karateclub@cb46a91df8dcbeb2570debcf6a9d0c518107a2de"
```

4. Install `TopoEmbedX` in editable mode:

```bash
pip install -e '.[all]'
```

5. Install pre-commit hooks:

```bash
pre-commit install
```

## 🔍 References

To learn more about topological representation learning.

- Mustafa Hajij, Ghada Zamzmi, Theodore Papamarkou, Nina Miolane, Aldo Guzmán-Sáenz, Karthikeyan Natesan Ramamurthy, Tolga Birdal, Tamal K. Dey, Soham Mukherjee, Shreyas N. Samaga, Neal Livesay, Robin Walters, Paul Rosen, Michael T. Schaub. [Topological Deep Learning: Going Beyond Graph Data](https://arxiv.org/abs/2206.00606).

```
@misc{hajij2023topological,
      title={Topological Deep Learning: Going Beyond Graph Data},
      author={Mustafa Hajij and Ghada Zamzmi and Theodore Papamarkou and Nina Miolane and Aldo Guzmán-Sáenz and Karthikeyan Natesan Ramamurthy and Tolga Birdal and Tamal K. Dey and Soham Mukherjee and Shreyas N. Samaga and Neal Livesay and Robin Walters and Paul Rosen and Michael T. Schaub},
      year={2023},
      eprint={2206.00606},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}
```

Figure from:

- Mathilde Papillon, Sophia Sanborn, Mustafa Hajij, Nina Miolane. [Architectures of Topological Deep Learning: A Survey on Topological Neural Networks.](https://arxiv.org/pdf/2304.10031.pdf)

```
@misc{papillon2023architectures,
      title={Architectures of Topological Deep Learning: A Survey on Topological Neural Networks},
      author={Mathilde Papillon and Sophia Sanborn and Mustafa Hajij and Nina Miolane},
      year={2023},
      eprint={2304.10031},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}
```

## Funding

<img align="right" width="200" src="https://raw.githubusercontent.com/pyt-team/TopoNetX/main/resources/erc_logo.png">

Partially funded by the European Union (ERC, HIGH-HOPeS, 101039827). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency. Neither the European Union nor the granting authority can be held responsible for them.

Partially funded by the National Science Foundation (DMS-2134231, DMS-2134241).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "TopoEmbedX",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Mustafa Hajij <mhajij@usfca.edu>, Mathilde Papillon <papillon@ucsb.edu>, Florian Frantzen <florian.frantzen@cs.rwth-aachen.de>",
    "download_url": "https://files.pythonhosted.org/packages/2e/f0/e0c6a85f609bc0cd19cc92c651f0881b06d76f4a5339d13adb814b7569ce/topoembedx-0.0.2.dev131.tar.gz",
    "platform": null,
    "description": "<h2 align=\"center\">\r\n  <img src=\"https://raw.githubusercontent.com/pyt-team/TopoEmbedX/main/resources/logo.png\" height=\"250\">\r\n</h2>\r\n\r\n<h3 align=\"center\">\r\n    Representation Learning on Topological Domains\r\n</h3>\r\n\r\n<p align=\"center\">\r\n  <a href=\"#%EF%B8%8F-main-features\">Main Features</a> \u2022\r\n  <a href=\"#-installing-topoembedx\">Installing TopoEmbedX</a> \u2022\r\n  <a href=\"#-getting-started\">Getting Started</a> \u2022\r\n  <a href=\"#-references\">References</a>\r\n</p>\r\n\r\n<div align=\"center\">\r\n\r\n[![Test](https://github.com/pyt-team/TopoEmbedX/actions/workflows/test.yml/badge.svg)](https://github.com/pyt-team/TopoEmbedX/actions/workflows/test.yml)\r\n[![Lint](https://github.com/pyt-team/TopoEmbedX/actions/workflows/lint.yml/badge.svg)](https://github.com/pyt-team/TopoEmbedX/actions/workflows/lint.yml)\r\n[![Codecov](https://codecov.io/gh/pyt-team/TopoEmbedX/branch/main/graph/badge.svg)](https://app.codecov.io/gh/pyt-team/TopoEmbedX)\r\n[![Docs](https://img.shields.io/badge/docs-website-brightgreen)](https://pyt-team.github.io/topoembedx/index.html)\r\n[![Python](https://img.shields.io/badge/python-3.10+-blue?logo=python)](https://www.python.org/)\r\n[![license](https://badgen.net/github/license/pyt-team/TopoNetX?color=green)](https://github.com/pyt-team/TopoNetX/blob/main/LICENSE)\r\n[![slack](https://img.shields.io/badge/chat-on%20slack-purple?logo=slack)](https://join.slack.com/t/pyt-teamworkspace/shared_invite/zt-2k63sv99s-jbFMLtwzUCc8nt3sIRWjEw)\r\n\r\n[![DOI](https://zenodo.org/badge/609414708.svg)](https://zenodo.org/badge/latestdoi/609414708)\r\n\r\n</div>\r\n\r\n![topoembedx](https://user-images.githubusercontent.com/8267869/234074436-402ac931-2dc9-43da-a056-6c927f613242.png)\r\n\r\nMany natural systems as diverse as social networks and proteins are characterized by _relational structure_. This is the structure of interactions between components in the system, such as social interactions between individuals or electrostatic interactions between atoms.\r\n\r\nHow can we conveniently represent data defined on such relational systems?\r\n\r\n`TopoEmbedX` (TEX) is a package for representation learning on topological domains, the mathematical structures of relational systems.\r\n\r\n## \ud83d\udee0\ufe0f Main Features\r\n\r\nSupport of higher order representation learning algorithms such as:\r\n\r\n- DeepCell,\r\n- Cell2Vec,\r\n- Higher Order Laplacian Eigenmaps, and\r\n- Higher Order Geometric Laplacian Eigenmaps\r\n\r\nfor the topological domains supported in [TopoNetX](https://github.com/pyt-team/TopoNetX).\r\n\r\n## \ud83e\udd16 Installing TopoEmbedX\r\n\r\n`TopoEmbedX` is available on PyPI and can be installed using `pip`.\r\n\r\n```bash\r\npip install \"pygsp @ git+https://github.com/epfl-lts2/pygsp@a3412ce7696c02c8a55439e89d0c9ab8ae863269\"\r\npip install \"karateclub @ git+https://github.com/benedekrozemberczki/karateclub@cb46a91df8dcbeb2570debcf6a9d0c518107a2de\"\r\npip install topoembedx\r\n```\r\n\r\nThe library depends on `pygsp` and `karateclub`, which did not receive updates\r\non PyPI for a long time. You have to manually install the latest versions from\r\nGitHub for up-to-date Python and NetworkX compatibility.\r\n\r\n## \ud83e\uddbe Getting Started\r\n\r\n```ruby\r\nimport topoembedx as tex\r\nimport toponetx as tnx\r\n\r\n# create a cell complex object with a few cells\r\ncc = tnx.CellComplex([[1, 2, 3, 4], [3, 4, 5, 6, 7, 8]], ranks=2)\r\n\r\n# create a model\r\nmodel = tex.Cell2Vec()\r\n\r\n# fit the model\r\nmodel.fit(cc, neighborhood_type=\"adj\", neighborhood_dim={\"rank\": 1, \"via_rank\": -1})\r\n# here neighborhood_dim={\"rank\": 1, \"via_rank\": -1} specifies the dimension for\r\n# which the cell embeddings are going to be computed.\r\n# rank=1 means that the embeddings will be computed for the first dimension.\r\n# The integer 'via_rank' is ignored and only considered\r\n# when the input complex is a combinatorial complex or colored hypergraph.\r\n\r\n\r\n# get the embeddings:\r\nembeddings = model.get_embedding()\r\n```\r\n\r\n## \ud83e\uddd1\u200d\ud83d\udcbb Install from source\r\n\r\nTo install the latest version from source, follow these steps:\r\n\r\n1. Clone a copy of `TopoEmbedX` from source:\r\n\r\n```bash\r\ngit clone https://github.com/pyt-team/TopoEmbedX\r\ncd TopoEmbedX\r\n```\r\n\r\n2. If you have already cloned `TopoEmbedX` from source, update it:\r\n\r\n```bash\r\ngit pull\r\n```\r\n\r\n3. Install a recent version of `pygsp` and `karateclub`:\r\n\r\n```bash\r\npip install \"pygsp @ git+https://github.com/epfl-lts2/pygsp@a3412ce7696c02c8a55439e89d0c9ab8ae863269\"\r\npip install \"karateclub @ git+https://github.com/benedekrozemberczki/karateclub@cb46a91df8dcbeb2570debcf6a9d0c518107a2de\"\r\n```\r\n\r\n4. Install `TopoEmbedX` in editable mode:\r\n\r\n```bash\r\npip install -e '.[all]'\r\n```\r\n\r\n5. Install pre-commit hooks:\r\n\r\n```bash\r\npre-commit install\r\n```\r\n\r\n## \ud83d\udd0d References\r\n\r\nTo learn more about topological representation learning.\r\n\r\n- Mustafa Hajij, Ghada Zamzmi, Theodore Papamarkou, Nina Miolane, Aldo Guzm\u00e1n-S\u00e1enz, Karthikeyan Natesan Ramamurthy, Tolga Birdal, Tamal K. Dey, Soham Mukherjee, Shreyas N. Samaga, Neal Livesay, Robin Walters, Paul Rosen, Michael T. Schaub. [Topological Deep Learning: Going Beyond Graph Data](https://arxiv.org/abs/2206.00606).\r\n\r\n```\r\n@misc{hajij2023topological,\r\n      title={Topological Deep Learning: Going Beyond Graph Data},\r\n      author={Mustafa Hajij and Ghada Zamzmi and Theodore Papamarkou and Nina Miolane and Aldo Guzm\u00e1n-S\u00e1enz and Karthikeyan Natesan Ramamurthy and Tolga Birdal and Tamal K. Dey and Soham Mukherjee and Shreyas N. Samaga and Neal Livesay and Robin Walters and Paul Rosen and Michael T. Schaub},\r\n      year={2023},\r\n      eprint={2206.00606},\r\n      archivePrefix={arXiv},\r\n      primaryClass={cs.LG}\r\n}\r\n```\r\n\r\nFigure from:\r\n\r\n- Mathilde Papillon, Sophia Sanborn, Mustafa Hajij, Nina Miolane. [Architectures of Topological Deep Learning: A Survey on Topological Neural Networks.](https://arxiv.org/pdf/2304.10031.pdf)\r\n\r\n```\r\n@misc{papillon2023architectures,\r\n      title={Architectures of Topological Deep Learning: A Survey on Topological Neural Networks},\r\n      author={Mathilde Papillon and Sophia Sanborn and Mustafa Hajij and Nina Miolane},\r\n      year={2023},\r\n      eprint={2304.10031},\r\n      archivePrefix={arXiv},\r\n      primaryClass={cs.LG}\r\n}\r\n```\r\n\r\n## Funding\r\n\r\n<img align=\"right\" width=\"200\" src=\"https://raw.githubusercontent.com/pyt-team/TopoNetX/main/resources/erc_logo.png\">\r\n\r\nPartially funded by the European Union (ERC, HIGH-HOPeS, 101039827). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency. Neither the European Union nor the granting authority can be held responsible for them.\r\n\r\nPartially funded by the National Science Foundation (DMS-2134231, DMS-2134241).\r\n",
    "bugtrack_url": null,
    "license": "Copyright (c) 2022 pyt-team authors  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Representation Learning on Topological Domains",
    "version": "0.0.2.dev131",
    "project_urls": {
        "documentation": "https://pyt-team.github.io/topoembedx/",
        "source": "https://github.com/pyt-team/TopoEmbedX/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "df81644982390810fb21557d63cae71194e05fdb6ec24200bf1f6a58f6ba7a50",
                "md5": "5939f0107756d538c4e361c9d67e8eed",
                "sha256": "58bd277c981034efda7680be0b8b7dd5f5234c8887d553ce1632201c77a82643"
            },
            "downloads": -1,
            "filename": "TopoEmbedX-0.0.2.dev131-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5939f0107756d538c4e361c9d67e8eed",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 20799,
            "upload_time": "2024-10-20T21:56:15",
            "upload_time_iso_8601": "2024-10-20T21:56:15.440661Z",
            "url": "https://files.pythonhosted.org/packages/df/81/644982390810fb21557d63cae71194e05fdb6ec24200bf1f6a58f6ba7a50/TopoEmbedX-0.0.2.dev131-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2ef0e0c6a85f609bc0cd19cc92c651f0881b06d76f4a5339d13adb814b7569ce",
                "md5": "1849ce7c45627e95e8823b699d4bfe91",
                "sha256": "b80cadaef1bd84e6799e97eb7e95524b0c97de8c7b69f65d8b0c91d58db6f7ca"
            },
            "downloads": -1,
            "filename": "topoembedx-0.0.2.dev131.tar.gz",
            "has_sig": false,
            "md5_digest": "1849ce7c45627e95e8823b699d4bfe91",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 393339,
            "upload_time": "2024-10-20T21:56:18",
            "upload_time_iso_8601": "2024-10-20T21:56:18.344282Z",
            "url": "https://files.pythonhosted.org/packages/2e/f0/e0c6a85f609bc0cd19cc92c651f0881b06d76f4a5339d13adb814b7569ce/topoembedx-0.0.2.dev131.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-20 21:56:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pyt-team",
    "github_project": "TopoEmbedX",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "topoembedx"
}
        
Elapsed time: 0.53257s