[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] Question about graph.knn
From: |
Gábor Csárdi |
Subject: |
Re: [igraph] Question about graph.knn |
Date: |
Thu, 7 Aug 2014 10:53:47 -0400 |
(1) Right.
(2) No, there is no such function, but it is easy to create one using
neighbors(), degree() and median().
Gabor
On Thu, Aug 7, 2014 at 10:47 AM, Qunawei Zhang <address@hidden> wrote:
> 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
>
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>