{ "info": { "author": "Martin Campos", "author_email": "tinotinocampos@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7" ], "description": "# Cubix\n\nCubix is a simple, 100% python written, module for computing persistent homology in alternative way. Given a data cloud *S* of **R**^n, it builds a simplicial cubic complex covering *S* and makes a filtration over this complex using a kernel density estimator (KDE) of *S*. For a formal definition of the method and the simplicial cubic homology implemented, we redirect the reader to the paper 'Filtraciones en homolog\u00eda persistente mediante estimadores kernel de densidad' ---writen in Spanish--- available on the Github repository.\n\n## Dependencies\nCubix has very few dependences:\n* [numpy](https://pypi.org/project/numpy/) for numerical treatment\n* [scipy](https://pypi.org/project/scipy/) as it uses *scipy.stats.gaussian_kde()* as kernel function\n* [matplotlib](https://pypi.org/project/matplotlib/) for plotting\n\nAll of them are available in PyPI.\n\n## Install\nYou can easily install Cubix via *pip*:\n```\npip install cubix\n``` \n\n## Basic usage\nFirst of all, you must import the module:\n```python\nimport cubix \n``` \nThe second step is choosing the data cloud to analyze. Cubix class *Cloud* for these objects. You can create your cloud importing points from a CSV file just like: \n```python\nX = cubex.Cloud(csv=\"input_file.csv\")\n``` \nIf you have your *N* points of **R**^n stored in a numpy array (let's call it *array*) with shape *n x N* you can make a *Cloud* with them with:\n```python\nX = cubex.Cloud(data=array)\n``` \nAlternatively, Cubix has methods to generate random data clouds with some particular shapes: the spheres *S\u2070* (in **R**), *S\u00b9* (in **R**\u00b2) and *S\u00b2* (in **R**\u00b3) , the torus *T\u00b2* (in **R**\u00b3), the real projective spaces **RP**\u00b2 (in **R**\u2074), and de wedge sum of two spheres *S\u00b9vS\u00b9* (in **R**\u00b2). These are subclasses of *Cloud* so you can easily instantiate a 2000-point cloud with *S\u00b2* shape like:\n```python\nX = cubex.S2(center=(2,1,4), r=5, err=0.1, N=2000)\n``` \nFor more information about the arguments accepted to instantiate this classes, please read the documentation of each one.\n\n*Cloud* class have some useful methods for plotting (when possible) and exporting data. Take a look at those 3 methods: \n```python\nX.plot()\nX.kde_plot()\nX.export_to_csv(\"output.csv\")\n``` \n\nOnce you have your cloud *X*, you can calculate the persistence homology of it. You just have to create a variable of the class *PersistentHomology* this way:\n```python\nh = X.persistent_homology()\n``` \n Of course, this will run the algorithm with default values. Arguments accepted by *persistence_homology* are:\n * *n* - precision of the cubic complex covering the cloud (number of cubes per direction of **R**^n). Default: 10.\n * *margin* - parameter to make the cubic complex bigger than the space occupied by the cloud. Ex: with *margin=0.1* the cubic complex will take a 10% more of space. Default: 0.1 \n * *pruning* - parameter to cut off the last (the most insignificant) cubes of the filtration in order to make the algorithm faster. Ex: *pruning=0.9* will keep only the 90% most significant cubes. Default: 0 (don't cut off).\n * *verbose* - If *True*, print by standard error the progress of the calculation. Default: False.\n\nFinally, you can see the results in three ways: a persistence diagram, a bar code or just explicitly printing out all born and death times:\n```python\nh.persitence_diagram()\nh.bar_code()\nh.detail()\n```\n\nFor more information, please check the documentation in the source code.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/doctorfields/Cubix", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "cubix", "package_url": "https://pypi.org/project/cubix/", "platform": "", "project_url": "https://pypi.org/project/cubix/", "project_urls": { "Homepage": "https://github.com/doctorfields/Cubix" }, "release_url": "https://pypi.org/project/cubix/1.0.3/", "requires_dist": null, "requires_python": "", "summary": "Persistent homology for data clouds using KDE", "version": "1.0.3" }, "last_serial": 3975104, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "edb527e25372620c5a0c4ea02f33d63f", "sha256": "058b81b045130ebfe5cc1206c0e5eb079c53fd9dd00ec9f3360d2d452fd7dcd1" }, "downloads": -1, "filename": "cubix-0.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "edb527e25372620c5a0c4ea02f33d63f", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7327, "upload_time": "2018-06-11T18:57:54", "url": "https://files.pythonhosted.org/packages/9a/69/90c8793c84ab3c0f2ac200a79b22d07a8605c72af91e8f2520b542a3102c/cubix-0.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "640735c8f880f657ee22b475ffa35261", "sha256": "01dd925a42b01caf15f73960ebf3c94f3bb701c51f964b002dcbb612ef3093db" }, "downloads": -1, "filename": "cubix-0.0.1.tar.gz", "has_sig": false, "md5_digest": "640735c8f880f657ee22b475ffa35261", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6319, "upload_time": "2018-06-11T18:57:55", "url": "https://files.pythonhosted.org/packages/a7/12/7f2c688e1df23783b730a4789d635a6a82382204a79b727fa97ea4524bbe/cubix-0.0.1.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "2bb19ecdb512bff438b0fd6185c7f579", "sha256": "3987064f402088819ad02dd5c81386cf35b490f1271b997eede3852a00725c42" }, "downloads": -1, "filename": "cubix-1.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "2bb19ecdb512bff438b0fd6185c7f579", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 9423, "upload_time": "2018-06-12T22:43:48", "url": "https://files.pythonhosted.org/packages/21/b1/8e11f38756f6755a0c3c576b08aaf53f1713f9380a3a60ce81dd95cae341/cubix-1.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9447742885dffb8b9b3da42cb7eaf6ac", "sha256": "2d470b89af23d288338410d8c6e86a69591ca178372572fb47c3a43f4bcb91b2" }, "downloads": -1, "filename": "cubix-1.0.1.tar.gz", "has_sig": false, "md5_digest": "9447742885dffb8b9b3da42cb7eaf6ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10197, "upload_time": "2018-06-12T22:43:50", "url": "https://files.pythonhosted.org/packages/95/f8/42f8c74288ebaa46c005868bf394ed7534b0c2daca2eb9d50cc82f91e0d4/cubix-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "cbdaf088c2015ce705650374c0fec1c8", "sha256": "f44ff3ff681f89688de83a89bd8205c2f4015cfa19acdc9b43180dab2493e206" }, "downloads": -1, "filename": "cubix-1.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "cbdaf088c2015ce705650374c0fec1c8", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 9482, "upload_time": "2018-06-18T22:47:12", "url": "https://files.pythonhosted.org/packages/64/f7/f9546e94a1351a7e4a17eaa5ecf506b89fa0a5306846736d1971194b1659/cubix-1.0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b3e04f157f66aec94ba4dd53ba4c89b9", "sha256": "49c5fb54dd7ab96f7ca66bc4334d1e715b8f78301e27c74c3d857807b7e1ec4f" }, "downloads": -1, "filename": "cubix-1.0.2.tar.gz", "has_sig": false, "md5_digest": "b3e04f157f66aec94ba4dd53ba4c89b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10219, "upload_time": "2018-06-18T22:47:13", "url": "https://files.pythonhosted.org/packages/e7/cb/df3093d3acf9d4208ee4b2ec8ec49e569ff1787540b4b924e33d8bd47cea/cubix-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "8acfe80033b3103fb15bd26bee15a21a", "sha256": "f0db720e2679c17cf36be8894ea0e5845acc4969779626b8dfb57a33da6fc6ad" }, "downloads": -1, "filename": "cubix-1.0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "8acfe80033b3103fb15bd26bee15a21a", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 9481, "upload_time": "2018-06-18T22:46:12", "url": "https://files.pythonhosted.org/packages/67/e4/cfc3935f7201982beeda608d703c4f549fcbbd58bd1f82d8fc6229cc546f/cubix-1.0.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c183a64e247fd93d401e20bda9024055", "sha256": "d713a50455af04013eccecbd7ff119a630c5477fd9e7cc9ab06979943dd49c35" }, "downloads": -1, "filename": "cubix-1.0.3.tar.gz", "has_sig": false, "md5_digest": "c183a64e247fd93d401e20bda9024055", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10219, "upload_time": "2018-06-18T22:46:14", "url": "https://files.pythonhosted.org/packages/f9/1d/c9ce83585be2e7770a3bdd4b9c1434fdd4959b89c6a8cc02508bbde2039a/cubix-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8acfe80033b3103fb15bd26bee15a21a", "sha256": "f0db720e2679c17cf36be8894ea0e5845acc4969779626b8dfb57a33da6fc6ad" }, "downloads": -1, "filename": "cubix-1.0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "8acfe80033b3103fb15bd26bee15a21a", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 9481, "upload_time": "2018-06-18T22:46:12", "url": "https://files.pythonhosted.org/packages/67/e4/cfc3935f7201982beeda608d703c4f549fcbbd58bd1f82d8fc6229cc546f/cubix-1.0.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c183a64e247fd93d401e20bda9024055", "sha256": "d713a50455af04013eccecbd7ff119a630c5477fd9e7cc9ab06979943dd49c35" }, "downloads": -1, "filename": "cubix-1.0.3.tar.gz", "has_sig": false, "md5_digest": "c183a64e247fd93d401e20bda9024055", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10219, "upload_time": "2018-06-18T22:46:14", "url": "https://files.pythonhosted.org/packages/f9/1d/c9ce83585be2e7770a3bdd4b9c1434fdd4959b89c6a8cc02508bbde2039a/cubix-1.0.3.tar.gz" } ] }