knn_refine | R Documentation |
Assigns the label that most neighbors have, given it is more than
min_knn_prob
.
I've found empirically on the MALT data that min_knn_prob=0.5
gives
good results, whether you classify the entire data set or just a single
cell type.
It simply excludes some of the cells that have more than 2 cell types in their
neighborhood and none is much stronger than the others,
so this is a reasonable, conservative filtering.
knn_refine(labels, neighbors, min_knn_prob = 0.5)
labels |
Cell type labels as character or factor. |
neighbors |
Neighbor graph, pass |
min_knn_prob |
Value between 0 and 1, defaults to 0.5. If the 'winning label' is below this proportion of kNN that have it, knn_refine will return "Unassigned". |
Character vector with refined labels.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.