Skip to main content
`Ctrl`+`K`

# skbio.embedding.Embedding

class skbio.embedding.Embedding(embedding, ids, **kwargs)

  Embedding for a biological object.

  Parameters:
    embedding array_like

      Embedding matrix where the first axis is indexed by ids.

    ids array_like

      IDs of biological objects.

  Attributes

  `embedding` | The embedding tensor.
  `ids` | IDs corresponding to each row of the embedding.

  Methods

  `bytes` | Bytes representation of string encoding.
  `read` | Create a new `Embedding` instance from a file.
  `write` | Write an instance of `Embedding` to a file.

  Special methods

  `__str__` | Return str(self).

  Special methods (inherited)

  `__eq__` | Return self==value.
  `__ge__` | Return self>=value.
  `__getstate__` | Helper for pickle.
  `__gt__` | Return self>value.
  `__hash__` | Return hash(self).
  `__le__` | Return self<=value.
  `__lt__` | Return self<value.
  `__ne__` | Return self!=value.

  Details

  embedding

    The embedding tensor.

  ids

    IDs corresponding to each row of the embedding.

  __str__()

    Return str(self).