Bering.plotting.Plot_Classification

Bering.plotting.Plot_Classification(bg, cell_name, n_neighbors=10, min_prob=0.3, zoomout_scale=8.0)[source]

Plot node classfication results on the original data and predicted data.

Parameters:
  • bg (BrGraph) – Bering Graph object

  • cell_name (str) – Name of the cell to plot

  • n_neighbors (int) – Number of neighbors to build the knn graph

  • min_prob (float) – Minimum probability threshold to classify a valid cell type (otherwise background)

  • zoomout_scale (float) – Zoom out scale (relative to the cell diameter) to show the region

Returns:

: - df_window_raw: pd.DataFrame

DataFrame of the raw spots in the window

  • df_window_pred: pd.DataFrame

    DataFrame of the predicted spots in the window

  • predictions: np.ndarray

    Array of predicted labels