pyVIA.plotting_via.via_mds

pyVIA.plotting_via.via_mds(via_object=None, X_pca=None, viagraph_full=None, k=15, random_seed=0, diffusion_op=1, n_milestones=2000, time_series_labels=[], knn_seq=5, k_project_milestones=3, t_difference=2, saveto='', embedding_type='mds', double_diffusion=False)[source]

Fast computation of a 2D embedding FOR EXAMPLE: via_object.embedding = via.via_mds(via_object = v0) plot_scatter(embedding = via_object.embedding, labels = via_object.true_labels)

Parameters:
  • via_object

  • X_pca (ndarray) – dimension reduced (only if via_object is not passed)

  • viagraph_full (csr_matrix) – optional. if calling before or without via, then None and a milestone graph will be computed. if calling after or from within via, then we can use the via-graph to reinforce the layout of the milestone graph

  • k (int) – number of knn for the via_mds reinforcement graph on milestones. default =15. integers 5-20 are reasonable

  • random_seed (int) – randomseed integer

  • t_diffusion – default integer value = 1 with higher values generate more smoothing

  • n_milestones – number of milestones used to generate the initial embedding

  • time_series_labels (list) – numerical values in list form representing some sequentual information

  • knn_seq (int) – if time-series data is available, this will augment the knn with sequential neighbors (2-10 are reasonable values) default =5

  • embedding_type (str) – default = ‘mds’ or set to ‘umap’

  • double_diffusion (bool) – default is False. To achieve sharper strokes/lineages, set to True

  • k_project_milestones (int) – number of milestones in the milestone-knngraph used to compute the single-cell projection

  • n_iterations – number of iterations to run

  • neighbors_distances – array of distances of each neighbor for each cell (n_cells x knn) used when called from within via.run() for autocompute via-mds

Return type:

ndarray

Returns:

numpy array of size n_samples x 2