LandmarkSelector

org.appliedtopology.tda4j.LandmarkSelector

Choosing the landmarks of a witness complex (de Silva and Carlsson, "Topological estimation using witness complexes", 2004), as JavaPlex does: landmarks are a subset of the points, given by their numbers. Assumes the metric space's elements are 0 until size.

Attributes

Experimental
true
Source
WitnessStream.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def coveringRadius(metricSpace: FiniteMetricSpace[Int], landmarks: IndexedSeq[Int]): Double

The covering radius of an ARBITRARY landmark set, not necessarily one maxmin/random chose -- R = max_x min_{l in landmarks} d(x,l). maxmin/random already compute this as part of their own selection loop and return it via LandmarkSelection; this standalone version is for a caller who already has a landmark set (hand-picked, or reused from an earlier selection) and wants R for it -- e.g. to apply the JavaPlex tutorial's own 2R threshold recipe to landmarks it didn't just pick. O(metricSpace.size * landmarks.size), the same cost random's own inline version (now just this call) always was.

The covering radius of an ARBITRARY landmark set, not necessarily one maxmin/random chose -- R = max_x min_{l in landmarks} d(x,l). maxmin/random already compute this as part of their own selection loop and return it via LandmarkSelection; this standalone version is for a caller who already has a landmark set (hand-picked, or reused from an earlier selection) and wants R for it -- e.g. to apply the JavaPlex tutorial's own 2R threshold recipe to landmarks it didn't just pick. O(metricSpace.size * landmarks.size), the same cost random's own inline version (now just this call) always was.

Attributes

Source
WitnessStream.scala
def maxmin(metricSpace: FiniteMetricSpace[Int], numLandmarks: Int, firstLandmark: Int = ...): LandmarkSelection

Maxmin (farthest-point) sampling: start from firstLandmark and repeatedly add the point farthest from the landmarks so far, ties to the lowest index.

Maxmin (farthest-point) sampling: start from firstLandmark and repeatedly add the point farthest from the landmarks so far, ties to the lowest index.

Also returns the covering radius R = max_x min_l d(x, l) (a natural maxFiltrationValue is 2R) and each landmark's insertion radius (its distance to the earlier landmarks; Infinity for the first). With numLandmarks = metricSpace.size this is a greedy permutation of the whole space.

Attributes

Source
WitnessStream.scala
def random(metricSpace: FiniteMetricSpace[Int], numLandmarks: Int, seed: Long): LandmarkSelection

numLandmarks distinct points chosen uniformly at random (reproducibly, from seed). Cheaper than maxmin, with no covering guarantee; the covering radius is still computed and returned.

numLandmarks distinct points chosen uniformly at random (reproducibly, from seed). Cheaper than maxmin, with no covering guarantee; the covering radius is still computed and returned.

Attributes

Source
WitnessStream.scala