createKnnMatrix {RaceID} | R Documentation |
Function to create a knn matrix
Description
This creates an adjacency matrix, keeping only nearest neighbour with a link probability above a minimum probability
Usage
createKnnMatrix(res, pvalue = 0.01)
Arguments
res |
List object with k nearest neighbour information returned by |
pvalue |
Positive real number between 0 and 1. All nearest neighbours with link probability |
Value
Adjacency matrix in sparse matrix format (see package Matrix) with positive non-zero entries only for k nearest neighours with link probability >= pvalue
. The value of these entries equals the link probability.
Examples
res <- pruneKnn(intestinalDataSmall,knn=10,alpha=1,no_cores=1,FSelect=FALSE)
y <- createKnnMatrix(res,pvalue=0.01)
[Package RaceID version 0.3.5 Index]