objective.gen.fun {matchFeat} | R Documentation |
Objective Value in One-To-One Feature Matching with Balanced or Unbalanced Data
Description
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.
Usage
objective.gen.fun(x, unit, cluster)
Arguments
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 |
Details
See equation (2) in Degras (2022). This function gives the same value as objective.fun
when the data are balanced.
Value
Objective value
References
Degras (2022) "Scalable feature matching across large data collections." doi:10.1080/10618600.2022.2074429
See Also
Examples
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])
[Package matchFeat version 1.0 Index]