Closed sanchezy closed 1 year ago
@sanchezy, this plot function is now designed only for best-match mode - I will expand its application to 'prob match' in the future.
Generally you should avoid dot plotting the result derived from probability thresholding, as the dot plot itself incorporates probability information, based on which you can judge cell type prediction confidence.
However, if you really want to plot the probability threshold result, for now the temporary solution is as below:
all_celltypes = predictions.predicted_labels.predicted_labels.cat.categories
new_celltypes = all_celltypes.difference(predictions.probability_matrix.columns)
predictions.probability_matrix[new_celltypes] = np.repeat(predictions.probability_matrix.max(axis=1).values[:, np.newaxis], len(new_celltypes), axis=1)
then apply the dot plot function on predictions
Thanks a lot! It works!
I have added support for this kind of plot. This will be available >= CellTypist 1.2.0
Hi all, I am trying to visualise the results of the classification using a probability threshold and majority of voting on a cell typist.dotplot. I get an error:
Could you please let me know if there is a way to get around this?
Many thanks for your help!