tlc.client.reduce.pacmap#

Dimensionality reduction with the PaCMAP algorithm.

Module Contents#

Classes#

Class

Description

PaCMAPTableArgs

Arguments specific to the PaCMAP reduction method.

PaCMAPReduction

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

API#

class tlc.client.reduce.pacmap.PaCMAPTableArgs#

Bases: tlc.client.reduce.reduction_method.ReducerArgs

Arguments specific to the PaCMAP reduction method.

See PaCMAPTable 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 2)

n_neighbors: int = None#

The number of neighbors to use when constructing the nearest neighbor graph (default to 10 for dataset whose sample size is smaller than 10000. For large dataset whose sample size (n) is larger than 10000, the default value is: 10 + 15 * (log10(n) - 4))

MN_ratio: float = None#

the ratio of the number of mid-near pairs to the number of neighbors (default 0.5)

FP_ratio: float = None#

the ratio of the number of further pairs to the number of neighbors, (default 2)

distance: str = None#

The distance metric to use for the nearest neighbor graph (default ‘euclidean’)

lr: float = None#

Learning rate of the AdaGrad optimizer. (default 1)

num_iters: int = None#

Number of iterations. Default 450. 450 iterations is enough for most dataset to converge.

verbose: bool = None#

Print the progress of PaCMAP. (default False)

apply_pca: bool = None#

Whether pacmap should apply PCA to the data before constructing the k-Nearest Neighbor graph (default True)

random_state: int | None = None#

Random state for the random number generator (default 0)

class tlc.client.reduce.pacmap.PaCMAPReduction(reducer_args: tlc.client.reduce.reduction_method._ReducerArgsType | None = None)#

Bases: tlc.client.reduce.reduction_method.ReductionMethod[tlc.client.reduce.pacmap.PaCMAPTableArgs]

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

Params reducer_args:

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

default_args() tlc.client.reduce.pacmap.PaCMAPTableArgs#

Returns the default arguments for the PaCMAP reduction method.

fit_reduction_method(table: tlc.core.objects.table.Table, column: str) tlc.core.url.Url#

Fits a PaCMAPTable 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#