{"id":32382282,"url":"https://github.com/hfr1tz3/twomapper","last_synced_at":"2025-10-25T01:46:34.214Z","repository":{"id":116006230,"uuid":"540634446","full_name":"hfr1tz3/TwoMapper","owner":"hfr1tz3","description":"2-Mapper is a higher dimensional generalization of the mapper graph.","archived":false,"fork":false,"pushed_at":"2025-06-06T20:26:27.000Z","size":57887,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-06T21:26:24.359Z","etag":null,"topics":["applied-topology","giotto-tda","gudhi","mapper-algorithm"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hfr1tz3.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}},"created_at":"2022-09-23T22:19:34.000Z","updated_at":"2025-06-06T20:26:30.000Z","dependencies_parsed_at":"2024-08-22T18:11:33.366Z","dependency_job_id":"55dde0be-6f31-464c-b90b-0e8781cc6e0f","html_url":"https://github.com/hfr1tz3/TwoMapper","commit_stats":null,"previous_names":["hfr1tz3/twomapper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hfr1tz3/TwoMapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfr1tz3%2FTwoMapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfr1tz3%2FTwoMapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfr1tz3%2FTwoMapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfr1tz3%2FTwoMapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hfr1tz3","download_url":"https://codeload.github.com/hfr1tz3/TwoMapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfr1tz3%2FTwoMapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280893654,"owners_count":26409279,"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-24T02:00:06.418Z","response_time":73,"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":["applied-topology","giotto-tda","gudhi","mapper-algorithm"],"created_at":"2025-10-25T01:46:29.791Z","updated_at":"2025-10-25T01:46:34.209Z","avatar_url":"https://github.com/hfr1tz3.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 2-Mapper\n\nThe mapper algorithm is an unsupervised clustering algorithm used for used for data visualization in topological data analysis (TDA) \\[1\\]. \nIt uses a range of parameters for constructing a graph from data chosen by the user. For a data set $X$,\nto construct a mapper representation of $X$ one must choose the following parameters.\n\n1. A filter function $f\\colon X\\to \\mathbb{R}^m$ where $m\\leq d$, e.g. projections through principle component analysis (PCA) \\[2\\].\n2. An open cover $\\mathcal{U}$ of $f(X)\\subseteq\\mathbb{R}^m$, e.g. uniform hypercubes $\\mathcal{U} = \\\\{U_\\alpha\\\\}$ where $U_\\alpha = \\prod_{i=1}^m \\[a_{\\alpha,i},b_{\\alpha,i}\\]$ for $a_{\\alpha,i},b_{\\alpha,i}\\in\\mathbb{R}$.\n3. A clustering algorithm, e.g. DBSCAN \\[3\\].\n\n\u003cimg src=\"figures/hand-mapper.png\" alt=\"drawing\" width=\"500\"/\u003e\n\nThe mapper graph is then the 1-dimensional nerve of the collection of clusters given after the clustering procedure.\nThis gives a good description of graphical connections in our data, but cannot tell us anything about topological \nfeatures beyond dimension zero.\nFor filter functions that map to metric spaces of dimension $m\\geq 2$, \nwe can construct a mapper graph from the 2-dimsnional nerve, called **2-Mapper**.\n\n![2-mapper](figures/torus_2mapper.jpg)\n\n2-Mapper is a simplical complex approximation of $X$. This can give visualization to density changes within a point cloud, \nand allow use to compute some approximate betti-1 values. We implement multiscale mapper \\[4\\] to identify how cover choice changes the 2-mapper structure by using persistence barcodes/diagrams.\n\n![multiscale-2-mapper](figures/kb-multiscale.png)\n\nSee **2mapperTutorial.ipynb** and **Multiscale2mapper.ipynb** for tutorials for 2-mapper and multiscale 2-mapper, respectively.\n\n\nReferences\n----------\n\\[1\\] Gurjeet Singh, Facundo M´emoli, and Gunnar E. Carlsson. Topological meth-\nods for the analysis of high dimensional data sets and 3d object recognition.\nIn Mario Botsch, Renato Pajarola, Baoquan Chen, and Matthias Zwicker,\neditors, 4th Symposium on Point Based Graphics, PBG@Eurographics 2007,\nPrague, Czech Republic, September 2-3, 2007, pages 91–100. Eurographics\nAssociation, 2007.\n\n\\[2\\] Harold Hotelling. Relations between two sets of variates. Biometrika, 28(3/4):321–377, 1936.\n\n\\[3\\] Martin Ester, Hans-Peter Kriegel, J¨org Sander, and Xiaowei Xu. A density-\nbased algorithm for discovering clusters in large spatial databases with noise.\nIn Proceedings of the Second International Conference on Knowledge Dis-\ncovery and Data Mining, KDD’96, page 226–231. AAAI Press, 1996.\n\n\\[4\\] Tamal K. Dey, Facundo Mémoli, and Yusu Wang. Mutiscale mapper: A framework for topological\nsummarization of data and maps. CoRR, abs/1504.03763, 2015.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhfr1tz3%2Ftwomapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhfr1tz3%2Ftwomapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhfr1tz3%2Ftwomapper/lists"}