objective.gen.fun | R Documentation |
Calculates the objective value in the multidimensional assignment problem with decomposable costs (MDADC). The dissimilarity function used in this problem is the squared Euclidean distance. The data can be balanced OR unbalanced.
objective.gen.fun(x, unit, cluster)
x |
data matrix with feature vectors in rows |
unit |
vector of unit labels (length should equal number of rows in |
cluster |
vector of cluster labels (length should equal number of rows in |
See equation (2) in Degras (2022). This function gives the same value as objective.fun
when the data are balanced.
Objective value
Degras (2022) "Scalable feature matching across large data collections." doi: 10.1080/10618600.2022.2074429
objective.fun
data(optdigits) m <- 10 n <- 100 ## Balanced example: both 'objective.fun' and 'objective.gen.fun' work sigma <- matrix(1:m,m,n) cluster <- rep(1:m,n) objective.fun(optdigits$x, sigma, optdigits$unit) objective.gen.fun(optdigits$x, optdigits$unit, cluster) ## Unbalanced example idx <- 1:999 objective.gen.fun(optdigits$x[idx,], optdigits$unit[idx], cluster[idx])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.