BAITS.st.gr.get_adj

Contents

BAITS.st.gr.get_adj#

BAITS.st.gr.get_adj(adata, mode='neighbour', k_neighbors=7, min_distance=150, self_loop=True)#

Calculate adjacency matrix for ST data.

Parameters:
  • mode (str ['neighbour','distance'] (default: 'neighbour')) – The way to define neighbourhood. If mode='neighbour': Calculate adjacency matrix with specified number of nearest neighbors; If mode='distance': Calculate adjacency matrix with neighbors within the specified distance.

  • k_neighbors (int (default: 7)) – For mode = 'neighbour', set the number of nearest neighbors if mode='neighbour'.

  • min_distance (int (default: 150)) – For mode = 'distance', set the distance of nearest neighbors if mode='distance'.

  • self_loop (bool (default: True)) – Whether to add selfloop to the adjacency matrix.

  • adj (matrix of shape (n_samples, n_samples)) – Adjacency matrix where adj[i, j] is assigned the weight of edge that connects i to j.