tlc.client.reduce.reduction_method

Base classes for dimensionality reducers.

Module Contents

Classes

Class

Description

ReducerArgs

Arguments specific to the reduction method.

ReductionMethod

Perform dimensionality reduction on columns of tables.

API

class tlc.client.reduce.reduction_method.ReducerArgs

Bases: typing.TypedDict

Arguments specific to the reduction method.

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

source_embedding_column: str | None = None

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

target_embedding_column: str | None = None

The name of the column containing the reduced 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).

class tlc.client.reduce.reduction_method.ReductionMethod(reducer_args: tlc.client.reduce.reduction_method._ReducerArgsType | None = None)

Bases: abc.ABC, typing.Generic[tlc.client.reduce.reduction_method._ReducerArgsType]

Perform dimensionality reduction on columns of tables.

Dimensionality reduction is accomplished by creating derived tables of the appropriate type (e.g., UMAPTable) which apply the reduction method to the input tables.

Params reducer_args:

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

abstract default_args() tlc.client.reduce.reduction_method._ReducerArgsType
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]
abstract fit_reduction_method(table: tlc.core.objects.table.Table, column: str) tlc.core.url.Url
abstract apply_reduction_method(table: tlc.core.objects.table.Table, fit_table_url: tlc.core.url.Url, column: str) tlc.core.url.Url | None