sand.gcs.system

Orion

class Orion extends GraphCoordinateSystem[EuclideanCoordinate] with NelderMead[EuclideanCoordinate]

Implementation of the Orion GCS (Euclidean Space).

Implementation of the Orion graph coordinate system which embeds distances in an n-dimensional Euclidean space, using the Nelder-Mead method of optimizing the alignment of nodes.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Orion
  2. NelderMead
  3. NonLinearOptimizer
  4. GraphCoordinateSystem
  5. Serializable
  6. Serializable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Orion(dimension: Int)

    dimension

    Dimension of the system

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. def coordinateOf(id: Int): Option[EuclideanCoordinate]

    Retrieve the embedded coordinate given a node ID.

    Retrieve the embedded coordinate given a node ID.

    returns

    Embedded coordinate

    Definition Classes
    GraphCoordinateSystem
  9. val dimension: Int

    Dimension of the system

    Dimension of the system

    Definition Classes
    OrionGraphCoordinateSystem
  10. def distanceBetween(source: Int, destination: Int): Double

    Query the embedded distance given two node IDs.

    Query the embedded distance given two node IDs.

    source

    ID of the source node

    destination

    ID of the destination node

    returns

    Estimated distance between source and destination

    Definition Classes
    GraphCoordinateSystem
  11. lazy val distanceCalculator: DistanceComputable[EuclideanCoordinate]

    Attributes
    protected
    Definition Classes
    NonLinearOptimizer
  12. def embed(distances: DistanceStore, landmarkSet: Set[Int], primaries: Set[Int]): Unit

    Java API for embed.

    Java API for embed.

    If you would like to use random selection of primary landmarks, set "primaries" to null.

    All work done will be forwarded to the Scala version of embed. This method simply converts data structures to the Scala equivalent before passing it along.

    landmarkSet

    A set of landmark IDs

    primaries

    Contains IDs of primary landmarks to embed - pass null for default

    Definition Classes
    GraphCoordinateSystem
  13. def embed(distances: DistanceStore, landmarkSet: Set[Int], primaries: Option[Set[Int]] = None): Unit

    Embeds a set of distances into the coordinate system.

    Embeds a set of distances into the coordinate system.

    Embeds a set of distances into the coordinate system - all work is forwarded to embedLandmarks and embedNonLandmark.

    distances

    DistanceStore implementation containing distance values to embed

    landmarkSet

    A set of landmark IDs

    primaries

    Optional parameter denoting primary landmarks to embed first

    Definition Classes
    GraphCoordinateSystem
  14. def embedLandmarks(landmarkSet: Set[Int], primaries: Set[Int])(implicit store: DistanceStore): Unit

    Java API for embedLandmarks.

    Java API for embedLandmarks.

    If you would like to use random selection of primary landmarks, set "primaries" to null.

    All work done will be forwarded to the Scala version of embedLandmarks. This method simply converts data structures to the Scala equivalent before passing it along.

    landmarkSet

    A set of landmark IDs

    primaries

    Contains IDs of primary landmarks to embed - pass null for default

    store

    DistanceStore implementation containing distance values to embed

    Definition Classes
    GraphCoordinateSystem
  15. def embedLandmarks(landmarkSet: Set[Int], primaries: Option[Set[Int]] = None)(implicit store: DistanceStore): Unit

    Embed the landmarks into the coordinate system.

    Embed the landmarks into the coordinate system.

    Embed both primary and non-primary landmarks into the coordinate system. This function should only be called once per instantiation, enforced by the LANDMARKS_EMBEDDED flag.

    Primary landmarks by default are chosen randomly. The number of such primary landmarks is set by default at 16. This value can be overridden in application.conf via gcs.embed.primary-landmarks.

    If the primaries parameter is passed in, it will override the configuration files.

    landmarkSet

    A set of landmark IDs

    primaries

    Optional parameter denoting primary landmarks to embed first

    store

    DistanceStore implementation containing distance values to embed

    Definition Classes
    GraphCoordinateSystem
  16. def embedNonLandmark(id: Int)(implicit store: DistanceStore): EuclideanCoordinate

    Embeds non-landmark into the coordinate system.

    Embeds non-landmark into the coordinate system.

    Embeds a non-landmark into the coordinate system by randomly selecting X amount of "neighbor" landmarks to align against. By default X is set to 16. This can be overridden via config with gcs.embed.neighbors.

    id

    ID of the node to embed

    store

    DistanceStore implementation containing distance values to embed

    returns

    coordinates of the embedded non-landmark

    Definition Classes
    GraphCoordinateSystem
  17. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  19. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  20. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  21. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  22. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  23. def landmarkCostFunction(ids: IndexedSeq[Int])(implicit store: DistanceStore, dim: Int): ObjectiveFunction

    Measure how much an embeding of landmarks deviates from optimum

    Measure how much an embeding of landmarks deviates from optimum

    (|estimated - groundtruth| / groundtruth)^2 is the function used for the difference between one node and landmark

    ids

    The ids of landmarks to embed

    returns

    An ObjectiveFunction to be used with an optimizer

    Attributes
    protected
    Definition Classes
    NonLinearOptimizer
  24. def load(filename: String): Unit

    Loads a set of coordinates from a given file.

    Loads a set of coordinates from a given file.

    File should be formatted such that each row represents the embedding of a single node. The format for each row should look like (using the Array[Double] view):

    [L/N if (non-)landmark] [Node ID] [Coordinate 1] ... [Coordinate N]
    filename

    Path of the file containing the formatted coordinates.

    Definition Classes
    GraphCoordinateSystem
  25. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  26. def nodeCostFunction(distances: IndexedSeq[Double], points: IndexedSeq[EuclideanCoordinate]): ObjectiveFunction

    Measure how much distances from a node to landmarks deviate

    Measure how much distances from a node to landmarks deviate

    (|estimated - groundtruth| / groundtruth)^2 is the function used for the difference between one node and landmark

    distances

    The distances between a node and a landmark

    points

    The actual coordinates of the landmarks

    returns

    An ObjectiveFunction to be used with an optimizer

    Attributes
    protected
    Definition Classes
    NonLinearOptimizer
  27. final def notify(): Unit

    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  29. def optimizeLandmarks(ids: IndexedSeq[Int])(implicit store: DistanceStore, dim: Int): Seq[EuclideanCoordinate]

    Optimize a set of landmarks against each other

    Optimize a set of landmarks against each other

    ids

    The ids of landmarks to embed

    store

    The distance store

    dim

    The dimension of the space we are working in

    returns

    A sequence of points where the distances between any two points is as close as possible to the desired distance

    Definition Classes
    NelderMeadNonLinearOptimizer
  30. def optimizeNode(neighbors: IndexedSeq[(Int, EuclideanCoordinate)], id: Int)(implicit store: DistanceStore, dim: Int): EuclideanCoordinate

    Optimize a node against a set of landmarks

    Optimize a node against a set of landmarks

    neighbors

    A sequence of pairs of ids and points

    dim

    The dimension of the space we are working in

    returns

    A point who's distance to each point is as close as possible to the distance associated with the point

    Definition Classes
    NelderMeadNonLinearOptimizer
  31. def query(source: Int, destination: Int): Double

    Query the embedded distance given two node IDs.

    Query the embedded distance given two node IDs.

    source

    ID of the source node

    destination

    ID of the destination node

    returns

    Estimated distance between source and destination

    Definition Classes
    GraphCoordinateSystem
  32. def requireDistanceComputable: DistanceComputable[EuclideanCoordinate]

    Require an implicit sand.gcs.coordinate.DistanceComputable of the type parameter in scope.

    Require an implicit sand.gcs.coordinate.DistanceComputable of the type parameter in scope.

    This essentially puts a context bound on CoordType, allowing for a Typeclass Pattern on a trait. We keep this a trait instead of an abstract class to use the Cake Pattern as well.

    returns

    Typeclass implementation of sand.gcs.coordinate.DistanceComputable

    Definition Classes
    OrionNonLinearOptimizer
  33. def save(filename: String): Unit

    Saves the sand landmark and node embeddings of the coordinate system.

    Saves the sand landmark and node embeddings of the coordinate system.

    File saved will be formatted as (using the Array[Double] view):

    [L/N if (non-)landmark] [Node ID] [Coordinate 1] ... [Coordinate N]
    filename

    Path of the file to save the coordinates into.

    Definition Classes
    GraphCoordinateSystem
  34. def storeCoordinate(id: Int, coordinate: EuclideanCoordinate, isLandmark: Boolean): Unit

    Definition Classes
    GraphCoordinateSystem
  35. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  36. def toString(): String

    Definition Classes
    AnyRef → Any
  37. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  38. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  39. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped