tlc.client.reduce.umap#

Dimensionality reduction with the UMAP algorithm.

Module Contents#

Classes#

Class

Description

UMapTableArgs

Arguments specific to the UMAP reduction method.

UMapReduction

Perform dimensionality reduction on columns of tables using the UMAP algorithm.

API#

class tlc.client.reduce.umap.UMapTableArgs#

Bases: tlc.client.reduce.reduction_method.ReducerArgs

Arguments specific to the UMAP reduction method.

See UMAPTable for more information.

Initialize self. See help(type(self)) for accurate signature.

n_components: int = None#

The number of dimensions in the reduced space (default 3).

standard_scaler_normalize: bool = None#

Whether to normalize the data before reducing it (default False).

n_neighbors: int = None#

The number of neighbors to use when constructing the nearest neighbor graph (default 15).

metric: str = None#

The metric to use when calculating distances between points in the input space (default: euclidean).

min_dist: float = None#

The minimum distance between points in the reduced space (default 0.1).

source_embedding_column: str | None = None#

The name of the column containing the embedding in the input table. If None, all columns are considered.

target_embedding_column: str | None = None#

The name of the column containing the embedding in the output table. If None, the column is named after the input column.

retain_source_embedding_column: bool = None#

Whether to retain the source embedding column in the output table (default False).

n_jobs: int = None#

The number of threads to use for the reduction (default -1).

class tlc.client.reduce.umap.UMapReduction(reducer_args: tlc.client.reduce.reduction_method._ReducerArgsType | None = None)#

Bases: tlc.client.reduce.reduction_method.ReductionMethod[tlc.client.reduce.umap.UMapTableArgs]

Perform dimensionality reduction on columns of tables using the UMAP algorithm.

Params reducer_args:

A dictionary of arguments which are specific to the reduction method.

default_args() tlc.client.reduce.umap.UMapTableArgs#

Returns the default arguments for the UMAP reduction method.

fit_and_apply_reduction(producer: tlc.core.objects.table.Table, consumers: list[tlc.core.objects.table.Table]) dict[tlc.core.url.Url, tlc.core.url.Url]#
fit_reduction_method(table: tlc.core.objects.table.Table, column: str) tlc.core.url.Url#

Fits a UMAPTable and returns the model URL

apply_reduction_method(table: tlc.core.objects.table.Table, fit_table_url: tlc.core.url.Url, column: str) tlc.core.url.Url | None#