rwclust | R Documentation |
Sharpens the weights of a weighted graph for later pruning.
rwclust(x, iter = 5, k = 3, similarity = "hk") ## S3 method for class 'data.frame' rwclust(x, iter = 5, k = 3, similarity = "hk") ## S3 method for class 'matrix' rwclust(x, iter = 5, k = 3, similarity = "hk")
x |
matrix or dataframe with three columns
|
iter |
integer, number of iterations |
k |
integer, maximum length of random walk |
similarity |
string, the name of the similarity metric used to update weights |
list
A vector of the updated edge weights
Updated adjacency matrix containing updated weights
Internally, the edgelist passed to rwclust
is converted
into a transition matrix, whose powers are used to compute the
probability of reaching a vertex u from vertex v in
k steps for all v and u. New edge weights are computed
using the similarity between these "walk probabilities" for each pair
of vertices. The intuition is that vertices who have similar
neighborhoods in terms of random walk reachability are similar
to each other.
The returned weights can be used for clustering by deleting edges with weights below a certain threshold. The connected components of the resulting graph form the clusters.
Harel, David, and Yehuda Koren. "On clustering using random walks." International Conference on Foundations of Software Technology and Theoretical Computer Science. Springer, Berlin, Heidelberg, 2001.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.