knnPredict | R Documentation |
Predict annotations of query cells from the reference using k-NN method
knnPredict( query_obj, ref_obj, train_labels, k = 5, save_as = "cell_type_pred_knn", confidence = TRUE, seed = 0 )
query_obj |
Symphony query object |
ref_obj |
Symphony reference object |
train_labels |
vector of labels to train |
k |
number of neighbors |
save_as |
string that result column will be named in query metadata |
confidence |
return k-NN confidence scores (proportion of neighbors voting for the predicted annotation) |
seed |
random seed (k-NN has some stochasticity in the case of ties) |
Symphony query object, with predicted reference labels stored in the 'save_as' slot of the query$meta_data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.