dynamo.tl.psl(Y, sG=None, dist=None, K=10, C=1000.0, param_gamma=0.001, d=2, maxIter=10, verbose=False)[source]

This function is a pure Python implementation of the PSL algorithm.

Reference: Li Wang and Qi Mao, Probabilistic Dimensionality Reduction via Structure Learning. T-PAMI, VOL. 41, NO. 1, JANUARY 2019

  • Y (ndarray) – The data list.

  • sG (Optional[csr_matrix]) – A prior kNN graph passed to the algorithm. Defaults to None.

  • dist (Optional[ndarray]) – A dense distance matrix between all vertices. If no distance matrix passed, we will use the kNN based algorithm, otherwise we will use the original algorithm reported in the manuscript. Defaults to None.

  • K (int) – Number of nearest neighbors used to build the neighborhood graph. Large k can obtain less sparse structures. Ignored if sG is used. Defaults to 10.

  • C (int) – The penalty parameter for loss term. It controls the preservation of distances. The larger it is, the distance is more strictly preserve. If the structure is very clear, a larger C is preferred. Defaults to 1e3.

  • param_gamma (float) – param_gamma is trying to make a matrix A non-singular, it is like a round-off parameter. 1e-4 or 1e-5 is good. It corresponds to the variance of prior embedding. Defaults to 1e-3.

  • d (int) – the embedding dimension. Defaults to 2.

  • maxIter (int) – Number of maximum iterations. Defaults to 10.

  • verbose (bool) – Whether to print running information. Defaults to False.

Return type:

Tuple[csr_matrix, ndarray]


A tuple (S, Z), where S is the adjacency matrix and Z is the reduced low dimension embedding.