igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] graph.knn in R weighted vs unweighted


From: Tamás Nepusz
Subject: Re: [igraph] graph.knn in R weighted vs unweighted
Date: Wed, 11 Jul 2012 17:43:39 +0200

> When running graph.knn there is no difference both in the knn and the knnk 
> values comparing:
> graph.knn(graph, weights=NULL)
> and
> graph.knn(graph)
> Am I loosing something?

I think both versions give you the weighted variant. If you have a "weight" 
attribute and want to ignore the weights, try specifying a uniform weight 
vector:

graph.knn(graph, weights=rep(1, ecount(graph))

T.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]