# chromatic_tda
`chromatic_tda` is a package for computing six-packs of persistent diagrams of colored point clouds, such as cells on a tissue slide with an information about their type; or 3D stucture of a material composed of different atoms. The six-pack is a topological summary of capturing many aspects of how the different types of points mingle. It consists of kernel, domain, image, codomain, cokernel and relative persistence diagrams.
The main purpose of the code is to provide implementation to experiment with chromatic topological data analysis. Although not completely naive, many aspects of the code can be optimised, especially if only part of the infomration from the six-packs turns out to be interesting in a given application.
The code gives no restriction on the dimension of points or number of colors, but the complexity quickly grows in both parameters. The expected use is points in 2D or 3D with 2 or 3 colors for hundreds to a few thousand points, but both can be increased for toy examples with small numbers of points.
# Installation
## Install with `pip`
The package is uploaded to [PyPI](https://pypi.org/project/chromatic-tda/), so it can be installed with `pip`.
Run `pip install chromatic_tda`.
## Install from a file from [github project](https://github.com/OnDraganov/chromatic-tda)
From the `dist` folder of the project, you can download the file `chromatic_tda-<version>.tar.gz`, and install it using `pip` as `pip install <path to the file>`.
## Install from [github project](https://github.com/OnDraganov/chromatic-tda)
The project uses `poetry` for Python dependecy management, which allows you to easily install all you need to run the package:
- Clone the repository
- Install `poetry`
- Go to the repository folder in terminal
- Run `poetry shell`
- Run `poetry install`
- [optional] Run `poetry run pytest` to check that the code runs correctly
# How to use
The basic use of the package is as follows:
```
import chromatic_tda as chro
points, labels = ... # load points, labels
chro_alpha = chro.ChromaticAlphaComplex(points, labels) simplicial_complex = chro_alpha.get_simplicial_complex(
sub_complex=‘bi-chromatic’
full_complex=‘all’
relative=‘mono-chromatic’
) # these options make sense for three colors; for two use, e.g., just sub_complex='mono-chromatic'
six_pack = simplicial_complex.bars_six_pack()
chro.plot_six_pack(six_pack)
```
For more details check the docstrings of the methods and the jupyter notebook file `manual` (in [github repo](https://github.com/OnDraganov/chromatic-tda)). For more background on the theory, check the resources listed below.
# Resources
The code is based on research done at Institute of Science and Technology by Ranita Biswas, Sebastiano Cultrera di Montesano, Ondřej Draganov, Herbert Edelsbrunner and Morteza Saghafian. A preprint of the full paper can be found on arXiv: [Chromatic Alpha Complexes](https://arxiv.org/abs/2212.03128). A shorter introduction to the main ideas can be found in a preprint [Chromatic Topological Data Analysis](https://arxiv.org/abs/2406.04102).
A presentation about the main concepts used in this package can be viewed on YouTube: [AATRN Online Seminar: TDA for Chromatic Point Clouds](https://youtu.be/HIqiF00yKaw). A recording of a complementary talk focusing more on the motivations of the work and the combinatorial structures underlying it is accessible through [google drive](https://drive.google.com/file/d/1RBiGlgY4mlRL59eAVmMLrgBCZYN97QnZ/view).
# Contact
If you have any questions to the code, do not hesitate to contat us. We are also eager to hear from you if you try the code out, and happy to chat about how you can use it on your data. Use, e.g., the mail in my [github profile](https://github.com/OnDraganov).
# Timing
For a rough idea on the performance, see the two plots below showing times the code took on my laptop.
<img src="img/timing_1.1.1.png" width="500px">
<img src="img/timing_2d_2c_200exp.png" width="500px">
# License
Copyright ©2023. Institute of Science and Technology Austria (IST Austria). All Rights Reserved.
This file is part of chromatic_tda, which is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Contact the Technology Transfer Office, ISTA, Am Campus 1, A-3400 Klosterneuburg, Austria, +43-(0)2243 9000, twist@ist.ac.at, for commercial licensing opportunities.
Raw data
{
"_id": null,
"home_page": "https://github.com/OnDraganov/chromatic-tda",
"name": "chromatic_tda",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "tda, topological data analysis, chromatic, chromatic alpha, delaunay, persistence, persistent homology",
"author": "Ondrej Draganov",
"author_email": "ondrej.draganov@ist.ac.at",
"download_url": "https://files.pythonhosted.org/packages/57/3e/b044aee43808fb8b73cdeef502a8101d7def8de92e95b5135802b29b8572/chromatic_tda-1.1.7.tar.gz",
"platform": null,
"description": "# chromatic_tda\n\n`chromatic_tda` is a package for computing six-packs of persistent diagrams of colored point clouds, such as cells on a tissue slide with an information about their type; or 3D stucture of a material composed of different atoms. The six-pack is a topological summary of capturing many aspects of how the different types of points mingle. It consists of kernel, domain, image, codomain, cokernel and relative persistence diagrams.\n\nThe main purpose of the code is to provide implementation to experiment with chromatic topological data analysis. Although not completely naive, many aspects of the code can be optimised, especially if only part of the infomration from the six-packs turns out to be interesting in a given application.\n\nThe code gives no restriction on the dimension of points or number of colors, but the complexity quickly grows in both parameters. The expected use is points in 2D or 3D with 2 or 3 colors for hundreds to a few thousand points, but both can be increased for toy examples with small numbers of points.\n\n# Installation\n\n## Install with `pip`\n\nThe package is uploaded to [PyPI](https://pypi.org/project/chromatic-tda/), so it can be installed with `pip`.\n\nRun `pip install chromatic_tda`.\n\n## Install from a file from [github project](https://github.com/OnDraganov/chromatic-tda)\n\nFrom the `dist` folder of the project, you can download the file `chromatic_tda-<version>.tar.gz`, and install it using `pip` as `pip install <path to the file>`.\n\n## Install from [github project](https://github.com/OnDraganov/chromatic-tda)\n\nThe project uses `poetry` for Python dependecy management, which allows you to easily install all you need to run the package:\n\n- Clone the repository\n- Install `poetry`\n- Go to the repository folder in terminal\n- Run `poetry shell`\n- Run `poetry install`\n- [optional] Run `poetry run pytest` to check that the code runs correctly\n\n# How to use\n\nThe basic use of the package is as follows:\n```\nimport chromatic_tda as chro\npoints, labels = ... # load points, labels\nchro_alpha = chro.ChromaticAlphaComplex(points, labels) simplicial_complex = chro_alpha.get_simplicial_complex(\n sub_complex=\u2018bi-chromatic\u2019\n full_complex=\u2018all\u2019\n relative=\u2018mono-chromatic\u2019\n) # these options make sense for three colors; for two use, e.g., just sub_complex='mono-chromatic'\nsix_pack = simplicial_complex.bars_six_pack()\nchro.plot_six_pack(six_pack)\n```\n\nFor more details check the docstrings of the methods and the jupyter notebook file `manual` (in [github repo](https://github.com/OnDraganov/chromatic-tda)). For more background on the theory, check the resources listed below.\n\n\n# Resources\n\nThe code is based on research done at Institute of Science and Technology by Ranita Biswas, Sebastiano Cultrera di Montesano, Ond\u0159ej Draganov, Herbert Edelsbrunner and Morteza Saghafian. A preprint of the full paper can be found on arXiv: [Chromatic Alpha Complexes](https://arxiv.org/abs/2212.03128). A shorter introduction to the main ideas can be found in a preprint [Chromatic Topological Data Analysis](https://arxiv.org/abs/2406.04102).\n\nA presentation about the main concepts used in this package can be viewed on YouTube: [AATRN Online Seminar: TDA for Chromatic Point Clouds](https://youtu.be/HIqiF00yKaw). A recording of a complementary talk focusing more on the motivations of the work and the combinatorial structures underlying it is accessible through [google drive](https://drive.google.com/file/d/1RBiGlgY4mlRL59eAVmMLrgBCZYN97QnZ/view).\n\n# Contact\n\nIf you have any questions to the code, do not hesitate to contat us. We are also eager to hear from you if you try the code out, and happy to chat about how you can use it on your data. Use, e.g., the mail in my [github profile](https://github.com/OnDraganov).\n\n# Timing\n\nFor a rough idea on the performance, see the two plots below showing times the code took on my laptop.\n<img src=\"img/timing_1.1.1.png\" width=\"500px\">\n<img src=\"img/timing_2d_2c_200exp.png\" width=\"500px\">\n# License\n\nCopyright \u00a92023. Institute of Science and Technology Austria (IST Austria). All Rights Reserved. \n\nThis file is part of chromatic_tda, which is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.\n \nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.\n \nYou should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.\n \nContact the Technology Transfer Office, ISTA, Am Campus 1, A-3400 Klosterneuburg, Austria, +43-(0)2243 9000, twist@ist.ac.at, for commercial licensing opportunities.\n",
"bugtrack_url": null,
"license": "AGPL-3.0-or-later",
"summary": "Tool to compute six-packs of persistence diagrams for chromatic point clouds",
"version": "1.1.7",
"project_urls": {
"Documentation": "https://github.com/OnDraganov/chromatic-tda",
"Homepage": "https://github.com/OnDraganov/chromatic-tda",
"Repository": "https://github.com/OnDraganov/chromatic-tda"
},
"split_keywords": [
"tda",
" topological data analysis",
" chromatic",
" chromatic alpha",
" delaunay",
" persistence",
" persistent homology"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9f5ba80edbe1c43da5ecbe53101ee97bd93f580e6619ed54f08577820cfa59c7",
"md5": "98c357cd4521bbf5ac808e210625787a",
"sha256": "dce37f388fccdcb4c4ae48cf0af8037266b79a9ceae7d9ba7bcbdf79c1021696"
},
"downloads": -1,
"filename": "chromatic_tda-1.1.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "98c357cd4521bbf5ac808e210625787a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 142251,
"upload_time": "2024-11-22T14:11:22",
"upload_time_iso_8601": "2024-11-22T14:11:22.482220Z",
"url": "https://files.pythonhosted.org/packages/9f/5b/a80edbe1c43da5ecbe53101ee97bd93f580e6619ed54f08577820cfa59c7/chromatic_tda-1.1.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "573eb044aee43808fb8b73cdeef502a8101d7def8de92e95b5135802b29b8572",
"md5": "38d58d92ccc4ce8a3be4804111f9047d",
"sha256": "e61246c8c1fe66af6dac0b169a55904cd618b6ddb5e2e654411c250ae4b453ff"
},
"downloads": -1,
"filename": "chromatic_tda-1.1.7.tar.gz",
"has_sig": false,
"md5_digest": "38d58d92ccc4ce8a3be4804111f9047d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 124071,
"upload_time": "2024-11-22T14:11:24",
"upload_time_iso_8601": "2024-11-22T14:11:24.016346Z",
"url": "https://files.pythonhosted.org/packages/57/3e/b044aee43808fb8b73cdeef502a8101d7def8de92e95b5135802b29b8572/chromatic_tda-1.1.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-22 14:11:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "OnDraganov",
"github_project": "chromatic-tda",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "chromatic_tda"
}