I wish to do graph alignment using the R package GraphAlignment. As an input, it wants the node similarity matrix. I have 4 adjacency matrices, with same vertices (1000 in number) and will have to compute node similarity matrix for each possible pair. I tried my luck with a lot of search, and ended up with some mathematical functions and algorithms to compute it. So, is there any easy way to compute it, or should I use R to compute a matrix using one of the mathematical functions defined to construct a similarity matrix?
Am in a fix, and started to learn R recently. Any help would be appreciated!
Well, upon doing, am getting something like this:
for all up to X1000
Yes
adj_sim
gives you a "dot" represents no edge between the vertices and "1" represents an edge exist between the vertices.gives you a binary matrix with "1" or "0"
Ok!
Well, I am getting all as zero. Is that okay to get a result like this? This implies there is no similarity between two graphs if I align them, they are completely different!
yes the script is correct. I've extensively applied it for my projects.
What if we don't want a binary ruling on similarity? What if we want a number between 0 and 1, as in the Jaccard index? Igraph's
similarity.jaccard(ig, ig2, vids=c(V(ig)$name[1], V(ig2)$name[1]))
gives back a matrix that is 2x2 (#vids by #vids). How does one interpret this matrix? The diagonals are 1 in my case and the off diagonals are 0.If you have a directed graph and if you choose different "mode" options, it calculates the indices accordingly. Try varying mode options and see the changes in the resulting values.
Sorry dear raunakms may you please consider my post taking intersection between two networks
I don't know the reason of error
Thank you for your complete answer