CelLink.model.Cellink.construct_graph
- Cellink.construct_graph(arr1_full_batch, arr2_full_batch, n_neighbors=15, metric='correlation', verbose=False)[source]
Compute k-nearest neighbors of data and return the UMAP graph.
- Parameters:
arr1_full_batch (np.array of shape (n_samples1, n_features1)) – Data1 matrix full feature each batch
arr2_full_batch (np.array of shape (n_samples2, n_features2)) – Data2 matrix full feature each batch
n_neighbors (int) – Number of neighbors desired
metric (string, default='correlation') – Metric used when constructing the initial knn graph
verbose (bool, default=True) – Whether to print progress
- Returns:
None, but generate two objects self.edge1 and self.edge 2, which contains – rows, cols, vals: list Each edge is rows[i], cols[i], and its weight is vals[i]