hyrax.verbs.reduction_algorithms.tsne#

Attributes#

Classes#

TSNE

TSNE reduction implementation.

Module Contents#

logger[source]#
class TSNE(config: dict, reduction_results=None)[source]#

Bases: hyrax.verbs.reduction_algorithms.algorithm_registry.ReductionAlgorithm

TSNE reduction implementation.

reducer[source]#
save_model(_)[source]#

TSNE does not support saving the model. This method is a no-op.

load_model(_)[source]#

TSNE does not support loading a pre-existing model. This method is a no-op.

fit(_)[source]#

TSNE does not support a separate fitting stage. This method is a no-op.

transform(args: dict, num_batches: int)[source]#

Fit and transform data with TSNE model.

Parameters:
  • args (dict) – A dictionary containing the data to be transformed.

  • num_batches (int) – The total number of batches that the data is split into for transformation.

_fit_transform_batch(batch_tuple: tuple)[source]#

Private helper to fit_transform a single batch

Parameters:

batch_tuple (tuple()) – first element is the IDs of the batch as a numpy array second element is the inference results to transform as a numpy array with shape (batch_len, N) where N is the total number of dimensions in the inference result. Caller flattens all inference result axes for us.

Returns:

first element is the ids of the batch as a numpy array second element is the results of running the tsne transform on the input as a numpy array.

Return type:

tuple