Class

com.spotify.scio.extra.annoy

AnnoyPairSCollection

Related Doc: package annoy

Permalink

implicit final class AnnoyPairSCollection extends AnyVal

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AnnoyPairSCollection
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AnnoyPairSCollection(self: SCollection[(Int, Array[Float])])

    Permalink

Value Members

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

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  4. def asAnnoy(metric: AnnoyMetric, dim: Int, nTrees: Int): SCollection[AnnoyUri]

    Permalink

    Write the key-value pairs of this SCollection as an Annoy file to a temporary location, building the trees in the index according to the parameters provided.

    Write the key-value pairs of this SCollection as an Annoy file to a temporary location, building the trees in the index according to the parameters provided.

    nTrees

    Number of trees to build. More trees means more precision & bigger indices. If nTrees is set to -1, the trees will automatically be built in such a way that they will take at most 2x the memory of the vectors.

    returns

    A singleton SCollection containing the AnnoyUri of the saved files

  5. def asAnnoy(path: String, metric: AnnoyMetric, dim: Int, nTrees: Int): SCollection[AnnoyUri]

    Permalink

    Write the key-value pairs of this SCollection as an Annoy file to a specific location, building the trees in the index according to the parameters provided.

    Write the key-value pairs of this SCollection as an Annoy file to a specific location, building the trees in the index according to the parameters provided.

    path

    Can be either a local file or a GCS location e.g. gs://<bucket>/<path>

    metric

    One of Angular (cosine distance) or Euclidean

    dim

    Number of dimensions in vectors

    nTrees

    Number of trees to build. More trees means more precision & bigger indices. If nTrees is set to -1, the trees will automatically be built in such a way that they will take at most 2x the memory of the vectors.

    returns

    A singleton SCollection containing the AnnoyUri of the saved files

  6. def asAnnoySideInput(metric: AnnoyMetric, dim: Int, nTrees: Int): SideInput[AnnoyReader]

    Permalink

    Write the key-value pairs of this SCollection as an Annoy file to a temporary location, building the trees in the index according to the parameters provided, then load the trees as a side input.

    Write the key-value pairs of this SCollection as an Annoy file to a temporary location, building the trees in the index according to the parameters provided, then load the trees as a side input.

    metric

    One of Angular (cosine distance) or Euclidean

    dim

    Number of dimensions in vectors

    nTrees

    Number of trees to build. More trees means more precision & bigger indices. If nTrees is set to -1, the trees will automatically be built in such a way that they will take at most 2x the memory of the vectors.

    returns

    SideInput[AnnoyReader]

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  9. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  10. def toString(): String

    Permalink
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped