SpatialQuery.spatial_query.find_fp_knn

spatial_query.find_fp_knn(ct, k=30, min_support=0.5, max_dist=20)[source]

Find frequent patterns within the KNNs of certain cell type.

Parameters:
  • ct (str) – Cell type name.

  • k (int, default=30) – Number of nearest neighbors.

  • min_support (float, default=0.5) – Threshold of frequency to consider a pattern as a frequent pattern.

  • max_dist (float, default=20) – Maximum distance for considering a cell as a neighbor.

Returns:

Frequent patterns in the neighborhood of certain cell type.

Return type:

pd.DataFrame