{"id":32639632,"url":"https://github.com/luisscoccola/shapediscover","last_synced_at":"2025-10-31T02:14:08.586Z","repository":{"id":300626157,"uuid":"939502788","full_name":"LuisScoccola/shapediscover","owner":"LuisScoccola","description":"Cover learning with geometric optimization","archived":false,"fork":false,"pushed_at":"2025-09-21T10:06:06.000Z","size":14508,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-21T12:07:31.885Z","etag":null,"topics":["dimensionality-reduction","manifold-learning","representation-learning","topological-data-analysis"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LuisScoccola.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-26T16:37:17.000Z","updated_at":"2025-09-21T10:06:10.000Z","dependencies_parsed_at":"2025-09-21T12:18:30.741Z","dependency_job_id":null,"html_url":"https://github.com/LuisScoccola/shapediscover","commit_stats":null,"previous_names":["luisscoccola/shapediscover"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LuisScoccola/shapediscover","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuisScoccola%2Fshapediscover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuisScoccola%2Fshapediscover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuisScoccola%2Fshapediscover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuisScoccola%2Fshapediscover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LuisScoccola","download_url":"https://codeload.github.com/LuisScoccola/shapediscover/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuisScoccola%2Fshapediscover/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281914610,"owners_count":26583093,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-31T02:00:07.401Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dimensionality-reduction","manifold-learning","representation-learning","topological-data-analysis"],"created_at":"2025-10-31T02:13:57.709Z","updated_at":"2025-10-31T02:14:08.578Z","avatar_url":"https://github.com/LuisScoccola.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ShapeDiscover\n\nLearn covers of data with geometric optimization,\nfor topological inference and visualization.\nSee [[SLH, ICML25]](#1) for background on _cover learning_ and _topological inference_.\n\n\n\u003e [!Note]\n\u003e Alpha version. User-facing interface is subject to breaking changes.\n\n## Installation\n\nBasic installation:\n\n```pip install .```\n\nSome examples require extra libraries that can be installed with:\n\n```pip install \".[extras]\"```\n\n## Examples\n\nThese are two small examples that use `ShapeDiscoverLite`, which is the currently recommended interface.\nSee notebooks in the `examples` directory for more examples.\n\n### Topological inference\nRecovering the topology of a two-dimensional sphere.\nWe choose a cover with 25 elements for illustration purposes, but ShapeDiscover recovers the correct topology with as few as 5 cover elements.\n\n```python\nfrom shapediscover import ShapeDiscoverLite, FuzzyCoverPersistence\nimport gudhi\nfrom synthetic_data import sphere\n\nX = sphere(2000, 2)\ncoverer = ShapeDiscoverLite(25)\nfuzzy_cover = coverer.fit_transform(X)\n\npersistence_barcode = FuzzyCoverPersistence(max_dimension=2, log_rescaling=True).fit_transform(fuzzy_cover)\ngudhi.plot_persistence_barcode(persistence_barcode)\nplt.show()\n```\n\n![Alt text](https://github.com/LuisScoccola/shapediscover/blob/main/docs/figures/sphere_barcode.png)\n\n### Visualization\n\nWe visualize the MNIST handwritten digits dataset.\n\n```python\nfrom shapediscover import plot_nerve\nimport torchvision\n\nmnist_dataset = torchvision.datasets.MNIST(root=\"./datasets\", download=True)\nX = np.array([np.array(image_label[0]).flatten() for image_label in mnist_dataset])\ny = np.array([image_label[1] for image_label in mnist_dataset])\n\ncoverer = ShapeDiscoverLite(10,regularization=40)\nfuzzy_cover = coverer.fit_transform(X)\nplot_nerve(fuzzy_cover, threshold=0.8, interactive=True, max_vertex_size=0.8, labels=y)\n```\n\n![Alt text](https://github.com/LuisScoccola/shapediscover/blob/main/docs/figures/MNIST_nerve.png)\n\nThe output of ShapeDiscover on the left, and UMAP's two-dimensional projection on the right, for comparison.\n\n\n## Authors\n\n[Luis Scoccola](https://luisscoccola.com/) and [Uzu Lim](https://sites.google.com/view/uzulim/main).\n\n## References\n\n\u003ca id=\"1\"\u003e[SLH, ICML25]\u003c/a\u003e \n*Cover learning for large-scale topology representation*. Luis Scoccola, Uzu Lim, Heather A. Harrington. International Conference on Machine Learning (ICML 2025)\n\n## License\n\nThis software is published under the 3-clause BSD license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluisscoccola%2Fshapediscover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluisscoccola%2Fshapediscover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluisscoccola%2Fshapediscover/lists"}