adata_pred_prob¶
- besca.tl.auto_annot.adata_pred_prob(classifier, scaler, adata_pred, adata_orig, threshold=0)[source]¶
predicts on testing set using trained classifier and returns class probability for every cell and every class
- Parameters:
test_path (string) – path of test dataset
test_dataset (string) – name of test dataset
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:
Original anndata object with annotation added as column and a column for each training celltype probability
- Return type:
AnnData