Align two NMF models
Details
For nmf models, factors in object are reordered to minimize the cost of bipartite matching
(see bipartiteMatch) on a cosine or correlation distance matrix. The \(w\) matrix is used for matching, and
must be equidimensional in object and ref.
Examples
# \donttest{
data <- simulateNMF(50, 30, k = 3, seed = 1)
m1 <- nmf(data$A, 3, seed = 1, maxit = 50)
m2 <- nmf(data$A, 3, seed = 2, maxit = 50)
aligned <- align(m2, m1) # reorder m2 factors to match m1
# }