{"id":17606622,"url":"https://github.com/corybrunson/landmark","last_synced_at":"2025-06-21T10:41:04.115Z","repository":{"id":86215039,"uuid":"265968254","full_name":"corybrunson/landmark","owner":"corybrunson","description":"procedures to generate landmark sets from finite metric spaces","archived":false,"fork":false,"pushed_at":"2022-12-12T18:35:40.000Z","size":213,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T09:21:17.567Z","etag":null,"topics":["landmarks","mapper","maxmin","topological-data-analysis"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/corybrunson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2020-05-21T22:53:41.000Z","updated_at":"2023-04-24T10:32:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"6f69b28d-c9f9-47f8-8c72-7bfaa84528ef","html_url":"https://github.com/corybrunson/landmark","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corybrunson%2Flandmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corybrunson%2Flandmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corybrunson%2Flandmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corybrunson%2Flandmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/corybrunson","download_url":"https://codeload.github.com/corybrunson/landmark/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248583560,"owners_count":21128619,"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","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":["landmarks","mapper","maxmin","topological-data-analysis"],"created_at":"2024-10-22T15:51:40.358Z","updated_at":"2025-04-12T14:43:04.763Z","avatar_url":"https://github.com/corybrunson.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n# landmark\n\nCalculate landmark sets for finite metric spaces using the maxmin\nprocedure (for fixed-radius balls) or an adaptation of it for rank data\n(for roughly fixed-cardinality nearest\nneighborhoods).\n\n``` r\n(x \u003c- matrix(c(-1, -.5, 0, .75, .875, 1), dimnames = list(letters[1:6], \"x\")))\n#\u003e        x\n#\u003e a -1.000\n#\u003e b -0.500\n#\u003e c  0.000\n#\u003e d  0.750\n#\u003e e  0.875\n#\u003e f  1.000\nplot(cbind(x, 0), asp = 1, pch = 16)\ntext(cbind(x, .05), labels = rownames(x))\n```\n\n\u003cimg src=\"man/figures/README-example-1.png\" width=\"100%\" /\u003e\n\n## `maxmin` procedure\n\nThe original `maxmin` procedure produces a landmark set for covering a\npoint cloud with either of two minimal ball covers:\n\n  - a minimum number of balls of fixed uniform radius\n  - a fixed number of balls of minimum uniform radius\n\n\u003c!-- end list --\u003e\n\n``` r\nx[landmarks_maxmin(x, radius = 0.5, engine = \"C++\"), , drop = FALSE]\n#\u003e    x\n#\u003e a -1\n#\u003e f  1\n#\u003e c  0\nx[landmarks_maxmin(x, radius = 0.25, engine = \"C++\"), , drop = FALSE]\n#\u003e      x\n#\u003e a -1.0\n#\u003e f  1.0\n#\u003e c  0.0\n#\u003e b -0.5\nx[landmarks_maxmin(x, radius = 0.125, engine = \"C++\"), , drop = FALSE]\n#\u003e       x\n#\u003e a -1.00\n#\u003e f  1.00\n#\u003e c  0.00\n#\u003e b -0.50\n#\u003e d  0.75\nx[landmarks_maxmin(x, num = 6L, engine = \"C++\"), , drop = FALSE]\n#\u003e        x\n#\u003e a -1.000\n#\u003e f  1.000\n#\u003e c  0.000\n#\u003e b -0.500\n#\u003e d  0.750\n#\u003e e  0.875\n```\n\n``` r\nlandmarks_maxmin(x, num = 4L, engine = \"R\", cover = TRUE)\n#\u003e   landmark cover_set\n#\u003e 1        1         1\n#\u003e 2        6   4, 5, 6\n#\u003e 3        3         3\n#\u003e 4        2         2\nlandmarks_maxmin(x, radius = 0.5, engine = \"R\", cover = TRUE)\n#\u003e   landmark cover_set\n#\u003e 1        1      1, 2\n#\u003e 2        6   4, 5, 6\n#\u003e 3        3      2, 3\nlandmarks_maxmin(x, radius = 1.5, engine = \"R\", cover = TRUE)\n#\u003e   landmark    cover_set\n#\u003e 1        1      1, 2, 3\n#\u003e 2        6 2, 3, 4,....\nlandmarks_maxmin(x, radius = 3.5, engine = \"R\", cover = TRUE)\n#\u003e   landmark    cover_set\n#\u003e 1        1 1, 2, 3,....\n```\n\n## `lastfirst` procedure\n\nAn adaptation of `maxmin` to ranked distances will produce a landmark\nset for covering a point cloud with either of two minimal neighborhood\ncovers:\n\n  - a minimum number of neighborhoods of fixed (approximately) uniform\n    cardinality\n  - a fixed number of neighborhoods of minimal (approximately) uniform\n    cardinality\n\nCardinality is only exact up to ties, which may be handled different\nways and will result in cover sets of different\ncardinalities.\n\n``` r\nx[landmarks_lastfirst(x, cardinality = 3L, seed_index = 6L), , drop = FALSE]\n#\u003e    x\n#\u003e f  1\n#\u003e a -1\nx[landmarks_lastfirst(x, cardinality = 2L, seed_index = 6L), , drop = FALSE]\n#\u003e       x\n#\u003e f  1.00\n#\u003e a -1.00\n#\u003e c  0.00\n#\u003e d  0.75\nx[landmarks_lastfirst(x, num = 4L, seed_index = 6L), , drop = FALSE]\n#\u003e       x\n#\u003e f  1.00\n#\u003e a -1.00\n#\u003e c  0.00\n#\u003e d  0.75\nx[landmarks_lastfirst(x, cardinality = 1L, seed_index = 6L), , drop = FALSE]\n#\u003e        x\n#\u003e f  1.000\n#\u003e a -1.000\n#\u003e c  0.000\n#\u003e d  0.750\n#\u003e b -0.500\n#\u003e e  0.875\n```\n\n``` r\nlandmarks_lastfirst(x, cardinality = 1L, seed_index = 6L, engine = \"C++\", cover = TRUE)\n#\u003e   landmark cover_set\n#\u003e 1        6         6\n#\u003e 2        1         1\n#\u003e 3        3         3\n#\u003e 4        4         4\n#\u003e 5        2         2\n#\u003e 6        5         5\nlandmarks_lastfirst(x, num = 4L, seed_index = 6L, engine = \"C++\", cover = TRUE)\n#\u003e   landmark cover_set\n#\u003e 1        6      5, 6\n#\u003e 2        1      1, 2\n#\u003e 3        3      2, 3\n#\u003e 4        4      4, 5\nlandmarks_lastfirst(x, cardinality = 3L, seed_index = 6L, engine = \"C++\", cover = TRUE)\n#\u003e   landmark cover_set\n#\u003e 1        6   4, 5, 6\n#\u003e 2        1   1, 2, 3\nlandmarks_lastfirst(x, cardinality = 5L, seed_index = 6L, engine = \"C++\", cover = TRUE)\n#\u003e   landmark    cover_set\n#\u003e 1        6 2, 3, 4,....\n#\u003e 2        1 1, 2, 3,....\n```\n\n# references\n\nThis package was spun off from [the Mapper\npackage](https://github.com/peekxc/Mapper/).\n\nA rigorous mathematical treatment is underway at [this Overleaf\nproject](https://www.overleaf.com/read/fpjrtgfjstyx).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorybrunson%2Flandmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorybrunson%2Flandmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorybrunson%2Flandmark/lists"}