grassp.tl.knn_f1_score#
- knn_f1_score(data, gt_col, pred_col=None, weights=None, average='macro')[source]#
 F1 score.
- Parameters:
 - data
 AnnData object.
- gt_col
 Observation column with ground-truth labels.
- pred_col default: 
None Observation column with predicted labels.
- weights default: 
None Weights for the F1 score.
- average default: 
'macro' Average method for the F1 score. If
Nonethe score for each label is returned.
- Returns:
 F1 score.