pyVIA.plotting_via.via_atlas_emb

pyVIA.plotting_via.via_atlas_emb(via_object=None, X_input=None, graph=None, n_components=2, alpha=1.0, negative_sample_rate=5, gamma=1.0, spread=1.0, min_dist=0.1, init_pos='via', random_state=0, n_epochs=100, distance_metric='euclidean', layout=None, cluster_membership=None, parallel=False, saveto='', n_jobs=2)[source]

Run dimensionality reduction using the VIA modified HNSW graph using via cluster graph initialization when Via_object is provided

Parameters:
  • via_object – if via_object is provided then X_input and graph are ignored

  • X_input (ndarray) – ndarray nsamples x features (PCs)

  • graph (csr_matrix) – csr_matrix of knngraph. This usually is via’s pruned, sequentially augmented sc-knn graph accessed as an attribute of via via_object.csr_full_graph

  • n_components (int) –

  • alpha (float) –

  • negative_sample_rate (int) –

  • gamma (float) – Weight to apply to negative samples.

  • spread (float) – The effective scale of embedded points. In combination with min_dist this determines how clustered/clumped the embedded points are.

  • min_dist (float) – The effective minimum distance between embedded points. Smaller values will result in a more clustered/clumped embedding where nearby points on the manifold are drawn closer together, while larger values will result on a more even dispersal of points

  • init_pos (Union[str, ndarray]) – either a string (default) ‘via’ (uses via graph to initialize), or ‘spectral’. Or a n_cellx2 dimensional ndarray with initial coordinates

  • random_state (int) –

  • n_epochs (int) – The number of training epochs to be used in optimizing the low dimensional embedding. Larger values result in more accurate embeddings. If 0 is specified a value will be selected based on the size of the input dataset (200 for large datasets, 500 for small).

  • distance_metric (str) –

  • layout (Optional[list]) – ndarray . custom initial layout. (n_cells x2). also requires cluster_membership labels

  • cluster_membership (Optional[list]) – via_object.labels (cluster level labels of length n_samples corresponding to the layout)

Return type:

ndarray

Returns:

ndarray of shape (nsamples,n_components)