Sharpens the weights of a weighted graph for later pruning.
rwclust(x, iter = 5, k = 3, similarity = "hk")# S3 method for data.frame
rwclust(x, iter = 5, k = 3, similarity = "hk")
# S3 method for matrix
rwclust(x, iter = 5, k = 3, similarity = "hk")
list
A vector of the updated edge weights
Updated adjacency matrix containing updated weights
matrix or dataframe with three columns
vertex label (integer)
vertex label (integer)
edge weights (float)
integer, number of iterations
integer, maximum length of random walk
string, the name of the similarity metric used to update 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.