runKNN | R Documentation |
We have checked this function: it returns the same KNN mat as SnapATAC does.
runKNN(smat, k = 20, treetype = "kd", searchtype = "standard", nn_eps = 0)
smat |
dense matrix or matrix, cell by feature |
k |
integer, max number of nearest neighbours, should be between 10 to 50. |
treetype |
string, "kd" or "bd", "bd" is usuful for larger point sets and local clusters in the dataset, which could reduce the depth of the tree. Default is "kd". NOTE: "bd" may have bugs on Linux (Ubuntu) but not on MacOS. When I use bd, my task is always be killed no mater how big memory I use (I even use 200GB for a small dataset: < 60,000 points). This does not happen on MacOS. But "kd" works on Linux |
searchtype |
string, "standard", "priority", or "radius". Default is "standard" |
nn_eps |
Error bound when performing nearest neighbor seach using RANN. default of 0.0 implies exact nearest neighbor search |
sparseMatrix, KNN matrix, ncell by ncell, value is 1 (unweighted), including the diagnal part.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.