graph_match_Umeyama | R Documentation |
Spectral Graph Matching Methods: Umeyama Algorithm
graph_match_Umeyama(A, B, seeds = NULL, similarity = NULL)
A |
A matrix, igraph object, or list of either. |
B |
A matrix, igraph object, or list of either. |
seeds |
A vector of integers or logicals, a matrix or a data frame. If
the seed pairs have the same indices in both graphs then seeds can be a
vector. If not, seeds must be a matrix
or a data frame, with the first column being the indices of |
similarity |
A matrix. An |
graph_match_Umeyama
returns an object of class "graphMatch
" which is a list
containing the following components:
matching correspondence in G_1
matching correspondence in G_2
the functional similarity score matrix with which one can extract more than one matching candidates
Choice for solving the LAP
a vector of logicals indicating if the corresponding vertex is a seed
S. Umeyama (1988), An eigendecomposition approach to weighted graph matching problems. IEEE TPAMI. USA, pages 695-703.
# match G_1 & G_2 using Umeyama algorithm
G <- sample_correlated_gnp_pair(10, .9, .5)
g1 <- G$graph1
g2 <- G$graph2
startm <- matrix(0, 10, 10)
diag(startm)[1:4] <- 1
GM_Umeyama <- gm(g1, g2, similarity = startm, method = "Umeyama")
GM_Umeyama
# generate the corresponding permutation matrix
GM_Umeyama[]
summary(GM_Umeyama, g1, g2)
# visualize the edge-wise matching performance
plot(g1, g2, GM_Umeyama)
plot(g1[], g2[], GM_Umeyama)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.