
From:  Qunawei Zhang 
Subject:  [igraph] Question about graph.knn 
Date:  Thu, 07 Aug 2014 10:47:58 0400 
Useragent:  MicrosoftMacOutlook/14.4.1.140326 
Hello: (1) I am using the R package, and found the function "graph.knn". I am not sure whether I understand the function correctly. Please correct me if I am wrong. Given a node "nodeA", its "Knn" is calculated as follows. Get the degrees of the direct neighbors of "nodeA", and then calculate the average of the degrees of its neighbors. Suppose "nodeA" and "nodeB" in our list(I.e., the nodes assigned to "vids" parameter) have the same degree(suppose the degree is 10). Then knnk[10] would be the average degree of the neighbors of "nodeA" and "nodeB", right? (2) Here knn returns the average degree of the neighbors of a node, but maybe the median degree of the neighbors will be less sensitive to outliers. Is there a function I can get the median degree of nodes' neighbors(I am using the R package)? Thanks Best Quanwei 
[Prev in Thread]  Current Thread  [Next in Thread] 