https://github.com/corybrunson/landmark

procedures to generate landmark sets from finite metric spaces

https://github.com/corybrunson/landmark

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.3%) to scientific vocabulary

Keywords

landmarks mapper maxmin topological-data-analysis
Last synced: 5 months ago · JSON representation

Repository

procedures to generate landmark sets from finite metric spaces

Basic Info
  • Host: GitHub
  • Owner: corybrunson
  • Language: R
  • Default Branch: main
  • Homepage:
  • Size: 208 KB
Statistics
  • Stars: 3
  • Watchers: 2
  • Forks: 2
  • Open Issues: 1
  • Releases: 0
Topics
landmarks mapper maxmin topological-data-analysis
Created almost 6 years ago · Last pushed about 3 years ago
Metadata Files
Readme

README.md

landmark

Calculate landmark sets for finite metric spaces using the maxmin procedure (for fixed-radius balls) or an adaptation of it for rank data (for roughly fixed-cardinality nearest neighborhoods).

``` r (x <- matrix(c(-1, -.5, 0, .75, .875, 1), dimnames = list(letters[1:6], "x")))

> x

> a -1.000

> b -0.500

> c 0.000

> d 0.750

> e 0.875

> f 1.000

plot(cbind(x, 0), asp = 1, pch = 16) text(cbind(x, .05), labels = rownames(x)) ```

maxmin procedure

The original maxmin procedure produces a landmark set for covering a point cloud with either of two minimal ball covers:

  • a minimum number of balls of fixed uniform radius
  • a fixed number of balls of minimum uniform radius

``` r x[landmarks_maxmin(x, radius = 0.5, engine = "C++"), , drop = FALSE]

> x

> a -1

> f 1

> c 0

x[landmarks_maxmin(x, radius = 0.25, engine = "C++"), , drop = FALSE]

> x

> a -1.0

> f 1.0

> c 0.0

> b -0.5

x[landmarks_maxmin(x, radius = 0.125, engine = "C++"), , drop = FALSE]

> x

> a -1.00

> f 1.00

> c 0.00

> b -0.50

> d 0.75

x[landmarks_maxmin(x, num = 6L, engine = "C++"), , drop = FALSE]

> x

> a -1.000

> f 1.000

> c 0.000

> b -0.500

> d 0.750

> e 0.875

```

``` r landmarks_maxmin(x, num = 4L, engine = "R", cover = TRUE)

> landmark cover_set

> 1 1 1

> 2 6 4, 5, 6

> 3 3 3

> 4 2 2

landmarks_maxmin(x, radius = 0.5, engine = "R", cover = TRUE)

> landmark cover_set

> 1 1 1, 2

> 2 6 4, 5, 6

> 3 3 2, 3

landmarks_maxmin(x, radius = 1.5, engine = "R", cover = TRUE)

> landmark cover_set

> 1 1 1, 2, 3

> 2 6 2, 3, 4,....

landmarks_maxmin(x, radius = 3.5, engine = "R", cover = TRUE)

> landmark cover_set

> 1 1 1, 2, 3,....

```

lastfirst procedure

An adaptation of maxmin to ranked distances will produce a landmark set for covering a point cloud with either of two minimal neighborhood covers:

  • a minimum number of neighborhoods of fixed (approximately) uniform cardinality
  • a fixed number of neighborhoods of minimal (approximately) uniform cardinality

Cardinality is only exact up to ties, which may be handled different ways and will result in cover sets of different cardinalities.

``` r x[landmarkslastfirst(x, cardinality = 3L, seedindex = 6L), , drop = FALSE]

> x

> f 1

> a -1

x[landmarkslastfirst(x, cardinality = 2L, seedindex = 6L), , drop = FALSE]

> x

> f 1.00

> a -1.00

> c 0.00

> d 0.75

x[landmarkslastfirst(x, num = 4L, seedindex = 6L), , drop = FALSE]

> x

> f 1.00

> a -1.00

> c 0.00

> d 0.75

x[landmarkslastfirst(x, cardinality = 1L, seedindex = 6L), , drop = FALSE]

> x

> f 1.000

> a -1.000

> c 0.000

> d 0.750

> b -0.500

> e 0.875

```

``` r landmarkslastfirst(x, cardinality = 1L, seedindex = 6L, engine = "C++", cover = TRUE)

> landmark cover_set

> 1 6 6

> 2 1 1

> 3 3 3

> 4 4 4

> 5 2 2

> 6 5 5

landmarkslastfirst(x, num = 4L, seedindex = 6L, engine = "C++", cover = TRUE)

> landmark cover_set

> 1 6 5, 6

> 2 1 1, 2

> 3 3 2, 3

> 4 4 4, 5

landmarkslastfirst(x, cardinality = 3L, seedindex = 6L, engine = "C++", cover = TRUE)

> landmark cover_set

> 1 6 4, 5, 6

> 2 1 1, 2, 3

landmarkslastfirst(x, cardinality = 5L, seedindex = 6L, engine = "C++", cover = TRUE)

> landmark cover_set

> 1 6 2, 3, 4,....

> 2 1 1, 2, 3,....

```

references

This package was spun off from the Mapper package.

A rigorous mathematical treatment is underway at this Overleaf project.

Owner

  • Name: Cory Brunson
  • Login: corybrunson
  • Kind: user
  • Location: Gainesville, FL
  • Company: @LaboratoryForSystemsMedicine

Mathematician by training, data scientist by testing. Relatively new to pretty much everything.

GitHub Events

Total
Last Year

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 94
  • Total Committers: 3
  • Avg Commits per committer: 31.333
  • Development Distribution Score (DDS): 0.372
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
corybrunson c****d@g****m 59
yaraskaf 5****f 29
Skaf y****f@f****l 6

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 1
  • Total pull requests: 12
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 day
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.17
  • Merged pull requests: 12
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • corybrunson (1)
Pull Request Authors
  • corybrunson (7)
  • yaraskaf (5)
Top Labels
Issue Labels
Pull Request Labels