predict

besca.tl.auto_annot.predict(classifier, scaler, adata_pred, threshold=0)[source]

predicts on testing set using trained classifier

Parameters:
  • classifier (sklearn object) – trained classifier of chosen type

  • scaler (sklearn.preprocessing.StandardScaler) – scaler fit to training dataset

  • adata_pred (AnnData) – Preprocessed anndata object containing testing dataset.

  • threshold (float | default = 0) – value between 0 and 1, used for classifying into unknowns

Returns:

array of most likely class label for every cell

Return type:

np.array